Prepares a collaboration exception to raise it to the next higher level of execution. This function block creates a new exception object with the specified exception type and a message string. Use this form to pass an exception message stored as a string.
The Raise Collaboration Exception function block prepares a collaboration exception to raise to the next higher level of execution. When the collaboration runtime environment executes the Raise Collaboration Exception function block, it changes the collaboration's execution to the Exception state, then proceeds with the logic of the activity diagram. How the activity diagram responds to the raised exception depends on the termination node of its execution path, as follows:
If this parent diagram's next node is a decision node, the collaboration runtime environment checks for execution branches in this decision node that handle the raised exception. This parent diagram can access the raised exception through the currentException system variable.
The collaboration runtime environment associates with the unresolved flow any exception text that the raised exception contains. If this exception does not contain any exception text, the collaboration runtime environment uses the default message:
Scenario failed.
It is best to explicitly raise an exception when one occurs, rather than to just end in failure. When the code explicitly raises the exception to the collaboration runtime environment, the administrator can use the Flow Manager to view the exception text as part of the unresolved flow. For more information, see Raising the exception.
There is a series of Raise Collaboration Exception function blocks, each of which accomplishes a slightly different task. The Raise Collaboration Exception 1, Raise Collaboration Exception 2, Raise Collaboration Exception 3, Raise Collaboration Exception 4, and Raise Collaboration Exception 5 function blocks enable you to specify up to five message-parameter values for the exception message text. The Raise Collaboration Exception with Parameters function block enables you to specify an array of message-parameter values.