1. Script object OG.WorkFlowSeq

    Article: AN0002197Updated:

    This object offers functions for reading workflow data.

    Funkce scriptu

    Název Popis
    void Run(string code) Function starts a workflow according to the input code.
    void Run(string code, Hashtable startParameters) Function starts a workflow according to the input code and sets starting parameters.
    void Run(string code, Hashtable startParameters, int? modelId, DataRow dataRow) Function starts a workflow according to the input code in the input model and sets starting parameters.
    void RunById(int id) Function starts a workflow according to its ID.
    void RunById(int id, Hashtable startParameters) Function starts a workflow according to its ID and sets workflow parameters.
    void RunById(int id, Hashtable startParameters, DataRow dataRow) Function starts a workflow according to its ID, with a reference to a record and sets workflow parameters.
    WorkflowSeqList GetAll() Function returns list of all workflows.
    WorkflowSeq GetById(int id) Function returns workflow according to ID.
    WorkflowSeq GetByCode(string code) Function returns workflow according to code.
    DataRow GetDataRowFromTask(WorkFlowSeqTask task) Function returns data record assigned to the input task.
    WorkflowSeqRunList GetRunsByDataRow( DataRow dr, string onlyInProcess)

    Method returns list of workflow instances for the given record.

    When onlyInProcess = True, only running or suspended workflow instances are returned. Otherwise, all the workflow instances.

    WorkflowSeqRunList GetRunsByDataRow(int dataRowParentId, int dataRowId, bool onlyInProcess)

    Method returns list of workflow instances for the given record.

    When onlyInProcess = True, only running or suspended workflow instances are returned. Otherwise, all the workflow instances.

    WorkflowSeqRunList GetRunsByDataRow(int workflowSeqId, int dataRowParentId, int dataRowId, bool onlyInProcess)

    Method returns list of workflow instances for the given record and particular workflow.

    When onlyInProcess = True, only running or suspended workflow instances are returned. Otherwise, all the workflow instances.

    string CallEvent(string eventCode, WorkflowSeqActivityEventTypeCall typeCall, int? id) Function activating events.
    void Cancel(int workflowSeqRunId) Method cancels a running workflow.
    void Cancel(WorkflowSeqRunList wfRuns) Method cancels a running workflow.
    void Continue(int workflowSeqRunId) Method starts a suspended workflow.
    void Continue(WorkflowSeqRunList wfRuns) Method starts a suspended workflow.
    void Failed(int workflowSeqRunId) Method terminates a running workflow with an error indicated.
    void Failed(WorkflowSeqRunList wfRuns) Method terminates a running workflow with an error indicated.
    void Pause(int workflowSeqRunId) Method suspends a running workflow.
    void Pause(WorkflowSeqRunList wfRuns) Method suspends a running workflow.
    bool HaveUserRightByWorkflowSeq(int workflowSeqId, WorkflowSeqRoleOperation operation) Function returns TRUE, if the logged on user has access right for the workflow with the given operation. Otherwise, FALSE is returned.
    WorkflowSeqRoleOperation WorkflowSeqRoleOperation_Show Operation type for displaying workflow.
    WorkflowSeqRoleOperation WorkflowSeqRoleOperation_Run Operation type for executing workflow.
    WorkflowSeqRoleOperation WorkflowSeqRoleOperation_Manage Operation type for workflow administration.

    Object call

    OG.WorkflowSeq

    Function CallEvent

    Function returns information about success or failure:

     

    Value Description
    OK: Event x The call was successful. x events were activated.
    ERROR: x There was an error in the call, Description of the error is x.

     

    Property eventCode is an exact name of the activated event.

    Property typeCall is the call type:

     

    Value Description
    0 Only events for one particular workflow instance are activated.
    1 Only events for one particular workflow (over all its versions) are activated.
    2 Events in the whole ObjectGears instance are activated.

     

    Property id is id of an workflow instance (workflow start) or an id of workflow. It depends on the property typeCall.

×