Class 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
Extended Workflow Node Model for AD_WF_Node
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:
    • Constructor Details

      • MWFNode

        public MWFNode(Properties ctx, String AD_WF_Node_UU, String trxName)
        UUID based Constructor
        Parameters:
        ctx - Context
        AD_WF_Node_UU - UUID key
        trxName - Transaction
      • 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
      • MWFNode

        public MWFNode(MWFNode copy)
        Copy constructor
        Parameters:
        copy -
      • MWFNode

        public MWFNode(Properties ctx, MWFNode copy)
        Copy constructor
        Parameters:
        ctx -
        copy -
      • MWFNode

        public MWFNode(Properties ctx, MWFNode copy, String trxName)
        Copy constructor
        Parameters:
        ctx -
        copy -
        trxName -
    • Method Details

      • 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 - context
        AD_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:
        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 next nodes for 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:
        action info text
      • 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:
      • getColumn

        public MColumn getColumn()
        Get Column
        Returns:
        column or null
      • 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 Calendar Field
        Returns:
        Calendar Field (Calendar.MINUTE, etc.)
      • calculateDynamicPriority

        public int calculateDynamicPriority(int seconds)
        Calculate Dynamic Priority
        Parameters:
        seconds - second after created
        Returns:
        Dynamic Priority
      • getParameters

        public MWFNodePara[] getParameters()
        Get Node Parameters
        Returns:
        array of node parameters
      • getWorkflow

        public MWorkflow getWorkflow()
        Deprecated.
        please use getAD_Workflow()
        Get Workflow
        Specified by:
        getWorkflow in interface I_AD_WF_Node
        Overrides:
        getWorkflow in class X_AD_WF_Node
        Returns:
        workflow
      • getAD_Workflow

        public MWorkflow getAD_Workflow()
        Specified by:
        getAD_Workflow in interface I_AD_WF_Node
        Overrides:
        getAD_Workflow in class X_AD_WF_Node
      • 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
      • isValidFromTo

        public boolean isValidFromTo(Timestamp date)
        Check if the workflow node is valid for given date
        Parameters:
        date -
        Returns:
        true if node is valid for the given date
      • markImmutable

        public MWFNode markImmutable()
        Description copied from interface: ImmutablePOSupport
        mark PO as immutable
        Specified by:
        markImmutable in interface ImmutablePOSupport
        Returns:
        PO