Simulating Execution of a BPEL Process
After designing but before deploying a BPEL process to a server, you can simulate execution in the Process Developer.
To simulate, you must have a valid process, and you must supply certain input and output sample data values to simulate data that a running process would normally receive and send.
Ensure you are ready to simulate execution of your process. See
Prerequisites for Simulation. You can start simulation from either the Process Developer or the Debug perspective.
Select a topic for more information:
Prerequisites for Simulation
Before starting simulation, do the following:
- •Ensure that you have filled in all the required properties for each activity, such as partner link, operation and variable (or fromPart) for receives, picks, invokes (or toPart), and replies
- •Ensure that the Abstract Process property is set to No for the process. The default is No.
- •Make sample data available for the input, fault, and output variables that a running process would receive and send. For more information, see Supplying and Inspecting Sample Variable Data During Simulation.
- •If your process contains a Pick activity, you can select a branch to execute. For more information, see Selecting Simulation Paths and Properties.
Starting and Ending Simulation of a BPEL Process
To simulate your process:
- 1. Open your BPEL file.
- 2. Click your mouse in the Process Editor canvas to activate the editor toolbar.
- 3. Select the Simulate Process icon on the toolbar, as shown.
The simulation target stops at the first activity in the process and suspends execution. If you have not added sample data you are prompted to add it.
- 4. In the Debug view, do one of the following:
- - Click the Resume icon to run to completion or to a breakpoint
- - Click the Step Over icon (F6 key) to step to the next activity or breakpoint
- - Click the Step Into icon (F5 key) to step into a container such as a while, if, or for each
As the process executes, the following events occur:
- •Each activity is highlighted as it prepares to execute
- •If necessary, messages appear to instruct you to add missing sample data
- •In Process Variables view, sample data is cleared at the beginning of simulation and then is displayed as the corresponding activities execute
- •The Console view shows simulation events
- •The Outline view shows execution of all activities, some of which can be hidden on the canvas
- •If an error occurs, an error message pops up, the simulation terminates, and the activity is marked with an X, as shown in the following illustration. For more information, see Inspecting Standard Faults During Simulation.
You can end a simulation thread by stepping to the end or by terminating it.
You can select Terminate from the context menu of the process's thread in the Debug view to terminate the simulation.
When a simulation terminates, the process diagram shows the simulation path. The illustration above shows both the path taken (highlighted) and not taken (grayed out).
Running to a Breakpoint in a BPEL Process
When you are debugging a BPEL process, the simulation suspends before the first activity is executed.
You can resume execution and run to a breakpoint that you have set next to an activity in a process. See
Using Breakpoints in BPEL Process Simulation for information on setting breakpoints.
To run to a breakpoint:
- 1. Select a process in the Debug view.
- 2. Click the Resume button in the Debug view toolbar (or press the F8 key). The process resumes its execution.
Stepping to the Next Activity in a BPEL Simulation
You can step through the execution of a BPEL process one activity at a time. While you are stepping through the simulation, you can see execution results in the Console. You can also follow the execution path on the canvas as well as the Outline.
Click the Step Over button in the Debug view toolbar, or press the F6 key. The currently-selected activity is executed and suspends on the next executable activity. Alternately, click Step Into (F5 key), which steps into a container, such as a while, if, or for each.
The following illustration shows one step at a time of an execution path.
Tips:
- •If a breakpoint is encountered during a step operation, the execution suspends at the breakpoint, and the step operation ends.
- •If you have used the input, output, or data tab of the Receive, Invoke, Reply activities to map data, use the Outline view to view the progress of step into. These activities have generated scopes with assign activities that are not shown on the canvas, only on the Outline.
Viewing the Execution State of an Activity or Link
- •Inactive
- •Active
- •Ready to execute
- •Executing
- •Dead Path (will not run because of links or conditional execution)
- •Execution Completed (activity only)
- •Execution Faulted (activity only)
You can view the execution state in the Properties view for the activity or link.
Modifying a BPEL Process During Simulation
It is possible for you to make changes to the BPEL process during simulation. For example, you can change sample data values, expressions, correlation property values, and partner link addresses.
For details, see:
The simulator determines whether or not the change causes the process model to be out-of-sync with the process currently being executed.
Terminating and Removing BPEL Process Simulations
Use one of the following options to stop a simulation and to remove a simulation from the Debug view.
Option | Location | Description |
---|
Terminate | Debug view toolbar and Run menu Right mouse menu of simulation thread Console toolbar | Terminates the simulation of the associated process |
Terminate All | Right mouse menu of simulation thread | Terminates all active simulations |
Terminate and Relaunch | Right mouse menu of simulation thread | Terminates the simulation of the associated process and relaunches it |
Terminate and Remove | Right mouse menu of simulation thread | Terminates the simulation of the associated process and removes it from the view |
Remove All Terminated | Debug view toolbar Right mouse menu of simulation thread | Clears all terminated simulations from the view |
Clearing the Process Execution State
When you terminate a BPEL process simulation, the highlighting that had been added to activities and links remains in view in the Process Editor and the simulation state of each activity and link is displayed in Properties view.
To remove highlighting and simulation states, click the Clear Execution State icon, as shown.