Runtime Information

Instances of workflow data objects and list workflow data objects exist as soon as a workflow process is enacted and exist until the process completes. These workflow data object instances are thus available to be used in the activities (e.g. pass data to a BPO method) and the transitions (e.g. make data available in the evaluation of transition conditions) throughout the lifetime of that process instance.

The enactingUser attribute of the Context_RuntimeInformation Workflow Data Object is set to the username of the user whose actions in the application resulted in the workflow process being enacted. This does not result in the same value being assigned to the transaction when a BPO method is subsequently invoked in the workflow process instance. This is due to the transaction demarcation in the workflow engine when automatic activities (i.e. BPO methods) are invoked in the application server. Due to the asynchronous nature of this invocation and the requirement to ensure that the call to the application code is in it's own transaction, the BPO method is invoked by the workflow engine (SYSTEM user) rather than the user who enacted the workflow process in the first place. Indeed in a real business sense, the person who enacted the workflow may not even know they have invoked that BPO method.

In a similar fashion, it should be noted that the enacting user of a workflow process instance is not passed into any of the subflow process instances that may be invoked from the parent process. If the enacting user of the parent process instance is required in any of the subflow process instances, it should be passed explicitly using a workflow data object attribute in the input mappings for that subflow process.

Care should also be taken when updating workflow data object attribute instance data when executing parallel automatic activities in a workflow process instance. If such automatic activities invoke the same BPO method and that method attempts to update the data for the exact same workflow data object attribute, then a database record deadlock situation may occur. The workflow process designer should alleviate such situations occurring by designing the workflow process definition to ensure automatic activities executed in parallel do not update the same workflow data object attribute.