Designer > Simulation and Debugging > Simulating Execution of a BPEL Process

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:

Starting and Ending Simulation of a BPEL Process

To simulate your process:
  1. 1. Open your BPEL file.
  2. 2. Click your mouse in the Process Editor canvas to activate the editor toolbar.
  3. 3. Select the Simulate Process icon on the toolbar, as shown.
  4. 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.
  5. 4. In the Debug view, do one of the following:
As the process executes, the following events occur:
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. 1. Select a process in the Debug view.
  2. 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.

Viewing the Execution State of an Activity or Link

During simulation and remote debugging, BPEL activities and links can have one of the following states:
During simulation, BPEL activities and links can have one of the following states:
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.
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.
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.