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:
How the Process Simulator works, see Architecture You Use to Simulate a Workflow Process.
How to use the Process Simulator, see Preparing to Use the Process Simulator.
Using the Business Service Simulator in situations where you cannot use the Process Simulator, see Business Service Simulator.
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
Remove every breakpoint from the script that resides on a business service or a business component that the workflow process references.
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:
An example that uses the watch window, see Preparing Test Records.
Using the watch window in conjunction with the Workflow Utilities business service, see Workflow Utilities Business Service.
To use the watch window
Click Start Simulation, and then wait for the Siebel client to start and return control to Siebel Tools.
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:
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:
Validation and simulation tools, see About the Testing Tools
Example that includes detailed instructions, see Preparing Test Records
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
Locate the workflow process you must validate.
For more information, see Locating a Workflow Process in the Workflow Processes List.
Right-click the workflow process, and then click Validate.
In the Validate dialog, click Start.
Siebel Tools displays the following message in the bottom left corner of the Validate dialog box:
Starting validation
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
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
In the Validate dialog box, click Options.
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.
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
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.
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.
If necessary, display the simulate toolbar.
For more information, see Preparing Siebel Tools to Develop a Workflow Process.
Choose the View menu, then the Options menu item.
Click the Debug tab.
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
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:
Usage guidelines, see Guidelines for Using the Process Simulator
Examples that use the simulator, see Preparing Test Records, and Preparing Example Data for the Simulation
To use the process simulator
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.
Make sure the Microsoft Taskbar does not include any Siebel client icons.
In Siebel Tools, locate the workflow process you must modify.
For more information, see Locating a Workflow Process in the Workflow Processes List.
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.
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.
In the Simulate toolbar, click Start Simulation.
Siebel Tools displays the Simulation In Progress dialog box momentarily.
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.
In the Simulate toolbar, click Simulate Next to run the highlighted step.
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.
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.
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.
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
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.
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:
|
When attempting to rerun the Process Simulator, an error dialog displays one of the following messages:
|
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
Log out of the Siebel client session and close Siebel Tools.
Open Windows task manager.
Click the Processes tab, right-click the dbeng9.exe Image Name, choose End Process, and then click Yes.
Right-click the siebel.exe Image Name, choose End Process, and then click Yes.
Restart Siebel Tools, and then run the simulation again.