Thursday, 17 July 2008

[Workflow] Identify Existing Instance

This API returns the number of active instances of a given BPC that match the passed variables.

The details related to each workitem are provided in the main node of the Meta4Object (one record per workitem). The method Get Value can be used to identify the value of the BPC variables. If the state is not linked to the current user, the workitem has the value “N/A”.
It can be used, e.g. in the Hire to identify if a person is involved in a recruitment process and should not be hired yet because of pending approval or because the task to hire the person is assigned to a different user.


Technical details
  • Meta4Object: SWF_INSTANCE
  • Node Structure: SWF_INSTANCE
  • Method: GET_INSTANCES (ARG_ID_BPC, tuples ID Variable / Value)
    Returns number of instances of the given BPC that match the variables.The workitems can be retrieved from the property ID_WORKITEM (if the task is assigned to the current user, otherwise is the value “N/A”).
  • Method: GET_VALUE (ARG_ID_VARIABLE)
    Returns the value of the given variable for the currently positioned record.

No comments: