Group Error Propagation

Unhandled errors halt the execution of a group and the error transition out of the group is taken. The following figure illustrates a process definition that waits for new text files, parses the files into an XML schema, then inserts the records into a database table.

Propagating errors from a group

The process definition uses two group activities. The first group is an iterate group that performs one update for each record. If any of the updates fail, an error transition out of the group is taken to the WriteLogEntry activity. A second group surrounds the iterate group to enclose all updates in a transaction. If the transaction succeeds, the process ends. If the transaction fails, the error transition is taken out of the transaction group to the SendMail activity.

The Generate Error activity is used to propagate an error outside of the transaction group to the next exception scope. If the iterate group experiences an error, the WriteLogEntry activity is executed, then the error transition out of the group is taken to the Send Mail activity.

The transition to the Send Mail activity is taken if there is either an error when committing the transaction or if the Generate Error activity is executed (because of an error in the iterate group). The error process variables contain the error information for the activity where the error occurred.

The Generate Error activity can use any error schemas defined on the process to propagate a specific schema to the parent process. For more information about process error schemas, see Process Error Schemas.