Creating a Consumer Model in the Portal Modeling Perspective

As the provider model is ready, you can create another model in which you reference the elements of this provider model.

In this chapter, we are going to reference the Collect Customer Information process and the CustomerData data by dragging and dropping them to the consumer model.

Creating the Consumer Model

Create a model named ConsumerWeb.xpdl and start setting up the workflow:

  1. Create a new process Consumer Process
  2. Create a lane with participant Administrator
  3. Create a manual start event
  4. Create a follow-up manual activity named CustEnquiry

The following sections describe how to continue with the workflow by referencing elements from the provider model:

Referencing the Process of the Provider Model

Now we reference the process of our provider model:

  1. From the Outline view drag process Collect Customer Information in the provider model ProviderWeb.xpdl and drop it to the diagram of the Consumer Process.

    Drag and Drop Process
    Figure: Drag and drop referenced process

  2. Open the property page of the created subprocess activity and see the implementation set to ProviderWeb/Collect Customer Information.

    Subprocess Implementation
    Figure: Subprocess implementation

Adding Workflow

We continue by adding the following elements to our workflow:

  1. Add a connection from activity CustEnquiry
  2. Create an XOR gateway from subprocess activity Collect Customer Information.
  3. Outgoing from the gateway create two more manual activities named Sanction Loan and Do not Sanction Loan

    Workflow with Gateway
    Figure: Workflow with gateway

  4. Create a primitive data named LoanAmount of integer type and provide it as in data mapping for activities Sanction Loan and Do not Sanction Loan.
  5. Also provide data LoanAmount as out data mappings of activity CustEnquiry.

Dragging and dropping Structured Data from the Provider Model

Now we add structured data from our provider model:

  1. Drag and drop structured data CustomerData from process Collect Customer Information of the provider model to the diagram of the Consumer Process.

    Drag and Drop Data
    Figure: Drag and drop referenced data

  2. Add an in and an out data mapping from this data to subprocess activity Collect Customer Information.
  3. Edit the properties page of this data mapping.
  4. In the Input Access Point drop-down list select Process Interface/Formal Parameter 1.

    Select Access Point
    Figure: Select Input Access Point

  5. Select the same in the Output Access Point drop-down list.

    Data Flow Settings
    Figure: Data Flow settings

Setting Condition Expressions

In the following steps we set condition expressions outgoing from the XOR gateway:

  1. Edit the property page of the sequence flow from the gateway to activity Sanction Loan and define the following Condition Expression:
    CustomerData.AssetSalary > 10000 && LoanAmount < 5000;

    Condition Expression
    Figure: Condition Expression

  2. Similarly edit the property page of the sequence flow from the gateway to activity Do not Sanction Loan and define the following Condition Expression:
    CustomerData.AssetSalary <= 10000 && LoanAmount == 5000;

The created consumer model workflow should now look like in the following screenshot:


Figure: Consumer Model

Executing the Workflow of the Consumer Model

To test our workflow, we first deploy our provider model and then the consumer model in the Stardust Portal. For details on how to deploy a model please refer to section Deploying a Model of chapter Model Operations in the Business Process Modeling Handbook.

As per the defined workflow of the consumer model, the process definition of the consumer is triggered and then the referenced process definition Collect Customer Information is invoked. Let's see how this is performed in the Stardust Portal.

Perform the following steps:

  1. Start the Stardust Portal as described in chapter Logging in the Stardust Portal of the End User Handbook.
  2. Login as administrator (motu/motu). You can use the Shift-F8 short key.
  3. In the Workflow Perspective, start the process from the consumer model named Consumer Process.


    Figure: Start Consumer Process

  4. Enter the loan amount as 4000 and complete the activity CustEnquiry.


    Figure: Complete Activity

  5. As soon as you complete this activity, the Collect Customer Information process is referenced from the provider model.
  6. Enter an Asset Salary of 20000 along with the customer name and ID and complete the activity.


    Figure: Complete the Collect Customer Information Process

  7. As soon as you complete the activity, the mail recipient entered in the mail data receives an email with the following content:

    Email Content
    Figure: Email content

  8. The provider process Collect Customer Information is now completed and the workflow returns to the consumer model. The next activity of the consumer model gets triggered.
  9. Activity Sanction Loan is triggered as it satisfies the given condition in the modeler. Complete the activity.


    Figure: Sanction Loan

  10. Similarly, if you enter a loan amount equal 5000 and an asset salary less than 10000, activity Do not Sanction Loan is called instead.