ActiveBPEL® Designer User’s Guide
To start at the beginning of the tutorial, see Introduction to ActiveBPEL Tutorial.
If you have followed all tutorial parts so far, you have completed a BPEL process definition that contains all the steps for normal and fault processing.
Now you will turn from the design phase to the testing phase by simulating execution of your process.
In the Navigator view of ActiveBPEL, you should have the following files:
By completing Part 8 of the tutorial, you will be able to:
Step 1: Complete the prerequisite checklist for simulation
ActiveBPEL validates your BPEL process before you execute it, adding validation tasks to the Problems view for you to complete. The tasks are broken down into errors, warnings, and information. You must ensure your process is executable, and you must complete all error tasks before running your process.


Step 2: Add sample data values for simple message parts
To simulate process execution, you need to initialize process variables. ActiveBPEL has a convenient way to provide default data values and ways to override the defaults for different test scenarios.
When you add WSDL files to Web References, you can view a list of the defined messages, and then add sample data values for simple message parts. The sample data is available for all processes that use the messages.
creditInformationMessage.
amount message part,
and from the right-mouse menu, select Add Sample.

11000.
amount part. Right-mouse
click on the sample data value of 9000 and
select Default Sample.creditInformationMessage: name and firstName.
Your Web References view should look similar to the following example.

|
Message |
Part |
Value |
|---|---|---|
|
approvalMessage |
accept |
yes |
|
riskAssessmentMessage |
level |
low |
Step 3: Adding a Sample Data File for the ErrorMessage Variable
The errorMessage variable in the loanServicePT.wsdl file
is defined with a schema complex type and requires namespace-qualified
sample data. This means the sample data file must contain the appropriate
references to the data type definition. We will automatically generate
a valid data file using the XML Data Wizard. This wizard uses the
type definition located in error-messages.xsd.
errorMessage.
errorCode message part,
and from the right-mouse menu, select Generate Sample.

errorCode, as shown:

errorCode message
part to see the errorCode.xml file, as shown:

If you wish to view the contents of the data file, right-mouse click it, and select View Sample. The XML file opens in the editor. Close the file when you are done.

Step 4: Display Data Values for Process Variables
In Steps 2 and 3 you added sample data to message parts, making the data available to all processes that reference the WSDL file. The data is used as the default initial values for process variables. As you run simulation, you can inspect process variables to view initialized and changed values.
request,
and from the right-mouse menu, select Open All.

Notice the following visual information cues in the Process Variables view:
approval variable, the accept part
is blue, indicating it is used in a copy operation of an Assign
activity. The icon shows a small yellow arrow pointing inward, indicating
the data is being copied TO the variable.
error variable is two-toned,
indicating is it available only as a fault variable
Tip: There are more icons and symbols for complex schema and message-type variables. The tutorial process uses only simple message types.
Step 5: Simulate Process Execution
If you have completed all previous steps in this part of the tutorial, you are ready to begin simulating execution of your process.


|
1 |
The perspective switches to a debug perspective. |
|
2 |
The beginning activity is highlighted |
|
3 |
The current variable is highlighted |
|
4 |
The sample data is cleared |
|
5 |
The Debug view is opened to run and step through a process |
|
6 |
The Console is opened to report simulation events |


Step 6: Clear the Process Execution State
Step 7: Override Default Values for Different Test Scenarios
The simulation path went through the loan assessor’s service using the default sample data value of 9000. To test the loan approver’s path, do the following.
amount row, click next to 9000,
and then select the Dialog button.
11000.
The Set Simulation Data dialog should look like the following example.


request variable in
Process Variables view to see the data value used.
Step 8: Simulate Fault Handling
In the loan approval process, a fault is thrown if the loan approver’s service cannot handle the customer request. In Tutorial Part 6: Adding Fault Handling, you added a fault handler to catch this fault and send a reply containing an error code. We will simulate this.
loanProcessFault.


Tip: You can also simulate fault handling for the loan assessor service. The same fault message is defined for both the loan approver and the loan assessor service.
To simulate fault handling for the loan assessor service, select the Invoke Assessor activity and set the Result property to Fault. Change the sample data value to be less than 10000 and re-simulate.
Continue to Tutorial Part 9: Deploying the Process.
Copyright (c) 2004-2007 Active Endpoints, Inc.