Siebel Business Process Framework: Workflow Guide > Options for Configuring a Workflow Process > Handling Errors >

Using an Error Exception Connector to Handle Errors


An error exception connector is a type of connector that can handle the following types of errors:

  • Siebel CRM error. A failure that occurs while Siebel CRM sends an email notification.
  • User error. A user who attempts to submit an order that is not complete.

You can use an error exception connector to change the flow in a workflow process. If an error occurs, then Siebel CRM enters the error code and error message in the Error Code and Error Message process properties. An error exception connector allows you to use values in these properties to define a decision condition.

The Process Designer displays an error exception connector as a red connector between two steps. If you click it, then the Properties window displays the WF Step Branch properties for the connector.

Siebel CRM evaluates exception logic for a step after the step finishes. If you must evaluate an exception before the step runs, then you must attach the error exception connector to an upstream step in the workflow process.

Example of Error Exception Handling

Figure 18 illustrates an example of error exception handling. If the Get Organization ID step cannot get data, then the workflow process continues to the Lookup Sender by Org step. If this step fails, then the workflow process runs the red exception connector, and then uses the Send Lookup Error Email step to send an email.

Figure 18. Example of a Workflow That Uses Error Exception Connectors to Programmatically Handle Exceptions

Defining an Error Exception Connector

You define an error exception connector in the Process Designer.

To define an error exception connector

  1. Locate the workflow process you must modify.

    For more information, see Locating a Workflow Process in the Workflow Processes List.

  2. Right-click the workflow process, and then choose Edit Workflow Process.
  3. In the Process Designer, drag, and then drop an error exception connector from the palette to the canvas, attaching one end of the connector to an existing step where Siebel CRM must detect errors.

    The business service step and the Siebel operation step are typical step types where Siebel CRM can detect an error.

  4. Make sure that you correctly attach the end of the connector to the step.
  5. Drag, and then drop a stop step from the palette to the canvas.
  6. Attach the unconnected end of the error exception connector to the stop step.
  7. Make sure the error exception connector is chosen in the Process Designer.
  8. Enter a value in the Name property in the Properties window.
  9. In the Type property, choose Error Exception or User Defined Exception.
  10. In the Process Designer, double click the error exception connector to access the Compose Condition Criteria dialog box.
  11. Define decision conditions that apply for the exception.

    For more information, see Creating a Decision Condition on a Branch Connector.

Defining an Error Exception Connector to Handle an Update Conflict

The example in this topic defines an error exception connector to handle an update conflict that occurs if Siebel CRM attempts to make multiple writes to the same record at the same time. If the Workflow Monitor Agent (WMA) starts a workflow process, and if this agent updates a record, then the WMA can fail if another workflow process attempts to update this record, if another user attempts to update this record, or if another WMA task attempts to update this record since the workflow process first gets this record. In this situation, Siebel CRM display an error message that is similar to the following:

The selected record has been modified by another user since it was retrieved.

To prevent the WMA task from failing, you can define an error exception connector that handles the update conflict that occurs while the workflow process runs.

To define an error exception connector to handle an update conflict

  1. In Siebel Tools, create a new workflow process using values from the following table.
    Property
    Value

    Process Name

    Error Exception Example

    Workflow Mode

    Service Flow

    Business Object

    Opportunity

    For an example, see Creating the Workflow Process.

  2. Add steps and connectors until your workflow process resembles the workflow illustrated in the following figure.

    For more information, see Overview of Workflow Process Steps, and Diagramming a Workflow Process.

  3. Click the Update Opportunity business service step, and then use the Properties window to define properties described in the following table.
    Property
    Value

    Business Service Name

    ABC Update Opty

    Business Service Method

    Update Opty

  4. Make sure the Update Opportunity business service step is still chosen in the Process Designer.
  5. Define an input argument in the MVPW using values from the following table.
    Field
    Value

    Input Argument

    Opportunity Id

    Type

    Process Property

    Property Name

    Object Id

    Property Data Type

    String

    For more information, see Arguments That You Can Define for a Process Property.

  6. Define a decision condition on the error exception connector named Interim Write Error using values from the following table.
    Property
    Value

    Compare to

    Process Property

    Operation

    One Must Match (Ignore Case)

    Object

    Error Code

    Values

    0x8137 -- 0x6f74

    Siebel CRM returns the 0x8137 -- 0x6f74 error code with the following error message:

    The selected record has been modified by another user since it was retrieved

    For more information, see Creating a Decision Condition on a Branch Connector.

  7. Define the Update Opportunity Again business service step, using the same values you used in Step 3 and Step 4. For the Name property, use Update Opportunity Again.
  8. Validate, and then simulate the workflow process.

    For more information, see Process of Testing a Workflow.

  9. Implement this configuration in your production workflow process.

The Update Opportunity Again step allows Siebel CRM to write to the opportunity again if the first attempt to update the opportunity fails due to the update conflict error. This example uses a business service step that updates opportunities. You can use the same configuration with other step types that update a record, such as a Siebel operation step or a sub process step, and with other types of records, such as accounts or contacts.

Siebel Business Process Framework: Workflow Guide Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices.