Package org.compiere.model
Class MProcess
java.lang.Object
org.compiere.model.PO
org.compiere.model.X_AD_Process
org.compiere.model.MProcess
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparator<Object>
,I_AD_Process
,I_Persistent
,Evaluatee
,ImmutablePOSupport
Process Model
- Version:
- $Id: MProcess.java,v 1.4 2006/07/30 00:58:04 jjanke Exp $
- Author:
- Jorg Janke, Teo Sarca, www.arhipac.ro
- BF [ 1757523 ] Server Processes are using Server's context
- FR [ 2214883 ] Remove SQL code and Replace for Query
- See Also:
-
Field Summary
Fields inherited from class org.compiere.model.X_AD_Process
ACCESSLEVEL_AD_Reference_ID, ACCESSLEVEL_All, ACCESSLEVEL_ClientOnly, ACCESSLEVEL_ClientPlusOrganization, ACCESSLEVEL_Organization, ACCESSLEVEL_SystemOnly, ACCESSLEVEL_SystemPlusClient, ALLOWMULTIPLEEXECUTION_AD_Reference_ID, ALLOWMULTIPLEEXECUTION_NotFromAnyUser, ALLOWMULTIPLEEXECUTION_NotFromAnyUserAndSameParameters, ALLOWMULTIPLEEXECUTION_NotFromSameUser, ALLOWMULTIPLEEXECUTION_NotFromSameUserAndParameters, ALLOWMULTIPLEEXECUTION_Yes, ENTITYTYPE_AD_Reference_ID, EXECUTIONTYPE_AD_Reference_ID, EXECUTIONTYPE_ForceBackground, EXECUTIONTYPE_ForceForeground, SHOWHELP_AD_Reference_ID, SHOWHELP_AskUserForFutureUse, SHOWHELP_DonTShowHelp, SHOWHELP_RunSilently_TakeDefaults, SHOWHELP_ShowHelp
Fields inherited from class org.compiere.model.PO
ACCESSLEVEL_ALL, ACCESSLEVEL_CLIENT, ACCESSLEVEL_CLIENTORG, ACCESSLEVEL_ORG, ACCESSLEVEL_SYSTEM, ACCESSLEVEL_SYSTEMCLIENT, ENTITYTYPE_Dictionary, ENTITYTYPE_UserMaintained, I_ZERO, LOCAL_TRX_PREFIX, log, p_ctx, p_info, UUID_NEW_RECORD, XML_ATTRIBUTE_AD_Table_ID, XML_ATTRIBUTE_Record_ID
Fields inherited from interface org.compiere.model.I_AD_Process
accessLevel, COLUMNNAME_AccessLevel, COLUMNNAME_AD_Client_ID, COLUMNNAME_AD_CtxHelp_ID, COLUMNNAME_AD_Form_ID, COLUMNNAME_AD_Org_ID, COLUMNNAME_AD_PrintFormat_ID, COLUMNNAME_AD_Process_ID, COLUMNNAME_AD_Process_UU, COLUMNNAME_AD_ReportView_ID, COLUMNNAME_AD_Workflow_ID, COLUMNNAME_AllowMultipleExecution, COLUMNNAME_Classname, COLUMNNAME_CopyFromProcess, COLUMNNAME_Created, COLUMNNAME_CreatedBy, COLUMNNAME_Description, COLUMNNAME_EntityType, COLUMNNAME_ExecutionType, COLUMNNAME_FileNamePattern, COLUMNNAME_Help, COLUMNNAME_IsActive, COLUMNNAME_IsBetaFunctionality, COLUMNNAME_IsDirectPrint, COLUMNNAME_IsReport, COLUMNNAME_JasperReport, COLUMNNAME_Name, COLUMNNAME_ProcedureName, COLUMNNAME_ShowHelp, COLUMNNAME_Statistic_Count, COLUMNNAME_Statistic_Seconds, COLUMNNAME_Updated, COLUMNNAME_UpdatedBy, COLUMNNAME_Value, COLUMNNAME_WorkflowValue, Model, Table_ID, Table_Name
-
Constructor Summary
ConstructorDescriptionMProcess
(Properties ctx, int AD_Process_ID, String trxName) Standard ConstructorMProcess
(Properties ctx, String AD_Process_UU, String trxName) UUID based ConstructorMProcess
(Properties ctx, ResultSet rs, String trxName) Load ConstructorMProcess
(Properties ctx, MProcess copy) Copy constructorMProcess
(Properties ctx, MProcess copy, String trxName) Copy constructorCopy constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
addStatistics
(int seconds) Deprecated.- use UPDATE insteadprotected boolean
afterSave
(boolean newRecord, boolean success) After Saveprotected boolean
beforeSave
(boolean newRecord) Called before Save for Pre-Save Operationvoid
Copy values and parameters from another process and saves.static MProcess
get
(int AD_Process_ID) Get MProcess from Cache (immutable)static MProcess
Get MProcess from Cache based on UUID (immutable)static MProcess
get
(Properties ctx, int AD_Process_ID) Get MProcess from Cache (immutable)static MProcess
get
(Properties ctx, String AD_Process_UU) Get MProcess from Cache based on UUID (immutable)static MProcess
getCopy
(Properties ctx, int AD_Process_ID, String trxName) Get updateable copy of MProcess from cachestatic MProcess
getFromMenu
(Properties ctx, int AD_Menu_ID) Get MProcess from MenugetParameter
(String name) Get Process Parameter with ColumnNameGet Process Parametersstatic int
getProcess_ID
(String value, String trxName) Get AD_Process_ID via Value (Search key)boolean
Is this using DB procedureboolean
Is Force running in Backgroundboolean
Is Force running Foregroundboolean
Is this using Java Processboolean
Is it a Workflow processmark PO as immutableDeprecated.Deprecated.boolean
processIt
(ProcessInfo pi, Trx trx) boolean
processIt
(ProcessInfo pi, Trx trx, boolean managedTrx) Execute the processboolean
processItWithoutTrxClose
(ProcessInfo pi, Trx trx) Execute process without closing the given transaction - used from workflow engine.toString()
String RepresentationMethods inherited from class org.compiere.model.X_AD_Process
get_AccessLevel, getAccessLevel, getAD_CtxHelp, getAD_CtxHelp_ID, getAD_Form, getAD_Form_ID, getAD_PrintFormat, getAD_PrintFormat_ID, getAD_Process_ID, getAD_Process_UU, getAD_ReportView, getAD_ReportView_ID, getAD_Workflow, getAD_Workflow_ID, getAllowMultipleExecution, getClassname, getCopyFromProcess, getDescription, getEntityType, getExecutionType, getFileNamePattern, getHelp, getJasperReport, getKeyNamePair, getName, getProcedureName, getShowHelp, getStatistic_Count, getStatistic_Seconds, getValue, getWorkflowValue, initPO, isBetaFunctionality, isDirectPrint, isReport, setAccessLevel, setAD_CtxHelp_ID, setAD_Form_ID, setAD_PrintFormat_ID, setAD_Process_ID, setAD_Process_UU, setAD_ReportView_ID, setAD_Workflow_ID, setAllowMultipleExecution, setClassname, setCopyFromProcess, setDescription, setEntityType, setExecutionType, setFileNamePattern, setHelp, setIsBetaFunctionality, setIsDirectPrint, setIsReport, setJasperReport, setName, setProcedureName, setShowHelp, setStatistic_Count, setStatistic_Seconds, setValue, setWorkflowValue
Methods inherited from class org.compiere.model.PO
afterDelete, beforeDelete, buildInsertSQL, checkImmutable, clearCrossTenantSafe, clone, columnExists, columnExists, compare, copyPO, copyValues, copyValues, createAttachment, delete, delete, delete_Accounting, delete_Tree, deleteEx, deleteEx, dump, dump, equals, get_Attribute, get_Attributes, get_ColumnCount, get_ColumnDescription, get_ColumnDisplayType, get_ColumnIndex, get_ColumnLabel, get_ColumnLookup, get_ColumnName, get_DisplayValue, get_HashMap, get_ID, get_IDOld, get_KeyColumns, get_Logger, get_OptimisticLockingColumns, get_Table_ID, get_TableName, get_Translation, get_Translation, get_Translation, get_Translation, get_Translation, get_TrxName, get_UUID, get_Value, get_Value, get_ValueAsBoolean, get_ValueAsInt, get_ValueAsInt, get_ValueAsString, get_ValueAsString, get_ValueDifference, get_ValueDifference, get_ValueE, get_ValueOfColumn, get_ValueOld, get_ValueOld, get_ValueOldAsInt, get_WhereClause, get_WhereClause, get_xmlDocument, get_xmlString, getAD_Client_ID, getAD_Org_ID, getAllIDs, getAttachment, getAttachment, getAttachmentData, getCreated, getCreatedBy, getCtx, getDoc, getFindParameter, getPdfAttachment, getUpdated, getUpdatedBy, getUUIDColumnName, getUUIDColumnName, hashCode, insert_Accounting, insert_Tree, insert_Tree, is_Changed, is_Immutable, is_new, is_UseOptimisticLocking, is_ValueChanged, is_ValueChanged, isActive, isAttachment, isColumnMandatory, isColumnUpdateable, isMandatoryOK, isPdfAttachment, isReplication, load, load, load, load, loadByUU, loadComplete, loadDefaults, loadPO, loadSpecial, lock, makeImmutable, postDelete, retrieveIdOfParentValue, retrieveIdOfParentValue, save, save, saveCrossTenantSafe, saveCrossTenantSafeEx, saveCrossTenantSafeEx, saveEx, saveEx, saveNew_afterSetID, saveNew_getID, saveNewSpecial, saveReplica, saveUpdate, set_Attribute, set_ColumnUpdateable, set_CustomColumn, set_CustomColumnReturningBoolean, set_OptimisticLockingColumns, set_TrxName, set_TrxName, set_UseOptimisticLocking, set_Value, set_Value, set_Value, set_Value, set_ValueE, set_ValueNoCheck, set_ValueNoCheckE, set_ValueOfColumn, set_ValueOfColumn, set_ValueOfColumnReturningBoolean, set_ValueOfColumnReturningBoolean, setAD_Client_ID, setAD_Org_ID, setClientOrg, setClientOrg, setCrossTenantSafe, setDoc, setDocWorkflowMgr, setIsActive, setProcessedOn, setReplication, setStandardDefaults, setUpdateable, setUpdatedBy, toInsertSQL, unlock, update_Tree, validForeignKeys
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
Methods inherited from interface org.compiere.model.I_AD_Process
getAD_Client_ID, getAD_Org_ID, getCreated, getCreatedBy, getUpdated, getUpdatedBy, isActive, setAD_Org_ID, setIsActive
Methods inherited from interface org.compiere.model.I_Persistent
save
-
Constructor Details
-
MProcess
UUID based Constructor- Parameters:
ctx
- ContextAD_Process_UU
- UUID keytrxName
- Transaction
-
MProcess
Standard Constructor- Parameters:
ctx
- contextAD_Process_ID
- processtrxName
- transaction name
-
MProcess
Load Constructor- Parameters:
ctx
- contextrs
- result settrxName
- transaction name
-
MProcess
Copy constructor- Parameters:
copy
-
-
MProcess
Copy constructor- Parameters:
ctx
-copy
-
-
MProcess
Copy constructor- Parameters:
ctx
-copy
-trxName
-
-
-
Method Details
-
get
Get MProcess from Cache (immutable)- Parameters:
AD_Process_ID
- id- Returns:
- MProcess
-
get
Get MProcess from Cache (immutable)- Parameters:
ctx
- contextAD_Process_ID
- id- Returns:
- MProcess
-
getCopy
Get updateable copy of MProcess from cache- Parameters:
ctx
-AD_Process_ID
-trxName
-- Returns:
- MProcess
-
get
Get MProcess from Cache based on UUID (immutable)- Parameters:
AD_Process_UU
- UUID- Returns:
- MProcess
-
get
Get MProcess from Cache based on UUID (immutable)- Parameters:
ctx
- contextAD_Process_UU
- UUID- Returns:
- MProcess
-
getFromMenu
Get MProcess from Menu- Parameters:
ctx
- contextAD_Menu_ID
- id- Returns:
- MProcess or null
-
getParameters
Get Process Parameters- Returns:
- process parameters
-
getParameter
Get Process Parameter with ColumnName- Parameters:
name
- column name- Returns:
- process parameter or null
-
toString
String Representation- Overrides:
toString
in classX_AD_Process
- Returns:
- info
-
processIt
Deprecated.Process w/o parameter- Parameters:
Record_ID
- recordtrx
- transaction- Returns:
- Process Instance
-
processIt
Deprecated.Process w/o parameter- Parameters:
Record_ID
- recordtrx
- transaction- Returns:
- Process Instance
-
processIt
- Parameters:
pi
- Process Infotrx
- transaction- Returns:
- true if OK
-
processIt
Execute the process- Parameters:
pi
- Process Infotrx
- transactionmanagedTrx
- true to manage commit and rollback- Returns:
- true if OK
-
isJavaProcess
public boolean isJavaProcess()Is this using Java Process- Returns:
- true if this is using java process
-
isDatabaseProcedure
public boolean isDatabaseProcedure()Is this using DB procedure- Returns:
- true if this is using DB procedure
-
isForceBackground
public boolean isForceBackground()Is Force running in Background- Returns:
- true if force to run in background
-
isForceForeground
public boolean isForceForeground()Is Force running Foreground- Returns:
- true if force to run in foreground
-
isWorkflow
public boolean isWorkflow()Is it a Workflow process- Returns:
- true if this is a Workflow process
-
addStatistics
Deprecated.- use UPDATE insteadUpdate Statistics- Parameters:
seconds
- sec
-
afterSave
protected boolean afterSave(boolean newRecord, boolean success) After Save -
getProcess_ID
Get AD_Process_ID via Value (Search key)- Parameters:
value
- AD_Process.ValuetrxName
-- Returns:
- AD_Process_ID
-
copyFrom
Copy values and parameters from another process and saves. Not overwritten: name, value, entitytype.- Parameters:
source
-
-
processItWithoutTrxClose
Execute process without closing the given transaction - used from workflow engine.- Parameters:
pi
- Process Infotrx
- transaction- Returns:
- true if OK
-
markImmutable
Description copied from interface:ImmutablePOSupport
mark PO as immutable- Specified by:
markImmutable
in interfaceImmutablePOSupport
- Returns:
- PO
-
beforeSave
protected boolean beforeSave(boolean newRecord) Called before Save for Pre-Save Operation- Overrides:
beforeSave
in classPO
- Parameters:
newRecord
- new record- Returns:
- true if record can be saved
-