Designer > Simulation and Debugging > Supplying and Inspecting Sample Variable Data During Simulation

Supplying and Inspecting Sample Variable Data During Simulation

Before beginning simulation, you must initialize certain input and output variables with sample data values. The idea is to simulate the actual data that a running process would normally receive and send. Namely, you add sample data values for the following variables:
Process Developer offers several ways for you to supply sample data values for process variables. When you simulate process execution, you can use different data values to test different execution paths in your process.
Add, load, and change sample data as follows:
Add sample data files for message data
In Participants view, you can view WSDL messages and then add one or more sample data files per message. One data file per message defines default values for the message parts. For a discussion of adding sample data, see Using Sample Data for WSDL Messages.
Select default values for message data
If you add multiple data files to messages, you can specify one file as the default. See Selecting a Default Sample Data File.
Change default values for process variables used in receive, invoke, onMessage, and onEvent activities
As you simulate execution of a process, you can override the default data values for input, output, and fault messages. For more information, see Setting up Sample Data Values for Input, Output, and Fault Messages.
Load sample data values to initialize process variables
For a specific BPEL process, you can type in data values or load a data file for each process variable. For more information, see Using Sample Data in Process Variables View.
During process simulation, you can view variable assignments. For more information, see Inspecting Process Variables during Simulation.

Setting Up Sample Data Values for Input Output and Fault Messages

Select the source location for the sample you want to add.
You can simulate execution with different data values that might be received by the process from receive, invoke, onMessage, and onEvent activities. You can load sample values from either the Participants or Process Variables view or the Properties view of an activity.
If you have created sample data files in the Project Explorer, in the sample-data folder, you can select a data file during simulation. For a message that is missing sample data, a Sample Data dialog displays appropriate selection, as shown in the example.
You can load sample data before you begin simulation. For information on loading and saving sample data in the Participants or Process Variables view, see Using Sample Data in Process Variables View.
During simulation, you can override data values on-the-fly for any activity that has not yet executed.
To override loaded sample data for an input and output messages:
  1. 1. From the Process Editor canvas, select a Receive, Invoke, onMessage, or onEvent activity.
  2. 2. In the Properties view, select the All tab and do one of the following:
  3. 3. In the Set Simulation Data dialog, do the following:
  4. 4. For simple data types, edit the data value in the Sample dialog and click OK. For complex message types, load a data file.
  5. 5. Edit any additional values for other message parts and click OK.
To override loaded sample data for an invoke fault message:
  1. 1. From the Process Editor canvas, select an Invoke activity that has an output and a fault message defined.
  2. 2. In the Properties view, set the Result property to Fault.
  3. 3. Select a Fault Name from the list.
  4. 4. Select a Fault Message, and click Dialog (...) .
  5. 5. In the Set Sample Data dialog, type in a value for the fault message.

Inspecting Process Variables during Simulation

During simulation, as each activity executes, you can inspect variable values in the Process Variables view. The values are those you loaded into Process Variables or into the simulation properties for receives, invokes, onMessage branches of picks and onEvent branches of event handlers. For information on loading and changing data values, see Supplying and Inspecting Sample Variable Data During Simulation.
Here is a recommended way to inspect variable values, by opening and closing variables as you need to.
  1. 1. Display the Process Variables view.
  2. Tip: Display the list of variables with all variables closed. To close all variables, select a variable from the list, and select Close All from the right-mouse menu.
  3. 2. Start simulation. For details, see Simulating Execution of a BPEL Process.
  4. 3. Step to the first receive or onMessage branch of a pick activity. For more information, see Stepping to the Next Activity in a BPEL Simulation.
  5. 4. In Process Variables view, double-click the highlighted variable to open it.
  6. 5. Right-mouse click the variable and select View Data.
  7. 6. Notice that the data view of open variable that is in use shows the current data.
  8. 7. Step to the next activity to execute the current activity. As you step through, open variables in data view to inspect the current value.