Setting custom states with ConditionState
An XSL mapping can produce status information depending on the processed data, using a processing instruction. This processing instruction can be interpreted by a Condition
component during runtime of the Technical Process. Depending on the status, a corresponding process branch can be executed.
Place an empty XSL mapping in the Technical Process before a
Condition
component.Define processing instruction(s) in the XSL mapping according to the pattern:
XML<xsl:processing-instruction name="ConditionState">value</xsl:processing-instruction>
Replace
value
with a value from the processed XML document.
Example:<xsl:value-of select="data"/>
Note
Allowed status values are integer numbers, and negative numbers (e. g.
-1
) for an error status; see also Status Values for Processes and Process Steps.The following status values are not allowed, because they are reserved by the system:
-999
(Error status of the engine)-998
(Process not executed due to license reasons)999
(Status ID for a process component not yet executed)998
(is used by the savepoint mechanism and causes the immediate termination of the entire technica997
(Causes the immediate termination of the entire Technical Process)
Recommendation: Use numbers greater than
1000
for custom state values, in order to avoid possible overlaps with other status values.Make sure that the XSL mapping creates a root element, in order to be executed.
The XSL mapping now outputs processing instructions according to the pattern<?ConditionState value ?>
.In the subsequent
Condition
component, define a status for each branch (see Creating and using conditions).If you create other ConditionStates in the further process progress, remove the preceding Processing Instructions from the respective input XML document e. g. using
<xsl:copy-of>
to avoid unexpected behavior during process execution.
Problem solving: The XSL mapping cannot be executed?
Possible reasons: The processed value might be one of the impermissible state values -999
, -998
, 999
, 998
, 997
or a string or the XSL mapping produces an XML document which contains no root element.
- Only use allowed state values (see Status Values for Processes and Process Steps.).
- Add for instance an empty element
<root/>
after the ConditionState definitions in the XSL mapping.