Description of Context WDOs

There are two context workflow data objects that are available when creating data item and function conditions for transitions from an automatic activity. These are described below.

Context_Result Workflow Data Object
The Context_Result workflow data object is available for use in a data item or function conditions (see Conditions) for a transition from an automatic activity. This allows the use the of the return value of the invoked method in the said conditions. The conventions for the attributes available for the Context_Result workflow data object are as follows:
  • If the return type is a base type, the attribute available is called value (i.e. Context_Result.value).
  • If the return value is a struct then the Context_Result attribute values available are all the fields present on the struct return class (i.e. Context_Result.description etc.).
  • If the return value is a nested (aggregated struct) then the Context_Result attribute values available will be the fields available in the containing struct (i.e. Context_Result.description etc.) and also the fully qualified names of those fields in the nested structs (i.e. Context_Result.dtls:concernRoleID etc.). Regardless of the depth of the nesting of the return value struct, there is only one Context_Result workflow data object available with the names of the nested structs forming part of the attribute names. The separator between a nested struct and it's fields is a colon as seen in the example above.
  • If the return type is a list struct, the Context_Result workflow data object is not available.
Context_Error Workflow Data Object
A BPO method being called by an automatic activity can sometimes fail (i.e. throw an exception that causes the activity transaction to roll-back). When this happens, it can be useful to be able to model follow-on actions after the failure. The Context_Error workflow data object enables this type of "error path" modeling. It is available for use in a data item or function conditions (see Conditions) for a transition from an automatic activity.. The Context_Error workflow data object has one attribute exceptionOccurred which is described below:
  • The exceptionOccurred attribute is a boolean value indicating if the BPO method associated with an automatic activity failed. It defaults to false and is set to true if the associated BPO method fails.

At runtime, if the BPO method being called in an automatic activity fails (and is re-tried the prerequisite number of times and still fails), the workflow engine will set the exceptionOccurred attribute of Context_Error to true. Any transitions using the Context_Error workflow data object are then evaluated and followed if they resolve to true. This enables a workflow process instance to proceed along the defined error path even though the automatic activity failed.

If the BPO method being called fails and there are no transitions using the Context_Error workflow data object, then the activity is halted and an entry is created in the Failed Messages Admin console.

Note: The Context_Error workflow data object takes no account of the cause of the failure, only whether or not there was one.