As a collaboration executes, it can be in one of the following two execution states:
The collaboration can switch back and forth between these two states during its execution. It enters the Exception state when the exception occurs or raiseException() executes. It returns to the Normal state when the collaboration template catches the exception with an exception branch. Regardless of the exception handling that an activity diagram does (or does not) perform, the collaboration runtime environment continues execution of the diagram's logic after an exception occurs. This logic eventually ends in either an End Success or End Failure node. The collaboration runtime environment uses the collaboration's execution state to determine whether to create an unresolved flow once the collaboration ends. For more information on terminating nodes, see Terminating the execution path. For more information on unresolved flows, see Processing the Exception state.
While the collaboration runtime environment is successfully executing a collaboration (as defined by the logic in the activity diagrams), the collaboration's execution is in the Normal state. Possible ways to end the execution path include:
The collaboration runtime environment stops execution of the current diagram and passes control to the next higher level of execution:
The collaboration runtime environment stops execution of the collaboration and performs the steps for a collaboration in the Normal state (see Terminating in failure).
When the collaboration's execution enters the Exception state, the collaboration runtime environment does not stop execution. Instead, it continues execution as defined by the logic in the activity diagram, just as it does for execution in the Normal state. Possible ways to end this execution path include:
The collaboration runtime environment stops execution of the current diagram and passes control to the next higher level of execution, which can be:
The collaboration runtime environment stops execution of the collaboration. When the collaboration's execution is in the Exception state, the collaboration runtime environment next handles the exception. For exception-handling steps, see Successfully ending the main diagram.
When the End Success node terminates the main diagram, the collaboration runtime environment ends the collaboration. If the collaboration's execution is in the Exception state, the runtime environment performs the following steps to handle the exception:
If the exception occurs during rollback, the collaboration runtime environment terminates the collaboration and logs the error. At this point, the collaboration object is in an "in-doubt" state. An administrator can manually resolve the collaboration object's transactional status by executing or discarding the remaining compensation steps.
When a collaboration ends with its execution in the Exception state, it leaves behind an unresolved flow, which includes:
The collaboration runtime environment sends this unresolved flow to InterChange Server's event resubmission queue, where the server administrator can analyze and assess it for possible resubmission. The Flow Manager tool provides the administrator with access to the event resubmission queue. The administrator can examine information about unresolved flows, such as the name of the collaboration that terminated and a message that describes the error condition.
By default, the collaboration runtime environment associates a very simple exception message with an unresolved flow:
Scenario failed.
This default exception message does not provide the administrator with much information with which to troubleshoot the cause of the unresolved flow. However, if you code the collaboration template to raise the exception, you can provide an exception message with more information about the actual error condition that occurred. When the collaboration runtime environment handles the exception, it can associate this more detailed exception message with the unresolved flow. For more information, see Raising the exception.
When the End Success node terminates a subdiagram (or iterator) and the collaboration's execution is in the Exception state, the collaboration runtime environment takes the following steps:
The collaboration runtime environment continues execution of the parent diagram's logic until that diagram terminates in either an End Success or End Failure. As long as the collaboration execution remains in the Exception state, the runtime environment handles the exception when the collaboration ends. As long as each level of execution ends with an End Success, execution passes to the next higher level until it reaches the main diagram. Unless the main diagram catches the exception, this collaboration terminates and control passes to the collaboration runtime environment.