ActiveBPEL® Designer User’s Guide
You have now completed:
In the Project Explorer view, you should have the following:
By completing Part 5 of the tutorial, you will be able to:
Step 1: Use the Outline view to add and select building blocks
The Outline view displays all major components of a BPEL process. The Outline view shown on the left is the default for a new process, containing only the parent nodes. Your Outline should look like the one on the right. By starting your process using Interfaces, you have automatically added the appropriate namespace, partner links, variables, and several activities.
|
|
|

Tip: You can move items up and down to reorganize them. You can right-mouse click on a node to add new items of the same type.
Step 2: Rename a Namespace Prefix
Each WSDL and schema file declares one or more namespaces that provide a context for messages, port types, and other definitions. The namespaces that are declared in the schema and WSDL files that your process references must also be declared in the process itself.
Because one namespace can have many WSDL files associated with it, ActiveBPEL identifies the correct WSDL file by using the Imports function. The Operation wizard automatically added the import, and added a default namespace prefix, which you can rename to make it more meaningful.

loan prefix and the loanmsg prefix
are two of the namespaces the Operation wizard added.
The wizard checks for namespace prefixes declared in WSDLs
and adds them to the process. The loanProcess.wsdl declares loan for
the loanRequest.xsd URI and loanmsg for loanMessages.wsdl URI.
loanprocess in
the Prefix field to provide a shortcut for
the loanProcess.wsdl URI.
|
WSDL name |
New Prefix |
|---|---|
|
riskAssessment.wsdl |
|
|
loanApproval.wsdl |
|
|
WSDL/XSD name |
Prefix |
|---|---|
|
loanRequest.xsd |
|
|
loanProcess.wsdl |
|
|
loanMessages.wsdl |
|
|
riskAssessment.wsdl |
|
|
loanApproval.wsdl |
|
Tip: All new processes contain two common namespaces. The xsd namespace defines the location of the XML schema. The bpel namespace defines the location of the BPEL schema.
Step 3: Use a Shortcut to Automatically Create an Assign Activity
There are two more activities the process needs: Assign activities. In the loan approval process, the assessor must assign an approve or deny message to be sent in the Reply to the loan requestor. An Assign accomplishes this through a Copy Operation.
Within the Process Variables view, you can create a Copy Operation automatically. The Copy Operation copies a literal value to the approval message.
approval variable,
and select Open.
approval message,
and select Copy> To, as the illustration shows.
Note: The Copy >To option means create the TO side of the Copy Operation.


Your excellent credit has earned
you automatic approval for your loan!AssignApprove.
approval variable
and select Copy> To.
<loan:loanApprovalResponse xmlns:loan="http://schemas.active-endpoints.com/sample/LoanRequest/2008/02/loanRequest.xsd">
<loan:responseToLoanRequest>
declined
</loan:responseToLoanRequest>
<loan:responseDescription>We are sorry,
this application falls outside of our
credit risk guidelines.
</loan:responseDescription>
<loan:rejectionReason>
<loan:reason>lowCredit</loan:reason>
<loan:description>low credit score
</loan:description>
</loan:rejectionReason>
</loan:loanApprovalResponse>
AssignDeny.

Tips: Be sure to move and deselect the first Assign activity before creating the second one. New Assigns created from Process Variables are always added to the upper left corner of the canvas. If you did not create two Assigns, double-click the first one to see if you created two Copy Operations within it.
Step 4: Add Links for Sequencing Activities
Depending on the loan amount in the request, either the loan assessor’s Web service or the loan approver’s Web service is invoked. Our process implements this logic by linking the Receive to both Invokes. Since the sequence is conditional, a transition condition will be added to both links in Step 5.
receive-to-assess.
receive-to-approve.
Step 5: Add a Transition Condition to Links
receive-to-assess link
in the Process Editor.
amountRequested part
of the creditInformation variable to add
the appropriate expression to the Transition box.
10000, as shown in the following
example. Click OK.

receive-to-approve link,
add the expression as follows:
$creditInformation/loan:amountRequested >= 10000
Step 6: Add links and link transitions for the InvokeRiskAssessor and InvokeLoanApprover
The Loan Assessor returns a result of review, high risk, or low risk for the customer. Build the links and transition conditions as follows:
assess-to-approve.
$riskAssessment/loan:riskAssessment =
'review'$riskAssessment/loan:riskAssessment
= 'low'$riskAssessment/loan:riskAssessment
= 'high'Do not add any link transitions to these links.
Your process should look similar to the following illustration. See the visual tips below the illustration.

Visual Tips:
Step 7: View the Create Instance property for the Receive activity
The Receive is the activity that kicks off the process, so you ensure that the Create Instance property is enabled. Designer automatically adds the Create Instance property to the first Receive (or other start) activity that you add to the process.
Step 8: Save your file and validate your process
If any errors are listed, double-click the error to go to the source of the error. You can also compare your file to loanprocesscompleted.bpel to discover any differences.
You have completed the main process definition.
Continue to Tutorial Part 6: Adding Fault Handling.
Copyright (c) 2004-2008 Active Endpoints, Inc.