9Testing a Workflow Process

Testing a Workflow Process

This chapter describes how to test a workflow process. It includes the following topics:

For more information about developing planning strategies for testing the Siebel application, see Testing Siebel Business Applications.

About the Testing Tools

This topic describes tools you can use to test a workflow process. It includes the following topics:

    Validate Tool

    The Validate Tool is an error correction tool that you can use before you simulate or deploy a workflow process. It enforces the semantic consistency of a workflow process. For example, you can use validation to make sure an error workflow process does not itself contain an error workflow process. When you validate a workflow process, Siebel Tools displays warnings that describe errors that the workflow process contains. The validation dialog box allows you to fix errors before you run the Process Simulator or deliver the workspace. This dialog box is modeless which means that you can keep it open to view the error messages while you use the Process Designer to correct the problems that the dialog box reports. You can proceed with deployment without fixing these validation errors.

    You can do one of the following to start the validate tool:

    • Use the right-click menu in the Process Designer or the Workflow Processes list.

    • Use the Publish button or the Publish/Activate button on the WF/Task Editor Toolbar. For more information, see Using the Workflow Task Editor Toolbar.

    For more information, see:

      Process Simulator

      The Process Simulator is a simulation tool that allows you to step through a workflow process while you view the results of each step. Simulating a workflow process before you deploy it to your production environment helps to verify that the workflow process produces the expected results.

      For more information about:

        Using the Process Simulator with Different Workflow Modes

        You can use the Process Simulator to test most workflow processes in Siebel Tools. You can use it to test a workflow process that runs in the Siebel client, including a service workflow process, a 7.0 flow workflow process, an interactive workflow process, or a workflow process that a run-time event starts. You cannot use the Process Simulator to test a long-running workflow process or a workflow process that involves a server component.

          Using the Process Simulator with a Server Component

          You cannot use the Process Simulator to test a workflow process that involves a server component. For example:

          • Workflow Process Manager

          • Server Request Broker

          • Assignment Manager

          • Communications Server

          If a workflow process that involves a server component runs in the Process Simulator, then incorrect behavior results. To test a workflow process that involves a server component, you must deploy it to the run-time environment, and then test it in a Siebel client that is connected to the Siebel Server.

            Using the Process Simulator to Start a Workflow Process

            You can use the Process Simulator to start a workflow process in Siebel Tools, and then immediately test and debug it. You can debug workflow process steps while you define them in Siebel Tools.

            If you use the Process Simulator to start a workflow process, then Siebel Tools can run it in the Application Object Manager (AOM) or in the Workflow Process Manager server session, depending on specific parameters. Because some workflow processes that can run in the Workflow Process Manager server session might not run correctly in the Application Object Manager, it is possible that you cannot simulate every workflow process.

            For more information, see Starting a Workflow Process.

              Preparing the Simulator for Use with a Script

              You can use the Process Simulator with a workflow process that references a business service or a business component that contains a script. If this script includes a breakpoint, and if the Arguments field in the Siebel Tools debug configuration contains /h, then the simulator might not perform as expected. A breakpoint is a marker on a line of Basic code that instructs Basic to pause at that line so that the Siebel Debugger can examine the program state. The /h argument instructs the Siebel Debugger to open the Watch window.

              To prepare the simulator for use with a script
              1. Remove every breakpoint from the script that resides on a business service or a business component that the workflow process references.

              2. Remove the /h argument from the Siebel Tools debug configuration:

                • Choose the View menu, then the Options menu item.

                • Click the Debug tab.

                • Remove the /h argument from the Argument field.

                For more information, see Using Siebel Tools.

                Using the Watch Window

                The Process Simulator includes a Watch window that dynamically displays values for the business component and process properties of the workflow process. For more information about:

                To use the watch window
                1. Click Start Simulation, and then wait for the Siebel client to start and return control to Siebel Tools.

                2. Right-click the canvas of the Process Simulator, and then click Watch Window.

                  The left column in the Watch window displays the name of the property set type. The right column displays the current value for the property. The Watch window is not available until after you do the step above. You must start the simulation and wait for control to return to Siebel Tools before you open the Watch window.

                  Guidelines for Using the Watch Window

                  If you use the Watch window, then it is recommended that you use the following guidelines:

                  • To hide the Watch window, right-click it, and then click Hide Watch Window.

                  • If the Watch window is empty, then right-click the Process Simulator canvas, and then click Watch Window, which refreshes the display.

                  • You can open the Watch window in the Process Simulator or you can choose the View menu, Debug Windows, and then the Watch menu item.

                    Property Set of the Watch Window

                    Siebel Tools displays values that the simulation modifies in the Watch window as each step finishes during the simulation. The following table describes information that is available in the Watch window.

                    Table Property Set of the Watch Window

                    Property Set Description

                    Simulator Status

                    Displays real-time status information for the simulation.

                    For example, Step Completed or Simulation Ended Successfully.

                    Process Properties

                    Displays the current value for each process property that is defined for the workflow process.

                    For example, the value 7-4HWSV displays for the Object Id process property.

                    BusComp

                    Displays business component user data for fields in the business component for the record that the simulator is currently processing.

                    For example, the value 40000 displays for the Revenue field.

                      Business Service Simulator

                      A workflow process can run as a business service from the Business Service Simulator in the Siebel client. You can use the Business Service Simulator if you must debug a script that a workflow process uses. You can set breakpoints in the script, and then run the workflow process in the Siebel Mobile Web Client. If the workflow process runs a business service, and if a breakpoint is set, then Siebel CRM returns control to the Script Debugger in Siebel Tools.

                      You must do the following to use the Business Service Simulator:

                      • You must publish and activate the workflow process before you can use the Business Service Simulator. You can publish and activate the workflow process to the Siebel Mobile Web Client directly from Siebel Tools.

                      • You must install the Siebel Mobile Web Client.

                        Alternatively, you can publish and activate the workflow process to the Siebel Mobile Web Client directly from Siebel Tools.

                      For more information about using the Business Service Simulator, see Diagnosing a Workflow Process That Has Failed.

                        Event Logs

                        You can set monitoring levels for event logs so that you can view detailed information about a workflow process. This information is useful if you cannot perform real-time debugging or if the Process Simulator is not available. Event logs can result in large log files. For more information, see Setting Monitoring Levels for Tracing and the Event Log. For information about using the Log File Analyzer, see Siebel System Monitoring and Diagnostics Guide.

                          Process of Testing a Workflow

                          This process is a step in Roadmap for Developing Workflow Processes.

                          To test a workflow process, do the following tasks:

                          1. Validating the Workflow Process

                          2. Preparing to Use the Process Simulator

                          3. Using the Process Simulator

                          4. Verifying Functionality

                          Before you deploy a workflow process, you must test it to verify that the workflow process you release to the production environment runs properly and does not cause conflicts with another workflow process. You can use the following guidelines to set up your test environment:

                          • Make sure the test environment and production environment contain identical software versions.

                          • To use realistic data, use a partial or full copy of the production database

                          For more information about:

                            Validating the Workflow Process

                            This task is a step in Process of Testing a Workflow.

                            You can validate a workflow process.

                            To validate a workflow process

                            1. Locate the workflow process you must validate.

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

                            2. Right-click the workflow process, and then click Validate.

                            3. In the Validate dialog, click Start.

                              Siebel Tools displays the following message in the bottom left corner of the Validate dialog box:

                              Starting validation
                              
                            4. If the validation is successful, then there are no errors to report and Siebel Tools displays the following message in the bottom left corner of the dialog box:

                              Total tests failed: 0
                              
                            5. If the validation is not successful, then Siebel Tools displays a list of errors and the rules that each error violates. You can correct or ignore the rule.

                              For more information, see Ignoring a Validation Rule.

                              Every error is not fatal. Some errors are only warnings. For more information, see Troubleshooting a Problem That Occurs During Validation.

                              Ignoring a Validation Rule

                              If the Rule column in the Validate dialog box contains the number 98, then you must correct the rule. Siebel Tools uses the number 98 to identify an error that you must correct and cannot ignore. If the Rule column in the Validate dialog box does not contain 98, then you can ignore the rule.

                              To ignore a validation rule
                              1. In the Validate dialog box, click Options.

                              2. Locate the rule that Siebel Tools validated.

                                For example, if the Rule column in the Validate dialog box contains the number 1, then in the Validation Options dialog box you can locate the rule that contains the number 1 in the Rule column.

                              3. Click Ignore.

                                Preparing to Use the Process Simulator

                                This task is a step in Process of Testing a Workflow.

                                In this task, you prepare to use the process simulator.

                                To prepare to use the process simulator

                                1. Make sure the Siebel Mobile Web Client is installed.

                                  The Siebel Mobile Web Client can connect to a development database or local database that contains the test data that Siebel CRM uses to debug a workflow process.

                                2. If necessary, publish subprocesses that the workflow process you are simulating calls.

                                  To avoid a validation error, you must publish and activate subprocesses that the workflow process you are simulating calls. For more information, see Publishing a Workflow Process.

                                3. If necessary, display the simulate toolbar.

                                  For more information, see Preparing Siebel Tools to Develop a Workflow Process.

                                4. Choose the View menu, then the Options menu item.

                                5. Click the Debug tab.

                                6. Define the fields in the Debug tab using values from the following table, where $ represents settings that are specific to your setup.

                                  Field

                                  Value

                                  Executable

                                  $SiebelClient\BIN\siebel.exe

                                  Make sure you enter the full path for the siebel.exe file.

                                  CFG file

                                  $SiebelClient\BIN\ENU\uagent.cfg

                                  Make sure you enter the full path for the uagent.cfg configuration file.

                                  Browser

                                  $\Program Files\Internet Explorer\iexplore.exe

                                  Working directory

                                  $SiebelClient\BIN

                                  Arguments

                                  /h

                                  User name

                                  $username

                                  Password

                                  $password

                                  Data source

                                  $datasource

                                7. Click OK.

                                  Using the Process Simulator

                                  This task is a step in Process of Testing a Workflow.

                                  In this task, you run the Process Simulator on a workflow process.

                                  For more information about:

                                  Caution: It is recommended that you use a test database to test your workflow process. If you use the Process Simulator to test a workflow process, then the workflow process runs the same as if Siebel CRM calls it in a production environment. For example, if the workflow process includes a Siebel operation step that updates records, then Siebel Tools updates records in the Siebel database when you run the Process Simulator.

                                  To use the process simulator

                                  1. Close every Siebel client session.

                                    To avoid encountering a multiple client session error, you must close every client session before you start the Process Simulator. If a Siebel client session is running, then you cannot start the Process Simulator.

                                  2. Make sure the Microsoft Taskbar does not include any Siebel client icons.

                                  3. In Siebel Tools, locate the workflow process you must modify.

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

                                  4. Right-click the Workflow Process.

                                    You can also start the simulator in the Process Designer. To do this, start the Process Designer for the workflow process you must simulate, right-click the canvas of the Process Designer, and then click Simulate.

                                  5. Choose Simulate Workflow Process.

                                    Siebel Tools opens the Process Simulator. It displays a read only version of the workflow process with a pale yellow canvas, highlights the start step, and makes the Start Simulation button on the Simulate toolbar active.

                                  6. In the Simulate toolbar, click Start Simulation.

                                    Siebel Tools displays the Simulation In Progress dialog box momentarily.

                                  7. Observe the Siebel client start, and then wait for control to return to Siebel Tools.

                                    The simulator starts a new instance of the Siebel client according to the debug settings you entered in Preparing to Use the Process Simulator. You use this Siebel client instance as the run-time environment for the simulation. You are not required to do any other work in this Siebel client instance unless the simulated workflow process is an interactive workflow process. For more information, see Simulating an Interactive Workflow Process.

                                    After the Siebel client starts, the Simulation In Progress dialog box disappears, control passes back to Siebel Tools, the start step runs, and then control pauses at the next step in the workflow process. If the first step runs as expected, then Siebel Tools highlights the next workflow process step in the Process Simulator view.

                                  8. In the Simulate toolbar, click Simulate Next to run the highlighted step.

                                  9. Continue clicking Simulate Next until the last step finishes.

                                    As you step through the workflow process, you can examine results of each step in the Watch window until the workflow process finishes. For more information, see Using the Watch Window.

                                  10. If the workflow process does not run as expected, then correct the problem, and then restart the simulation in step 6.

                                    For more information, see Troubleshooting a Problem That Occurs During Simulation.

                                  11. Optional. Examine test results in the Siebel client.

                                    If the workflow process modifies record data, you might be able to examine test results in the Siebel client. For an example, see Simulating the Workflow Process.

                                  12. Close the Simulator window.

                                  After the last step of the workflow process runs, the simulation automatically ends. You can also use the Stop Simulation button to stop the simulation before the last step runs.

                                    Guidelines for Using the Process Simulator

                                    If you use the Process Simulator, then it is recommended that you use the following guidelines:

                                    • If the workflow process does not contain a user interact step, then do not navigate or click UI elements in the Siebel client while the Process Simulator runs. If you must navigate in the Siebel client, then it might be necessary for you to close the Siebel client and Siebel Tools, open Siebel Tools, and then run the Process Simulator again.

                                    • In Siebel Tools, do not navigate outside of the Process Designer while the Process Simulator runs.

                                    • It might be necessary to ALT+TAB back to Siebel Tools to proceed with the simulation after the Siebel client starts.

                                    • You can use the Process Designer to change values in step properties, and then return to the Process Simulator to test the workflow process. To change values in step properties, you must stop the Process Simulator, change these values, and then restart the simulation.

                                    • You can hide the Object Explorer and the Properties window so that you can view your work in Siebel Tools. You can resize the Siebel Tools window so that it covers only a part of the display area.

                                    • If you define a wait step in seconds, then the Workflow Process Simulator simulates a wait period according to the number of seconds that you define for this wait step. If you define the unit of time in minutes or greater, then the Simulator continues to the next step.

                                    • It is not necessary for a workflow process to be active to run it in the Process Simulator. The simulator ignores activation date, expiration date, and status.

                                      Simulating an Interactive Workflow Process

                                      If you use the Process Simulator to simulate an interactive workflow process, then you must perform some actions in the Siebel client while the simulator runs.

                                      To simulate an interactive workflow process
                                      1. If the Process Simulator highlights a user interact step, then click Simulate Next.

                                        Siebel CRM displays the view that the user interact step references in the Siebel client.

                                      2. Switch to the Siebel client, and then make sure the run-time event runs in the client according to the definition for the user interact step.

                                        Siebel CRM passes control back to Siebel Tools after the user interact step runs successfully in the Siebel client. The Process Simulator then moves to the next step in the workflow process.

                                        Verifying Functionality

                                        This task is a step in Process of Testing a Workflow.

                                        To finish testing a workflow process, you can verify that it meets your business requirements. This work includes manipulating data in the Siebel client, and then verifying that the functionality matches the work you complete during the planning phase. For an example, see Creating the Child Business Component.

                                          Troubleshooting Validation and Simulation Problems

                                          This topic describes guidelines for resolving validation and simulation problems.

                                            Troubleshooting a Problem That Occurs During Validation

                                            To resolve a problem that the Validate tool finds, look for it in the Symptoms column in the following table.

                                            Table Problems That Occur During Validation

                                            Symptom Diagnostic Steps or Cause Solution

                                            Connector is not attached correctly.

                                            Not applicable

                                            Make sure you connect the connectors for the workflow process correctly.

                                            Conditional branch is not defined for a Decision point.

                                            Not applicable

                                            Make sure you define at least one conditional branch that emanates from each decision point in the workflow process.

                                            Business service and business service method are not defined for a business service step.

                                            Not applicable

                                            Make sure each business service step in the workflow process is not missing a business service or a business service method.

                                            Business component is missing from a Siebel Operation step.

                                            Not applicable

                                            Make sure each Siebel operation references a business component.

                                            Name of the subprocess is not defined for a sub process step.

                                            Not applicable

                                            Make sure each sub process step references a subprocess.

                                              Troubleshooting a Problem That Occurs During Simulation

                                              To resolve a problem that occurs during simulation, look for it in the Symptom column in the following table.

                                              Table Problems That Occur During Simulation

                                              Symptom Diagnostic Steps or Cause Solution

                                              When attempting to start a simulation, the Process Simulator does not run.

                                              If a run-time event is defined on the connector that emanates from a start step, then the simulator waits for the event and never reaches the next step.

                                              Do one of the following:

                                              • Remove the run-time event from the simulation.

                                              • Add a Default branch. It is recommended that you define two branches:

                                                • One branch with Type set to Condition that waits for the run-time event

                                                • One branch with Type set to Default

                                              When attempting to rerun the Process Simulator, an error dialog displays one of the following messages:

                                              • Still waiting on Workflow Process Simulator
                                              • The run-time client is not responding

                                              Navigating in the Siebel client during or after running the Process Simulator can cause a failure during subsequent attempts at running the simulator.

                                              Do not navigate in the Siebel client while the Process Simulator runs or after it ends. For more information, see Guidelines for Using the Process Simulator.

                                              After completing the user interact step, the Process Simulator fails to proceed to the next step in the workflow process.

                                              A branch from a user interact step might be missing an associated run-time event.

                                              Make sure the branches from the user interact step reference the run-time events that are associated with actions that the user performs on the user interact step.

                                              After the Siebel client starts, control does not return to Siebel Tools or a dialog box in Siebel Tools indicates that the client is still starting, even after a long wait.

                                              Not applicable

                                              Restart processes that are currently running. For more information, see Restarting the dbeng9.exe and siebel.exe Processes.

                                              An error message that is similar to the following message displays while the simulation runs:

                                              Error loading siebel 
                                              operation step 
                                              definition step_name. 
                                              The defined step 
                                              definition is not 
                                              valid.
                                              

                                              Errors in the workflow process configuration can occur during the simulation. These errors can result from errors in how objects are defined or how the workflow process uses objects.

                                              Close the Process Simulator, correct the configuration errors, and then run the simulation again.

                                                Restarting the dbeng9.exe and siebel.exe Processes

                                                This topic describes how to restart the dbeng9.exe and siebel.exe processes.

                                                To restart the dbeng9.exe and siebel.exe processes

                                                1. Log out of the Siebel client session and close Siebel Tools.

                                                2. Open Windows task manager.

                                                3. Click the Processes tab, right-click the dbeng9.exe Image Name, choose End Process, and then click Yes.

                                                4. Right-click the siebel.exe Image Name, choose End Process, and then click Yes.

                                                5. Restart Siebel Tools, and then run the simulation again.