Class MPInstance

    • Constructor Detail

      • MPInstance

        public MPInstance​(Properties ctx,
                          int AD_PInstance_ID,
                          String ignored)
        Standard Constructor
        Parameters:
        ctx - context
        AD_PInstance_ID - instance or 0
        ignored - no transaction support
      • MPInstance

        public MPInstance​(Properties ctx,
                          ResultSet rs,
                          String ignored)
        Load Constructor
        Parameters:
        ctx - context
        rs - result set
        ignored - no transaction support
      • MPInstance

        public MPInstance​(MProcess process,
                          int Record_ID)
        Create Process Instance from Process and create parameters
        Parameters:
        process - process
        Record_ID - Record
      • MPInstance

        public MPInstance​(Properties ctx,
                          int AD_Process_ID,
                          int Record_ID)
        New Constructor
        Parameters:
        ctx - context
        AD_Process_ID - Process ID
        Record_ID - record
    • Method Detail

      • getParameters

        public MPInstancePara[] getParameters()
        Get Parameters
        Returns:
        parameter array
      • equalParameters

        public boolean equalParameters​(MPInstancePara[] params)
        Validate that a set of process instance parameters are equal or not to the current instance parameter
        Parameters:
        params - array of parameters to compare
        Returns:
        true if the process instance parameters are the same as the array ones
      • getLog

        public MPInstanceLog[] getLog()
        Get Logs
        Returns:
        array of logs
      • addLog

        public MPInstanceLog addLog​(Timestamp P_Date,
                                    int P_ID,
                                    BigDecimal P_Number,
                                    String P_Msg,
                                    int AD_Table_ID,
                                    int Record_ID)
        Parameters:
        P_Date - date
        P_ID - id
        P_Number - number
        P_Msg - msg
        AD_Table_ID - tableID
        Record_ID - recordID
        Returns:
      • log

        public void log()
        Dump Log
      • isOK

        public boolean isOK()
        Is it OK
        Returns:
        Result == OK
      • setResult

        public void setResult​(boolean ok)
        Set Result
        Parameters:
        ok -
      • afterSave

        protected boolean afterSave​(boolean newRecord,
                                    boolean success)
        After Save
        Overrides:
        afterSave in class PO
        Parameters:
        newRecord - new
        success - success
        Returns:
        success
      • createParameter

        public MPInstancePara createParameter​(int seqNo,
                                              String parameterName,
                                              Object value)
        Create Process Instance Parameter and save to database
        Parameters:
        seqNo - parameter sequence#
        parameterName - parameter name
        value - parameter value
        Returns:
      • publishChangedEvent

        public static void publishChangedEvent​(int AD_User_ID)
      • postOnChangedEvent

        public static void postOnChangedEvent​(int AD_User_ID)