Adempiere 3.5.2a

org.compiere.wf
Class MWFNode

java.lang.Object
  extended by org.compiere.model.PO
      extended by org.compiere.model.X_AD_WF_Node
          extended by org.compiere.wf.MWFNode
All Implemented Interfaces:
Serializable, Comparator, I_AD_WF_Node, I_Persistent, Evaluatee

public class MWFNode
extends X_AD_WF_Node

Workflow Node Model

Version:
$Id: MWFNode.java,v 1.2 2006/07/30 00:51:05 jjanke Exp $
Author:
Jorg Janke
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_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, WORKFLOW_ID_AD_Reference_ID
 
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, 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_Column_ID, COLUMNNAME_AD_Form_ID, COLUMNNAME_AD_Image_ID, COLUMNNAME_AD_Process_ID, COLUMNNAME_AD_Task_ID, COLUMNNAME_AD_WF_Block_ID, COLUMNNAME_AD_WF_Node_ID, COLUMNNAME_AD_WF_Responsible_ID, COLUMNNAME_AD_Window_ID, COLUMNNAME_AD_Workflow_ID, COLUMNNAME_AttributeName, COLUMNNAME_AttributeValue, COLUMNNAME_C_BPartner_ID, COLUMNNAME_Cost, COLUMNNAME_Description, COLUMNNAME_DocAction, COLUMNNAME_Duration, COLUMNNAME_DynPriorityChange, COLUMNNAME_DynPriorityUnit, COLUMNNAME_EMail, COLUMNNAME_EMailRecipient, COLUMNNAME_EntityType, COLUMNNAME_FinishMode, COLUMNNAME_Help, 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_ValidFrom, COLUMNNAME_ValidTo, COLUMNNAME_Value, COLUMNNAME_WaitingTime, COLUMNNAME_WaitTime, COLUMNNAME_Workflow_ID, COLUMNNAME_WorkingTime, COLUMNNAME_XPosition, COLUMNNAME_YPosition, Model, Table_ID, Table_Name
 
Constructor Summary
MWFNode(MWorkflow wf, String Value, String Name)
          Parent Constructor
MWFNode(Properties ctx, int AD_WF_Node_ID, String trxName)
          Standard Constructor - save to cache
MWFNode(Properties ctx, ResultSet rs, String trxName)
          Load Constructor - save to cache
 
Method Summary
protected  boolean afterDelete(boolean success)
          After Delete
protected  boolean afterSave(boolean newRecord, boolean success)
          After Save
protected  boolean beforeSave(boolean newRecord)
          Before Save
 int calculateDynamicPriority(int seconds)
          Calculate Dynamic Priority
static MWFNode get(Properties ctx, int AD_WF_Node_ID)
          Get WF Node from Cache
 String getActionInfo()
          Get Action Info
 String getAttributeName()
          Get Attribute Name
 MColumn getColumn()
          Get Column
 String getDescription(boolean translated)
          Get Description
 int getDurationCalendarField()
          Get Duration CalendarField
 long getDurationMS()
          Get Duration in ms
 String getHelp(boolean translated)
          Get Help
 long getLimitMS()
          Get Duration Limit in ms
 String getName(boolean translated)
          Get Name
 int getNextNodeCount()
          Get Number of Next Nodes
 MWFNodePara[] getParameters()
          Get Parameters
 Point getPosition()
          Get Position
 MWFNodeNext[] getTransitions(int AD_Client_ID)
          Get the transitions
 MWorkflow getWorkflow()
          Get Workflow
 boolean isUserApproval()
          Is this an Approval setp?
 boolean isUserChoice()
          Is this a User Choice step?
 boolean isUserManual()
          Is this a Manual user step?
 void setClientOrg(int AD_Client_ID, int AD_Org_ID)
          Set Client Org
 void setPosition(int x, int y)
          Set Position
 void setPosition(Point position)
          Set Position
 String toString()
          String Representation
 String toStringX()
          User String Representation
 
Methods inherited from class org.compiere.model.X_AD_WF_Node
get_AccessLevel, getAction, getAD_Column_ID, getAD_Column, getAD_Form_ID, getAD_Form, getAD_Image_ID, getAD_Image, getAD_Process_ID, getAD_Process, getAD_Task_ID, getAD_Task, getAD_WF_Block_ID, getAD_WF_Block, getAD_WF_Node_ID, getAD_WF_Responsible_ID, getAD_WF_Responsible, getAD_Window_ID, getAD_Window, getAD_Workflow_ID, getAD_Workflow, getAttributeValue, getC_BPartner_ID, getC_BPartner, getCost, getDescription, getDocAction, getDuration, getDynPriorityChange, getDynPriorityUnit, getEMail, getEMailRecipient, getEntityType, getFinishMode, getHelp, getJoinElement, getKeyNamePair, getLimit, getMovingTime, getName, getOverlapUnits, getPriority, getQueuingTime, getR_MailText_ID, getR_MailText, getS_Resource_ID, getS_Resource, getSetupTime, getSplitElement, getStartMode, getSubflowExecution, getUnitsCycles, getValidFrom, getValidTo, getValue, getWaitingTime, getWaitTime, getWorkflow_ID, getWorkingTime, getXPosition, getYPosition, initPO, isCentrallyMaintained, isMilestone, isSubcontracting, setAction, setAD_Column_ID, setAD_Form_ID, setAD_Image_ID, setAD_Process_ID, setAD_Task_ID, setAD_WF_Block_ID, setAD_WF_Node_ID, 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, setYPosition
 
Methods inherited from class org.compiere.model.PO
beforeDelete, compare, copyValues, copyValues, createAttachment, delete_Accounting, delete_Tree, delete, delete, deleteEx, deleteEx, dump, dump, equals, 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_Table_ID, get_TableName, get_Translation, get_TrxName, get_Value, get_Value, get_ValueAsInt, get_ValueAsString, get_ValueDifference, get_ValueDifference, get_ValueE, get_ValueOfColumn, get_ValueOld, get_ValueOld, get_ValueOldAsInt, get_WhereClause, get_xmlDocument, get_xmlString, getAD_Client_ID, getAD_Org_ID, getAllIDs, getAttachment, getAttachment, getAttachmentData, getCreated, getCreatedBy, getCtx, getDoc, getFindParameter, getPdfAttachment, getUpdated, getUpdatedBy, insert_Accounting, insert_Tree, insert_Tree, is_Changed, is_new, is_ValueChanged, is_ValueChanged, isActive, isAttachment, isColumnMandatory, isColumnUpdateable, isMandatoryOK, isPdfAttachment, isReplication, load, load, load, load, loadComplete, loadDefaults, loadSpecial, lock, save, save, saveEx, saveEx, saveNew_getID, saveNewSpecial, saveReplica, saveUpdate, set_ColumnUpdateable, set_CustomColumn, set_TrxName, set_TrxName, set_Value, set_Value, set_ValueE, set_ValueNoCheck, set_ValueNoCheckE, set_ValueOfColumn, set_ValueOfColumn, setAD_Client_ID, setAD_Org_ID, setClientOrg, setDoc, setDocWorkflowMgr, setIsActive, setReplication, setStandardDefaults, setUpdateable, setUpdatedBy, unlock
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
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 - context
AD_WF_Node_ID - id
trxName - transaction

MWFNode

public MWFNode(MWorkflow wf,
               String Value,
               String Name)
Parent Constructor

Parameters:
wf - workflow (parent)
Value - value
Name - name

MWFNode

public MWFNode(Properties ctx,
               ResultSet rs,
               String trxName)
Load Constructor - save to cache

Parameters:
ctx - context
rs - result set to load info from
trxName - transaction
Method Detail

get

public static MWFNode get(Properties ctx,
                          int AD_WF_Node_ID)
Get WF Node from Cache

Parameters:
ctx - context
AD_WF_Node_ID - id
Returns:
MWFNode

setClientOrg

public void setClientOrg(int AD_Client_ID,
                         int AD_Org_ID)
Set Client Org

Overrides:
setClientOrg in class PO
Parameters:
AD_Client_ID - client
AD_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 - x
y - 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:
getAttributeName in interface I_AD_WF_Node
Overrides:
getAttributeName in class X_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()
Get Workflow

Returns:
workflow

toString

public String toString()
String Representation

Overrides:
toString in class X_AD_WF_Node
Returns:
info

toStringX

public String toStringX()
User String Representation

Returns:
info

beforeSave

protected boolean beforeSave(boolean newRecord)
Before Save

Overrides:
beforeSave in class PO
Parameters:
newRecord - new
Returns:
true if can be saved

afterSave

protected boolean afterSave(boolean newRecord,
                            boolean success)
After Save

Overrides:
afterSave in class PO
Parameters:
newRecord - new
success - success
Returns:
saved

afterDelete

protected boolean afterDelete(boolean success)
After Delete

Overrides:
afterDelete in class PO
Parameters:
success - success
Returns:
deleted

Adempiere 3.5.2a

Adempiere® is a registered trademark of ADempiere Business Inc. ©2004-2008 HumanFlash.com All rights reserved.