Using Sample Data in Process Variables View
Select the source location for the sample you want to add. Select a workspace resource, such as sample data, WSDL, or XSL file.
The sample data values and files you add to WSDL messages are automatically loaded into Process Variables. For use during simulation, you can load sample data for message variables in the Process Variables view. A sample value serves to initialize an input, output, or fault variable for process simulation. These variables must be initialized prior to simulating execution of a process.
There are several ways to add sample values to variables:
- • Adding a Sample Data File to a WSDL Message
If you have added samples to WSDL messages in Participants or Interfaces view, the default sample value from the messages is automatically loaded into message type variables.
- • Editing a Single Sample Data Value for a Simple Type Message Part
If you have added sample data values to simple type message parts in WSDL messages, the default sample value from the messages is automatically loaded into message type variables. You can edit that value, or add a new value in Process Variables view.
- • Generating a Sample Data File
For complex variables, you can generate an XML document based on the root part or element of the variable.
- • Loading a Sample Data File in Process Variables View
For complex variables, you can select an XML document to load. You can edit data from the sample file and then save it or save it as a new file.
Each time you open a variable in the Data view, Process Developer displays the previously loaded data values.
Editing a Single Sample Data Value for a Simple Type Message Part
In the Process Variables view, you can add a sample data value for a simple type message part. When you are ready to test your process, the sample message part value is automatically loaded into your variable. You can also add additional values in Participants or Interfaces view as well as override the value during process simulation. For details, see Adding or Editing a Sample Data Value for a Simple Type Message Part.
To add a single sample data value:
- 1. Open a variable in the Process Variables list.
- 2. Right-mouse click on the variable name or part name, and select Variable > View Data.
- 3. Double-click the variable to open the Edit Sample Data dialog, as shown.
- 4. Type in a value and click OK. Notice that the value is displayed in the Data column of the open variable.
Loading a Sample Data File in Process Variables View
For convenience, you can prepare an XML data file for complex variables and then add the sample in Interfaces view. For details on sample data, see Using Sample Data for WSDL Messages.
To load a sample data file:
- 1. Create an XML file of sample data to represent a message or element structure from a WSDL namespace. The XML file must conform to the schema for the message type or element.
- 2. For convenience, add the sample data to your orchestration project. Samples can be used across BPEL processes. See Generating a Sample Data File and Adding a Sample Data File to a WSDL Message for more information.
- 3. Open a complex variable in the Process Variables list.
- 4. Right-mouse click on the variable name or part name, and select View Data.
- 5. Right-mouse click on a variable part and select Load Data.
- 6. Select one of the following:
- - Registered Samples Default. Select this if you have added a sample data file to re-load the default file, if multiple data files exist, and you have changed the default.
- - From Project File. Select this if you have sample XML files in a Project Explorer project.
- - From Registered Samples. Select this if you have sample XML files for messages in Interfaces view.
- 7. After you select a file, you can expand the complex part to view data values.
Saving and Viewing Sample Data in Process Variables View
View variable data.
Once you have loaded or generated sample data for a complex process variable, you can right-click on the variable part and then save the data into a file or view it in a dialog.
On the variable part context menu, select Save Data As to create a new XML file.
Select View XML Data to open a dialog where you can easily view the variable contents.