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. Create a new Workflow Process with the values shown in the following table. For an example, see Creating the Workflow Process.

    Property Value

    Process Name

    Error Exception Example

    Workflow Mode

    Service Flow

    Business Object

    Opportunity

  2. Add the following steps and connectors until your Workflow Process resembles the flow shown in the following figure:

    1. A Start step

    2. An Update Opportunity step

    3. An Update Opportunity Again step

    4. An End step

    5. The following Connectors:
      • A connector between step (a) and (b), (b) and (d), and (c) and (d).

      • An Interim Write Error connector between step (b) and (c).

    Example of adding steps and connectors: This image is described in the surrounding text.

    For more information, see About Step Types and Diagramming a Workflow Process.

  3. Click the Update Opportunity business service step, and then use the Properties pane to define the properties shown in the following table.

    Property Value

    Business Service Name

    ABC Update Opty

    Business Service Method

    Update Opty

  4. With the Update Opportunity business service step selected in the Process Designer, define an input argument in the Multi Value Properties pane (MVPW) pane with the values shown in 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 You Can Define for a Process Property.

  5. Define a decision condition on the Interim Write Error exception connector with the values shown in 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.

  6. 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.

  7. Validate and then simulate the Workflow Process.

    For more information, see Process of Testing a Workflow Process.

  8. 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.