Creating a Consumer Model

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

In this chapter, we are going to reference the Collect Customer Information process. To reference the process, we need to create a file connection by reference and drag-drop the elements that we want to reference.

The following steps explain how to establish the file connection.

Creating a File Connection

  1. Create a model named Consumer.xpdl
  2. In the Outline view, right-click the External Model Information node and select File Connection
  3. In the file connection properties dialog box, click the Browse button to provide the path for the created provider model named Provider.

  4. Figure: File Connection

  5. Click Apply and OK

    Once the file connection is established, the elements of the provider model that can be referenced are available under the created file connection in the Outline view.

    Figure: Outline View of Consumer Model

Referencing the Elements and Creating the Workflow

The following steps explain how to reference the elements and create a consumer model.

  1. Create a manual trigger
  2. Create a manual activity named CustEnquiry
  3. Drag and drop the referenced process definition named Collect Customer Information from the Outline view. Note that you need to drag the provided interface / process in the consumer process. Otherwise the interface cannot be selected in the 'Provides Interface' property of the process in the consumer model.
  4. Connect all these activities
  5. Create two more manual activities named Sanction Loan and Do not Sanction Loan
  6. Create a primitive data named LoanAmount of integer type and provide it in the in data mapping for the Sanction Loan and Do not Sanction Loan activities
  7. Also, provide the LoanAmount in the Out Data Mappings of the CustEnquiry activity
  8. Drag and drop the CustomerInformation from the Outline view under the File Connection and rename it to CustomerData.
  9. Define the In Data Mapping in the ProcessInterfaceContext as CustomerData in the Data drop-down list and Formal Parameter 1 as the Access Point.
  10. Define the Out Data Mapping in the ProcessInterfaceContext as CustomerData in the Data drop-down list and Formal Parameter 1 as the Access Point.
  11. Right-click the Collect Customer Information activity and select Split Behavior > XOR.
  12. Define the Condition Expression as CustomerData.AssetSalary >10000 && LoanAmount <5000; for Sanction Loan activity
  13. Also define the Condition Expression as CustomerData.AssetSalary<=10000 && LoanAmount>=5000; for Do not Sanction Loan activity
  14. Define Administrator as the Participant for the required elements

The created consumer model should look like as shown in the following screenshot:

Figure: Consumer Model

Executing the Workflow of Consumer Model

Here we will deploy the provider and consumer models in the Infinity Process Platform Portal. Note the workflow of the Consumer model. As per the defined workflow of 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 happens in the Infinity Process Platform Portal.

Perform the following steps:

  1. Start your server and deploy the model. For details on how to deploy a model, please refer to the section Deploying Multiple Models from One Audit Trail of the Deploying a Workflow Model chapter of the Modeling Guide.
  2. Start the Infinity Process Platform Portal as described in the chapter Logging in the Infinity Portal of the End User Handbook.
  3. Login as administrator (motu/motu). You can use the Shift-F8 short key.
  4. In the Workflow Perspective, start the process from the consumer model named Consumer Process.

  5. Figure: Start Consumer Process

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

    Figure: Complete Activity

  7. As soon as you complete this activity, the Collect Customer Information process is referenced from the provider model.

    Figure: Collect Customer Information Process

  8. Enter the customer information and complete the activity.

  9. Figure: Complete the Collect Customer Information Process

    As soon as you complete the CustomerInformation activity, the customer is notified by sending an email. Here the provider process Collect Customer Information is complete and the workflow returns to the consumer model. The next activity of the consumer model gets triggered.

  10. The Sanction Loan activity is triggered as it satisfies the given condition in the modeler. Complete the activity.

  11. Figure: Sanction Loan