Sun Identity Manager Deployment Reference

Built-In Workflow Variables

The workflow engine uses several built-in variables. Most of these variables do not need to be declared in the workflow. However, you can use built-in variables to find out the state of the workflow execution. In addition, many variables are set as a side effect of workflow services.


Note –

Workflow variables are case-sensitive. For example, WF_ACTION_ERROR is not the same as wf_action_error.


Table 1–12 Built-In Variables

Name  

Description  

WF_ACTION_ERROR

A built-in variable that will be set to true if the previously executed action returned a result containing an error or a thrown exception.

WF_ACTION_RESULT

A built-in variable that will be set to the WavesetResult object returned by the previous action. Use this variable when you want to capture the action’s WavesetResult and process it without adding it to the global TaskInstance result. This variable was originally added to support resource retries, where you do not necessarily want to keep adding the resource error messages to the task result on every retry. It is not used often, but can be useful if you ever want to tweak the action result before adding it to the task result. 

WF_ACTION_SUPPRESSED

This built-in variable will be set to true if the action was suppressed due to a <Condition> expression evaluating to false. 

WF_ACTION_TIMEOUT

A built-in variable that will be set to true if the previously executed action timed out. 

WF_CASE_OWNER

A built-in variable that contains the name of the administrator who launched the workflow task. 

WF_CASE_RESULT

A built-in variable that contains the WavesetResult of the TaskInstance. This can be used in actions implemented in XPRESS or JavaScript to retrieve the result. For actions that are implemented as WorkflowApplication classes, they can obtain the result through the WorkflowContext. Because the entire WorkflowContext is exposed through the WF_CONTEXT variable, this is not absolutely necessary, but convenient. 

WF_CONTEXT

A built-in variable that contains a WorkflowContext object. You can use this in actions implemented in XPRESS or JavaScript to retrieve the WorkflowContext. For actions that are implemented as WorkflowApplication classes, the context is passed in.