Getting Started

Getting Started

Part 4: Creating Partner Service Provider Activities

Part 4: Creating Partner Service Provider Activities

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.
  1. Ensure your file,
    tutorial.bpel
    , is open in the Process Editor.
  2. In the Participants view, right-mouse click on Partner Service Providers and select New Partner Service Provider.
  3. Name the service provider
    RiskAssessment
    .
  4. 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.
    Participants view - new interface
  5. Click
    OK
    .
Step 2: Create the Invoke Risk Assessor Activity
The process requires invocation of the risk assessment service. Here's a shortcut:
  1. In Participants view, expand RiskAssessment.
  2. Select the check operation, as shown in the example.
    Participants view - operation check
  3. Drag the check operation to the Process Editor, and place it between the receive and reply, as shown.
    bounding box for receive invoke reply
  4. 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.
  5. Select the Input tab.
  6. In the Assignment Type field, select Single Variable.
  7. From the Variable picklist, select creditInformation, as shown.
    Input tab of invoke activity
  8. Select the Output tab.
  9. In the Assignment Type field, select Single Variable, if needed.
  10. From the Variable picklist, select New Variable.
  11. In the New Variable dialog, name the variable
    riskAssessment
    , as shown.
    Output tab of invoke activity
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.
  1. In the Participants view, right-mouse click on Partner Service Providers and select New Partner Service Provider.
  2. Name the service provider
    LoanApproval
    .
  3. Expand Project and Project References Services to display available port types, and select LoanApproval.
  4. Click
    OK
    .
  5. Save your file.
The Participants view should look similar to this:
Particpants view with 3 participants
You will create the invoke loan approval activity later.

0 COMMENTS

We’d like to hear from you!