Siebel Business Process Framework: Workflow Guide > Example Workflow Processes > Defining a Workflow Process That Traverses a Record Set to Close Service Requests >

Validating and Simulating the Workflow Process


This task is a step in Defining a Workflow Process That Traverses a Record Set to Close Service Requests.

In this topic, you validate the workflow process, and then you use the Process Simulator and Watch window to test it. This example tests a small set of service request records. For a more thorough test, you can create more service request records that meet or do not meet the decision condition that you define in the workflow process. For more information, see Using the Watch Window.

CAUTION:  The Update Fields step modifies records in the query results. Traversing a record set can modify a set of actual customer records. If a workflow process step modifies records, then Siebel CRM might modify the values for most if not every record in the Siebel database that meets the search criteria.

To validate and simulate the workflow process

  1. Validate the workflow process.

    For more information, see Validating the Workflow Process.

  2. In Siebel Tools, right-click the Process Designer canvas, and then choose Simulate.

    For more information, see Preparing to Use the Process Simulator.

  3. Click Start Simulation. Wait for the Siebel client to start, for control to return to Siebel Tools, and for the simulator to highlight the Query Primary workflow process step.

    For caution information, see Preparing Test Records.

  4. Choose the View menu, Debug Windows, and then the Watch menu item.
  5. Click the push pin to dock the window.

    You must do Step 3 before you open the Watch window.

  6. Click the expand icon located next to PS:Property Set, and then expand the Process Properties entry in the Property Set list.

    Siebel Tools displays the process properties that are defined for this workflow process and the current value for each property. To examine this list, you can stop the simulation, and then compare the list of properties in the Watch window to the list of records in the Multi-Value Property Window.

    Siebel Tools does not display any values in the Process Properties section of the Watch window until after the simulator calls the Workflow Utilities business service. The simulator calls this business service when it runs the Watch Pre-update Values step.

  7. Click Simulate Next, and then expand the BusComp entry in the Watch window.

    The simulator runs the Query Primary step, and then highlights the Query Child step. The Query Primary step runs an unrestricted query on the Service Request business component, returning every service request that exists in the Siebel database. The Watch window displays a BusComp entry that contains a list of values for the current business component record.

  8. Click Simulate Next.

    The simulator runs the Query Child step, and then highlights the More Records decision point.

    The simulator runs the Query Child step, and then highlights the More Records decision point. The search specification on the Query Child workflow process step results in Siebel Tools creating a record set that contains four service request records. The Query Child step updates the Service Request No Link business component with these metadata records.

    The Process Properties section of the Watch window now displays the values for several system variables. It also displays the values for two process properties that reference important variables that the traversing a record set configuration uses, as described in the following table.

    Property

    Value

    Explanation

    NumAcceptedRecords

    1

    NumAcceptedRecords is a process property that references NumAffRows, which is a variable that the traversing a record set configuration uses.

    NumAffRows maintains a count of the number of rows that the query on the Query Child workflow process step returns.

    In this example, one record meets the search specification that is defined on the Query Child step.

    noRecord

    false

    noRecord is a process property that references NoMoreRecords, which is a variable that the traversing a record set configuration uses.

    The NextRecord operation sets NoMoreRecords to true if there are no more records to traverse in the record set.

    The NextRecord operation on the Read Next Record workflow process step writes the value of NoMoreRecords to the noRecord process property. It does this write operation for every iteration through the record set.

  • The BusComp section of the Watch window only displays record data from the query that Siebel Tools runs on the primary business component. This information does not change for the remainder of the simulation. For more information, see Defining the Primary Business Component.
  1. Click Simulate Next.

    The simulator runs the More Records decision point, and then highlights the Watch Pre-update Values step. To determine if flow continues or stops, the Yes connector performs two tests:

    • A value of 0 in NumAcceptedRows indicates that no records match the search specification on the Query Child workflow process step.
    • A value of true in noRecord indicates that there are no more records to process in the record set.

      If either of these situations is true, then the workflow process ends.

      In this example, the value for NumAcceptedRecords is 1 and noRecord is false. Siebel CRM runs the Yes connector.

  2. Click Simulate Next.

    The simulator runs the Watch Pre-update Values step, and then highlights the Update Fields step.

    Several values under the Process Properties entry in the Watch window update when this step runs. Four service request fields that Siebel Tools modifies during the example are defined. Writing to the Watch window before and after the Update Fields workflow process step allows you to determine if the workflow process correctly updates the business component fields. The following table describes these values.

    Property

    Value

    Explanation

    SR Close Date

    (empty)

    The search specification on the Query Child workflow process step excludes closed records. The Close Date is empty.

    SR Description

    Test SR

    The test records include Test SR in the Description. This value makes sure that Siebel Tools evaluates only the records that exist in the test record set.

    SR Status

    Open

    The search specification on the Query Child workflow process step:

    • Excludes service requests that are Closed or Cancelled.
    • Includes service requests that are Open, Pending, Field Visit, or Quoted. The record set in this example includes only one record and it is Open.

    noRecord

    false

    The NextRecord operation does not run, so noRecord contains false.

  3. Click Simulate Next.

    The simulator runs the Update Fields step, and then highlights the Watch Post-update Values step. The Update Fields step updates values in three service request fields. Siebel Tools does not display the new values until the workflow process writes the updated information to the Watch window.

  4. Click Simulate Next.

    The simulator runs the Watch Post-update Values step, and then highlights the Read Next Record step. The Watch window displays the updated values for the business component record, as described in the following table.

    Property

    Value

    Description

    SR Close Date

    11/12/2007 14:21:04

    Set by the Input Argument on the Update Fields process step.

    SR Description

    The Status for this service request is set to Cancelled due to the obsolescence for the service request.

    Set by the Input Argument on the Update Fields process step.

    SR Status

    Cancelled

    Set by the Input Argument on the Update Fields process step.

    noRecord

    false

    NextRecord operation is not run, so noRecord still contains false.

  5. Click Simulate Next.

    The simulator runs the Read Next Record step, and then highlights the More Records decision point. Values for the process properties remain constant in the Watch window except for noRecord. The record set includes only one record, so the NextRecord operation sets noRecord to true.

  6. Click Simulate Next.

    The simulator runs the decision point, and then highlights the End workflow process step. To run the simulation again, you must first reset values that the simulation changed in the record set. This simulation modifies one record. You must reset the SR Description for this record to SR Test and reset Status to Open.

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