In Part 3 of the tutorial, you created a participant for the process role and the associated receive and reply activities. Now you will create the partner services that assess and approve or deny the loan request.
In the Project Explorer view of Process Developer, you should have the following:
Tutorial project
Tutorial/bpel/tutorial.bpel
that you created in Part 1
After completing Part 4 of the tutorial, you will be able to:
Create the risk assessment and loan approval partner service participants.
Create the risk assessment activity.
Step 1: Create the Risk Assessment Service Provider
Recall that the process receives a request for a loan approval and is evaluated by the risk assessment service. This service checks the customer risk level and loan amount.
Ensure your file,
tutorial.bpel
, is open in the Process Editor.
In the Participants view, right-mouse click on Partner Service Providers and select New Partner Service Provider.
Name the service provider
RiskAssessment
.
Notice that the Interfaces tree displays the LoanProcess port type already in use for the process. Expand Project and Project Reference Services to display available port types, and select RiskAssessment, as shown.
Click
OK
.
Step 2: Create the Invoke Risk Assessor Activity
The process requires invocation of the risk assessment service. Here's a shortcut:
In Participants view, expand RiskAssessment.
Select the check operation, as shown in the example.
Drag the check operation to the Process Editor, and place it between the receive and reply, as shown.
A new invoke activity is automatically created, named check. In the Properties view, change the Activity Name to
Invoke Risk Assessor
.
Notice that the participant and operation are automatically filled in.
From the Color property palette, select Blue. Color adds a visual difference between participants.
Select the Input tab.
In the Assignment Type field, select Single Variable.
From the Variable picklist, select creditInformation, as shown.
Select the Output tab.
In the Assignment Type field, select Single Variable, if needed.
From the Variable picklist, select New Variable.
In the New Variable dialog, name the variable
riskAssessment
, as shown.
Tip: Receive and Reply activities can also be created automatically (like these invoke activities) by dragging a process service consumer operation to the Process Editor.
Step 3: Create the Loan Approval Service Provider
Next, create a service for the process.
In the Participants view, right-mouse click on Partner Service Providers and select New Partner Service Provider.
Name the service provider
LoanApproval
.
Expand Project and Project References Services to display available port types, and select LoanApproval.
Click
OK
.
Save your file.
The Participants view should look similar to this:
You will create the invoke loan approval activity later.