Template descriptions for human tasks, activities and processes can contain replacement expressions that are evaluated when this instance is started.
This means that each task, staff assignments, or process or activity instance of the same model can have different descriptions and replacement expressions. These descriptions will depend on the contents of process variables or the input or output message of the human task.
%[<variableName>]\[<partName>][\<xpath>]%
The name of the variable is optional in cases where a default message is defined. For example, the description of an invoke activity uses the invoke's input message as the default variable.
Entity | Default Message |
---|---|
Process | The input message of the process |
Invoke | The input message of the invoke. |
Human task (embedded inline in the process) | The input message of the human task. |
Receive | The message received |
Pick (Receive choice) | The message received |
Reply | The reply message |
For a process instance description, the default variable for the replacement is the actual input message that started the process. For processes with multiple creating activities the replacement string must be applicable for all the different types of input message, and the variables of the process are not initialized when the process description is resolved. Thus, the input message of the process is the only source that can be used in the replacement strings.
Waiting for '%user\name%' to return '%book\title%'
Waiting for 'Anke' to return 'Computer Networks'
Replacement expressions for staff assignments and descriptions in human tasks can contain the contents of variables and messages. In addition resolved staff assignments of sibling inline tasks can be used from other inline tasks.
Stand-alone human tasks
The following table lists all expressions, that are available for stand-alone human tasks (i.e. tasks that are not embedded inline in a process). When these expressions are used inside descriptions as well as staff assignments, they must be enclosed in '%' characters.
Type of variable | Expression | Description |
---|---|---|
Staff Variables | htm:task.originator | task originator name |
htm:task.owner | task owner name | |
htm:task.starter | task starter name | |
htm:task.administrators | list of task administrators | |
htm:task.potentialOwners | list of potential task owners | |
htm:task.editors | list of task editors | |
htm:task.readers | list of task readers | |
htm:task.potentialStarters | list of potential task starters | |
Task variables | htm:property.CustomProp | value of task's custom property 'CustomProp' |
htm:task.displayName | default task display name | |
htm:task.description | default task description | |
htm:task.instanceID | task instance id | |
htm:task.Business Process Choreographer ExplorerURL | Business Process Choreographer Explorer URL to task/escalation details | |
htm:input.[part][\XPath] (or htm:input.part[\XPath]) |
data from task's input message (Process Server messages usually have a single part, in which case the part name does not have to be specified. When using messages with multiple parts then the syntax in parenthesis has to be used. Also see the notes below.) |
|
htm:output.[part][\XPath] (or htm:output.part[\XPath]) |
data from task's output message (Process Server messages usually have a single part, in which case the part name does not have to be specified. When using messages with multiple parts then the syntax in parenthesis has to be used. Also see the notes below.) |
|
Note that task instances have no default message. | ||
Escalation variables | htm:escalation.description | default escalation description |
htm:escalation.expectedTaskState | escalation's expected task state | |
htm:escalation.instanceID | escalation instance id | |
htm:escalation(escalationName).receivers | escalation receivers |
<?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions xmlns:tns="http://variables/variablesInterface" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="variablesInterface" targetNamespace="http://variables/variablesInterface"> <wsdl:types> <xsd:schema targetNamespace="http://variables/variablesInterface" xmlns:tns="http://variables/variablesInterface" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:element name="operation1"> <xsd:complexType> <xsd:sequence> <xsd:element name="input1" nillable="true" type="xsd:string"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="operation1Response"> <xsd:complexType> <xsd:sequence> <xsd:element name="output1" nillable="true" type="xsd:string"/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema> </wsdl:types> <wsdl:message name="operation1RequestMsg"> <wsdl:part element="tns:operation1" name="operation1Parameters"/> </wsdl:message> <wsdl:message name="operation1ResponseMsg"> <wsdl:part element="tns:operation1Response" name="operation1Result"/> </wsdl:message> <wsdl:portType name="variablesInterface"> <wsdl:operation name="operation1"> <wsdl:input message="tns:operation1RequestMsg" name="operation1Request"/> <wsdl:output message="tns:operation1ResponseMsg" name="operation1Response"/> </wsdl:operation> </wsdl:portType> </wsdl:definitions>
For example, the expressions %htm:input.operation1Parameters\input1%, %htm:output.operation1Result\output1% are valid and equivalent to %htm:input.\input1%, %htm:output.\output1% .
Inline human tasks
In addition to the expressions in the previous table, a human task that is embedded inline in a process can also use the expressions listed in the following table for staff resolution. Note, that the description of an inline human task is resolved by the Business Flow Manager (BFM) and must therefore be modeled to use the syntax described in the previous section.
Type of variable | Expression | Description |
---|---|---|
Process variables | wf:variable.VariableName\[part][\XPath] | 'VariableName\[part][\XPath]' is passed to BFM to resolve the variable/expression. |
wf:property.customPropertyName | The 'customPropertyName' is passed to the BFM to resolve the custom property. | |
Inline staff variables | wf:process.starter | The starter of the process. |
wf:process.administrators | The administrators of the process. | |
wf:process.readers | The readers of the process. | |
wf:activity(activityName).potentialOwners | The potential owners of either the current activity or the activity named in brackets | |
wf:activity(activityName).owner | The owner of either the activity named in brackets | |
wf:activity(activityName).editors | The editors of either the current activity or the activity named in brackets | |
wf:activity(activityName).readers | The readers of either the current activity or the activity named in brackets |
Note that inline staff variables which refer to sibling activities can only be resolved if the referred activity is also an inline human task and is already started at the point in time when the staff resolution happens.
Related information