Completion Code Uses
Completion codes tell you all the possible states that a workflow can end in.
You create completion codes in the navigator to use in workflows. Examples of possible completion codes are:
- Completed without faults
- Completed with faults
- Completed by user X
- Success
- Failure
You can view values that have been assigned to a subprocess during a debugging session. As you step through a workflow, the Variable Viewer in Debug View displays this information.
Common Uses
Completion codes are resources that make up a standard set of values. These values are used with completion code subprocess properties to indicate how a subprocess has finished. You can set one of the values that has been preconfigured in the standard set of values to the completion code property. This is done through the Write activity.
You can also test and/or compare the value of the completion code property to a standard set of values using Workflow expressions. In general, any activity that allows you to create an expression allows you to use a completion code. The most common place where a completion code is used within a subprocess is in an If/Else activity. Because If/Else allows for conditional resolutions, you can use this activity to check the values of a specified completion code, as well as to check to see how another activity within a subprocess completed. To do this, use the equality or inequality operator in an expression to compare the value of the completion code property to one of the values in the completion code set.
Properties and Subprocesses
There is a completion code property on every local or global subprocess of a workflow. There can be only one completion code for each subprocess.