Package org.compiere.wf
Class MWFNode
- java.lang.Object
-
- org.compiere.model.PO
-
- org.compiere.model.X_AD_WF_Node
-
- org.compiere.wf.MWFNode
-
- All Implemented Interfaces:
Serializable,Cloneable,Comparator<Object>,I_AD_WF_Node,I_Persistent,Evaluatee,ImmutablePOSupport
public class MWFNode extends X_AD_WF_Node implements ImmutablePOSupport
Workflow Node Model- Version:
- $Id: MWFNode.java,v 1.2 2006/07/30 00:51:05 jjanke Exp $
- Author:
- Jorg Janke, Teo Sarca, www.arhipac.ro
- FR [ 2214883 ] Remove SQL code and Replace for Query
- BF [ 2815732 ] MWFNode.getWorkflow not working in trx https://sourceforge.net/p/adempiere/bugs/1964/
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.compiere.model.X_AD_WF_Node
ACTION_AD_Reference_ID, ACTION_AppsProcess, ACTION_AppsReport, ACTION_AppsTask, ACTION_DocumentAction, ACTION_EMail, ACTION_SetVariable, ACTION_SubWorkflow, ACTION_UserChoice, ACTION_UserForm, ACTION_UserInfo, ACTION_UserWindow, ACTION_UserWorkbench, ACTION_WaitSleep, DOCACTION_AD_Reference_ID, DOCACTION_Approve, DOCACTION_Close, DOCACTION_Complete, DOCACTION_Invalidate, DOCACTION_None, DOCACTION_Post, DOCACTION_Prepare, DOCACTION_Re_Activate, DOCACTION_Reject, DOCACTION_Reverse_Accrual, DOCACTION_Reverse_Correct, DOCACTION_Unlock, DOCACTION_Void, DOCACTION_WaitComplete, DYNPRIORITYUNIT_AD_Reference_ID, DYNPRIORITYUNIT_Day, DYNPRIORITYUNIT_Hour, DYNPRIORITYUNIT_Minute, EMAILRECIPIENT_AD_Reference_ID, EMAILRECIPIENT_DocumentBusinessPartner, EMAILRECIPIENT_DocumentOwner, EMAILRECIPIENT_WFResponsible, ENTITYTYPE_AD_Reference_ID, FINISHMODE_AD_Reference_ID, FINISHMODE_Automatic, FINISHMODE_Manual, JOINELEMENT_AD_Reference_ID, JOINELEMENT_AND, JOINELEMENT_XOR, SPLITELEMENT_AD_Reference_ID, SPLITELEMENT_AND, SPLITELEMENT_XOR, STARTMODE_AD_Reference_ID, STARTMODE_Automatic, STARTMODE_Manual, SUBFLOWEXECUTION_AD_Reference_ID, SUBFLOWEXECUTION_Asynchronously, SUBFLOWEXECUTION_Synchronously
-
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, XML_ATTRIBUTE_AD_Table_ID, XML_ATTRIBUTE_Record_ID
-
Fields inherited from interface org.compiere.model.I_AD_WF_Node
accessLevel, COLUMNNAME_Action, COLUMNNAME_AD_Client_ID, COLUMNNAME_AD_Column_ID, COLUMNNAME_AD_CtxHelp_ID, COLUMNNAME_AD_Form_ID, COLUMNNAME_AD_Image_ID, COLUMNNAME_AD_InfoWindow_ID, COLUMNNAME_AD_Org_ID, COLUMNNAME_AD_Process_ID, COLUMNNAME_AD_Task_ID, COLUMNNAME_AD_WF_Block_ID, COLUMNNAME_AD_WF_Node_ID, COLUMNNAME_AD_WF_Node_UU, COLUMNNAME_AD_WF_Responsible_ID, COLUMNNAME_AD_Window_ID, COLUMNNAME_AD_Workflow_ID, COLUMNNAME_AttributeName, COLUMNNAME_AttributeValue, COLUMNNAME_C_BPartner_ID, COLUMNNAME_Cost, COLUMNNAME_Created, COLUMNNAME_CreatedBy, COLUMNNAME_Description, COLUMNNAME_DocAction, COLUMNNAME_Duration, COLUMNNAME_DynPriorityChange, COLUMNNAME_DynPriorityUnit, COLUMNNAME_EMail, COLUMNNAME_EMailRecipient, COLUMNNAME_EntityType, COLUMNNAME_FinishMode, COLUMNNAME_Help, COLUMNNAME_IsActive, COLUMNNAME_IsCentrallyMaintained, COLUMNNAME_IsMilestone, COLUMNNAME_IsSubcontracting, COLUMNNAME_JoinElement, COLUMNNAME_Limit, COLUMNNAME_MovingTime, COLUMNNAME_Name, COLUMNNAME_OverlapUnits, COLUMNNAME_Priority, COLUMNNAME_QueuingTime, COLUMNNAME_R_MailText_ID, COLUMNNAME_S_Resource_ID, COLUMNNAME_SetupTime, COLUMNNAME_SplitElement, COLUMNNAME_StartMode, COLUMNNAME_SubflowExecution, COLUMNNAME_UnitsCycles, COLUMNNAME_Updated, COLUMNNAME_UpdatedBy, COLUMNNAME_ValidFrom, COLUMNNAME_ValidTo, COLUMNNAME_Value, COLUMNNAME_WaitingTime, COLUMNNAME_WaitTime, COLUMNNAME_Workflow_ID, COLUMNNAME_WorkingTime, COLUMNNAME_XPosition, COLUMNNAME_Yield, COLUMNNAME_YPosition, Model, Table_ID, Table_Name
-
-
Constructor Summary
Constructors Constructor Description MWFNode(Properties ctx, int AD_WF_Node_ID, String trxName)Standard Constructor - save to cacheMWFNode(Properties ctx, ResultSet rs, String trxName)Load Constructor - save to cacheMWFNode(Properties ctx, MWFNode copy)MWFNode(Properties ctx, MWFNode copy, String trxName)MWFNode(MWFNode copy)MWFNode(MWorkflow wf, String Value, String Name)Parent Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected booleanafterDelete(boolean success)After Deleteprotected booleanafterSave(boolean newRecord, boolean success)After Saveprotected booleanbeforeSave(boolean newRecord)Before SaveintcalculateDynamicPriority(int seconds)Calculate Dynamic Prioritystatic MWFNodeget(int AD_WF_Node_ID)Get WF Node from Cachestatic MWFNodeget(Properties ctx, int AD_WF_Node_ID)Get WF Node from CacheStringgetActionInfo()Get Action InfoMWorkflowgetAD_Workflow()StringgetAttributeName()Get Attribute NameMColumngetColumn()Get Columnstatic MWFNodegetCopy(Properties ctx, int AD_WF_Node_ID, String trxName)Get updateable copy of MWFNode from cacheStringgetDescription(boolean translated)Get DescriptionintgetDurationCalendarField()Get Duration CalendarFieldlonggetDurationMS()Get Duration in msStringgetHelp(boolean translated)Get HelplonggetLimitMS()Get Duration Limit in msStringgetName(boolean translated)Get NameintgetNextNodeCount()Get Number of Next NodesMWFNodePara[]getParameters()Get ParametersPointgetPosition()Get PositionMWFNodeNext[]getTransitions(int AD_Client_ID)Get the transitionsMWorkflowgetWorkflow()Deprecated.please usegetAD_Workflow()booleanisUserApproval()Is this an Approval setp?booleanisUserChoice()Is this a User Choice step?booleanisUserManual()Is this a Manual user step?booleanisValidFromTo(Timestamp date)Check if the workflow node is valid for given dateMWFNodemarkImmutable()mark PO as immutablevoidsetClientOrg(int AD_Client_ID, int AD_Org_ID)Set Client OrgvoidsetPosition(int x, int y)Set PositionvoidsetPosition(Point position)Set PositionStringtoString()String RepresentationStringtoStringX()User String Representation-
Methods inherited from class org.compiere.model.X_AD_WF_Node
get_AccessLevel, getAction, getAD_Column, getAD_Column_ID, getAD_CtxHelp, getAD_CtxHelp_ID, getAD_Form, getAD_Form_ID, getAD_Image, getAD_Image_ID, getAD_InfoWindow, getAD_InfoWindow_ID, getAD_Process, getAD_Process_ID, getAD_Task, getAD_Task_ID, getAD_WF_Block, getAD_WF_Block_ID, getAD_WF_Node_ID, getAD_WF_Node_UU, getAD_WF_Responsible, getAD_WF_Responsible_ID, getAD_Window, getAD_Window_ID, getAD_Workflow_ID, getAttributeValue, getC_BPartner, getC_BPartner_ID, getCost, getDescription, getDocAction, getDuration, getDynPriorityChange, getDynPriorityUnit, getEMail, getEMailRecipient, getEntityType, getFinishMode, getHelp, getJoinElement, getKeyNamePair, getLimit, getMovingTime, getName, getOverlapUnits, getPriority, getQueuingTime, getR_MailText, getR_MailText_ID, getS_Resource, getS_Resource_ID, getSetupTime, getSplitElement, getStartMode, getSubflowExecution, getUnitsCycles, getValidFrom, getValidTo, getValue, getWaitingTime, getWaitTime, getWorkflow_ID, getWorkingTime, getXPosition, getYield, getYPosition, initPO, isCentrallyMaintained, isMilestone, isSubcontracting, setAction, setAD_Column_ID, setAD_CtxHelp_ID, setAD_Form_ID, setAD_Image_ID, setAD_InfoWindow_ID, setAD_Process_ID, setAD_Task_ID, setAD_WF_Block_ID, setAD_WF_Node_ID, setAD_WF_Node_UU, setAD_WF_Responsible_ID, setAD_Window_ID, setAD_Workflow_ID, setAttributeName, setAttributeValue, setC_BPartner_ID, setCost, setDescription, setDocAction, setDuration, setDynPriorityChange, setDynPriorityUnit, setEMail, setEMailRecipient, setEntityType, setFinishMode, setHelp, setIsCentrallyMaintained, setIsMilestone, setIsSubcontracting, setJoinElement, setLimit, setMovingTime, setName, setOverlapUnits, setPriority, setQueuingTime, setR_MailText_ID, setS_Resource_ID, setSetupTime, setSplitElement, setStartMode, setSubflowExecution, setUnitsCycles, setValidFrom, setValidTo, setValue, setWaitingTime, setWaitTime, setWorkflow_ID, setWorkingTime, setXPosition, setYield, setYPosition
-
Methods inherited from class org.compiere.model.PO
beforeDelete, 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_Value, get_Value, get_ValueAsBoolean, get_ValueAsInt, get_ValueAsInt, 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, load, loadByUU, loadComplete, loadDefaults, loadSpecial, lock, makeImmutable, postDelete, retrieveIdOfParentValue, retrieveIdOfParentValue, save, save, 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, setCrossTenantSafe, setDoc, setDocWorkflowMgr, setIsActive, setProcessedOn, setReplication, setStandardDefaults, setUpdateable, setUpdatedBy, 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_WF_Node
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 Detail
-
MWFNode
public MWFNode(Properties ctx, int AD_WF_Node_ID, String trxName)
Standard Constructor - save to cache- Parameters:
ctx- contextAD_WF_Node_ID- idtrxName- transaction
-
MWFNode
public MWFNode(MWorkflow wf, String Value, String Name)
Parent Constructor- Parameters:
wf- workflow (parent)Value- valueName- name
-
MWFNode
public MWFNode(Properties ctx, ResultSet rs, String trxName)
Load Constructor - save to cache- Parameters:
ctx- contextrs- result set to load info fromtrxName- transaction
-
MWFNode
public MWFNode(MWFNode copy)
- Parameters:
copy-
-
MWFNode
public MWFNode(Properties ctx, MWFNode copy)
- Parameters:
ctx-copy-
-
MWFNode
public MWFNode(Properties ctx, MWFNode copy, String trxName)
- Parameters:
ctx-copy-trxName-
-
-
Method Detail
-
get
public static MWFNode get(int AD_WF_Node_ID)
Get WF Node from Cache- Parameters:
AD_WF_Node_ID- id- Returns:
- MWFNode
-
get
public static MWFNode get(Properties ctx, int AD_WF_Node_ID)
Get WF Node from Cache- Parameters:
ctx- contextAD_WF_Node_ID- id- Returns:
- MWFNode
-
getCopy
public static MWFNode getCopy(Properties ctx, int AD_WF_Node_ID, String trxName)
Get updateable copy of MWFNode from cache- Parameters:
ctx-AD_WF_Node_ID-trxName-- Returns:
- MWFNode
-
setClientOrg
public void setClientOrg(int AD_Client_ID, int AD_Org_ID)Set Client Org- Overrides:
setClientOrgin classPO- Parameters:
AD_Client_ID- clientAD_Org_ID- org
-
getNextNodeCount
public int getNextNodeCount()
Get Number of Next Nodes- Returns:
- number of next nodes
-
getTransitions
public MWFNodeNext[] getTransitions(int AD_Client_ID)
Get the transitions- Parameters:
AD_Client_ID- for client- Returns:
- array of next nodes
-
getName
public String getName(boolean translated)
Get Name- Parameters:
translated- translated- Returns:
- Name
-
getDescription
public String getDescription(boolean translated)
Get Description- Parameters:
translated- translated- Returns:
- Description
-
getHelp
public String getHelp(boolean translated)
Get Help- Parameters:
translated- translated- Returns:
- Name
-
setPosition
public void setPosition(Point position)
Set Position- Parameters:
position- point
-
setPosition
public void setPosition(int x, int y)Set Position- Parameters:
x- xy- y
-
getPosition
public Point getPosition()
Get Position- Returns:
- position point
-
getActionInfo
public String getActionInfo()
Get Action Info- Returns:
- info
-
getAttributeName
public String getAttributeName()
Get Attribute Name- Specified by:
getAttributeNamein interfaceI_AD_WF_Node- Overrides:
getAttributeNamein classX_AD_WF_Node- Returns:
- Attribute Name
- See Also:
X_AD_WF_Node.getAttributeName()
-
getColumn
public MColumn getColumn()
Get Column- Returns:
- column if valid
-
isUserApproval
public boolean isUserApproval()
Is this an Approval setp?- Returns:
- true if User Approval
-
isUserChoice
public boolean isUserChoice()
Is this a User Choice step?- Returns:
- true if User Choice
-
isUserManual
public boolean isUserManual()
Is this a Manual user step?- Returns:
- true if Window/Form/Workbench
-
getDurationMS
public long getDurationMS()
Get Duration in ms- Returns:
- duration in ms
-
getLimitMS
public long getLimitMS()
Get Duration Limit in ms- Returns:
- duration limit in ms
-
getDurationCalendarField
public int getDurationCalendarField()
Get Duration CalendarField- Returns:
- Calendar.MINUTE, etc.
-
calculateDynamicPriority
public int calculateDynamicPriority(int seconds)
Calculate Dynamic Priority- Parameters:
seconds- second after created- Returns:
- dyn prio
-
getParameters
public MWFNodePara[] getParameters()
Get Parameters- Returns:
- array of parameters
-
getWorkflow
public MWorkflow getWorkflow()
Deprecated.please usegetAD_Workflow()Get Workflow- Specified by:
getWorkflowin interfaceI_AD_WF_Node- Overrides:
getWorkflowin classX_AD_WF_Node- Returns:
- workflow
-
getAD_Workflow
public MWorkflow getAD_Workflow()
- Specified by:
getAD_Workflowin interfaceI_AD_WF_Node- Overrides:
getAD_Workflowin classX_AD_WF_Node
-
toString
public String toString()
String Representation- Overrides:
toStringin classX_AD_WF_Node- Returns:
- info
-
toStringX
public String toStringX()
User String Representation- Returns:
- info
-
beforeSave
protected boolean beforeSave(boolean newRecord)
Before Save- Overrides:
beforeSavein classPO- Parameters:
newRecord- new- Returns:
- true if can be saved
-
afterSave
protected boolean afterSave(boolean newRecord, boolean success)After Save
-
afterDelete
protected boolean afterDelete(boolean success)
After Delete- Overrides:
afterDeletein classPO- Parameters:
success- success- Returns:
- deleted
-
isValidFromTo
public boolean isValidFromTo(Timestamp date)
Check if the workflow node is valid for given date- Parameters:
date-- Returns:
- true if valid
-
markImmutable
public MWFNode markImmutable()
Description copied from interface:ImmutablePOSupportmark PO as immutable- Specified by:
markImmutablein interfaceImmutablePOSupport- Returns:
- PO
-
-