Bookshelf Home | Contents | Index | PDF |
Siebel Business Process Framework: Workflow Guide > About Workflow Process Design Options > About Handling Errors > Using an Error Exception to Handle ErrorsAn error exception is a type of branch designed for handling system and user-defined errors. An example of a system generated error is a failure when sending an email notification. An example of a user-defined error is attempting to submit an order that is not complete. You can use an exception branch to programmatically handle errors and change the flow depending on when an error is encountered. This technique provides a granular approach to handling exceptions at each step. In the Process Designer an Error Exception appears as a red connector between two steps. When you click an exception connector, the Properties window displays the connector's WF Step Branch properties. When an error occurs, the error code and error message are automatically populated in the Error Code and Error Message process properties. An exception allows you to set up a condition using values in these properties. Similar to other cases where conditional logic is used in a workflow process, an exception on a step is evaluated after the step has finished. If you need to evaluate an exception before executing a step, you must attach the exception to the prior step in the workflow process. Example of Error Exception HandlingThis topic gives one example of defining error exception handling. You might use this feature differently, depending on your business model. In the example displayed in Figure 16, when the Get Organization ID step is unable to get data, the workflow continues to the Lookup Sender by Org step. If Lookup Sender by Org fails, the workflow takes the red Exception branch and sends an email using the Send Lookup Error Email step. Defining an Error ExceptionAn Error Exception is defined in the Process Designer.
Defining an Error Exception to Handle an Update ConflictYou can define an error exception to handle an update conflict that occurs when multiple attempts are made to write to the same record at the same time. When the Workflow Monitor Agent (WMA) is used to invoke a workflow process, which in turn updates a record, the WMA can fail if a workflow process attempts to update a record that is updated by another user or task since it was initially retrieved by the workflow process. In this case, an error message, such as The selected record has been modified by another user since it was retrieved, is displayed. You can prevent the WMA task from failing by defining an error exception to handle an update conflict that occurs while the workflow process is running. To create a test workflow process that uses an Error Exception to handle an update conflict
How This Example WorksThe Update Opportunity Again step provides a way to write to the opportunity record again in cases where the first attempt to update an opportunity fails due to the update conflict error. Note that this example uses a Business Service step that updates opportunity records. The same technique can be used with other step types that update a record, such as a Siebel Operation or a Sub Process step, and with other types of records, such as accounts or contacts. |
Siebel Business Process Framework: Workflow Guide | Copyright © 2008, Oracle. All rights reserved. | |