ActiveVOS 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, shown displays all major components of a BPEL process. The Outline view shown on the left, in the following illustration, 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 participants, you have automatically added the appropriate namespace, participants, 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, ActiveVOS identifies the correct WSDL file by using the Imports function. The import is automatically added when you create a participant, and a default namespace prefix is also added, which you can rename to make it more meaningful.

loan prefix and the loanMessages prefix
are two of the namespaces added.
ActiveVOS creates namespace prefixes based on WSDL filenames
and adds them to the process. The loanProcess.wsdl generates
the loan prefix the loanRequest.xsd file
and loanMessages for loanMessages.wsdl file.
|
WSDL/XSD file from the Namespace URI |
Prefix |
|---|---|
|
loanRequest.xsd |
|
|
loanMessages.wsdl |
|
|
loanProcess.wsdl |
|
|
riskAssessment.wsdl |
|
|
loanApproval.wsdl |
|
Tip: All new processes contain common namespaces. The xsd namespace defines the location of the XML schema. The bpel namespace defines the location of the BPEL schema. ActiveVOS adds other namespaces used internally by the process.
Step 3: Adding Programming Logic with an If Activity
The risk assessment determines who is a high risk or low risk, or who needs more review. These conditions will be represented with a control flow activity, the If activity.

Note that the activity is already structured with If and Else conditional paths. The else condition is indicated with a slash at the beginning of its path.

large loan or review risk.
Tip: Click once to select the label and then click the text to edit it.
low risk.
Be sure to label the two if conditions in order, left to right. The left-most condition is evaluated first at runtime, as we will see later.
high risk.
what
is risk level.
Your process should now look like the following:

Step 4: Create Conditional Expressions
We will add conditional processing for each If Condition path.
low risk to
open the If Expression Builder, as shown.

riskAssessment variable
and double-click the riskAssessment part
to add the appropriate expression to the If Expression box.
$riskAssessment/loan:riskAssessment
= 'low' This is shown in the following example.

large loan or review risk condition,
create an expression for two conditions:
creditInformation message,
and double-click the amountRequested part.
$creditInformation/loan:amountRequested >= 10000
or $riskAssessment/loan:riskAssessment = 'review'

Step 5: Create the reply for the low risk condition
If the customer requests less than $10,000 and is a low risk, the customer will be approved for a loan. We will create a reply with this message.


Your excellent
credit has earned you automatic approval for your loan.
<loan:loanApprovalResponse xmlns:loan="http://schemas.active-endpoints.com/sample/LoanRequest/2008/02/loanRequest.xsd">
<loan:responseToLoanRequest>approved
</loan:responseToLoanRequest>
<loan:responseDescription>Your excellent credit has earned you automatic approval for your loan.
</loan:responseDescription>
</loan:loanApprovalResponse>

Step 5: Create the reply for the high risk condition
The reply for the high risk customer is created with almost identical steps used for the low risk customer. So we’ll take a shortcut and make a copy of the approve reply to create the deny reply.
Deny. The Participant and
Operation are already filled in.
<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>

Step 6: Create the invoke loan approver activity
We have one more path to complete for the If activity: the case where the loan request is large or the customer’s risk level could not be determined by the risk assessment service.
Recall that earlier we created two partner services for the process. We are already using the risk assessment service via the risk assessment invoke activity. Now we will use the loan approval service.
LoanApproval partner.
LoanApproval to view the approve operation.
approve operation to the
bounding box of the large loan or review risk condition.
A new invoke activity is created, as shown.

Invoke
Loan Approval.
creditInformation.
approval.
Step 8: Add the Loan Approval reply
Select the Return Approval Response reply and drag it into the bounding box containing the new invoke activity. Be sure to move the activity very close to the bottom of the invoke activity to place it in sequence inside the bounding box.
Notice that the process now has three discrete end activities, clarifying the process flow.
Your completed process definition should look like the following.

Step 9: View the Create Instance property for the Receive activity
The Receive is the activity that kicks off the process, so you want to ensure that the Create Instance property is enabled. Designer automatically adds the Create Instance property to the Receive (or other start) activity that you add to the process.
Step 10: Save your file and validate your process
If any errors are listed, double-click the error to go to the source of the error.
Tip: You can compare your file to tutorialCompleted.bpel to discover any differences. To open a completed version of the tutorial, select File>New>Orchestration Project, name the project, click Next, and then select the Template Tutorial Completed.
Note that the tutorialCompleted.bpel file has one difference: The sequence surrounding the process has been removed by using the Ungroup right-mouse menu option.
You have completed the main process definition.
Continue to Tutorial Part 6: Adding Fault Handling.
Copyright (c) 2004-2011 Active Endpoints, Inc.