Creating Data associations

Whether you have used the BPM Design Editor or Human Task editor to define the Human Task, you need to check the Data associations and make sure they are correct. The application knows what Data object types are in the Human Task and will list them for you in the center area, but you may need to specify exactly which Data objects should be mapped to each type as input and output.

Data associations are used to pass the information stored in Data objects in the following contexts:

  • To and from another process or service invoked from a BPMN process
  • In a Human Task service, to and from an Oracle Business Rule
  • To and from a script task

You are doing it here for a Human Task. You use Data associations to define the input and output from a flow object (like Human Task) to an external service or process.

Note

It is important to note that although the inputs and outputs are defined in the Data associations for a flow object, the defined values are passed to the implemented systems and services.

How to do it...

The Data associations' editor enables you to configure the input and output values passed between a flow object and its implementation. The editor contains an input section, flow object interface (it lists the expected input arguments for the service or process implemented), output section, and a Data object display section. You can create Data associations to configure values as follows:

  1. Launch BPM Studio.
  2. Navigate to the BPM Project navigator.
  3. Click the SalesToContract process.
  4. Right click the Enter Quote task and click Properties.
    How to do it...
  5. Go to the Implementation tab and then the Data Association section.
  6. Check Use Association and click on the pencil icon to its right.
    How to do it...
  7. You will reach the Data Associations editor.
  8. Drag the quote from the Data objects section to the Output box to the right of Enter Quote | quoteRequest.
    How to do it...
  9. You can keep the Input association empty for the moment; as we have two options to initiate/trigger the process SalesToContract—either by using Scripts or the y Sales Representative role with Initiate task.
  10. Click OK twice.
  11. When you have finished following these steps, click Save.

How it works...

When the BPMN Service Engine runs the User task implementation, it invokes the Human Workflow Service with the parameters defined in the Data association of the User task. When the Human Workflow Service finishes running the Human Tasks, it provides the results to the BPMN Service Engine using the defined Data association.

Tip

It's always wise to perform Data association at the end, after implementation is complete.

There's more...

While creating Human Tasks directly from our Interactive tasks, the Data associations are completed automatically for Business Analyst Review and Finalize Contract tasks. Our other Interactive tasks (Approve Deal and Approve Terms) were associated with the existing Approve Quote task, so we'll have to create the Data associations for these manually.

Checking Existing Data associations

Follow the ensuing steps to check Data associations:

  1. Right-click Business Analyst Review or Finalize Contract task.
  2. Choose the Properties | Implementation tab.
  3. Go to the Data Association section.
  4. You can find that Data Association is already created for both the tasks.
  5. Click on the pencil icon used for editing to the right of Data Association to check the association for the respective tasks.
    Checking Existing Data associations
  6. When you have finished following the preceding steps, click Save.

Creating Data mappings for Approve Deal and Approve Terms activities

The Interactive (Approve Deal and Approve Terms) activities were associated with the existing ApproveQuote task, so we'll have to create the data associations for these manually.

  1. Right-click on the Approve Deal activity, choose Properties, and go to the Implementation tab.
  2. Check Use Associations and click the pencil icon.
    Creating Data mappings for Approve Deal and Approve Terms activities
  3. Drag the Data object quote from the Data object display panel on the right to both the Input and Output boxes on the left panel.

    Note

    Make sure you drag the Data object to the correct boxes, as shown in the following screenshot (quote matches to QuoteRequest on both Input and Output).

  4. Click OK.
    Creating Data mappings for Approve Deal and Approve Terms activities
  5. Repeat the same steps for Approve Terms.
  6. When you have finished following the preceding steps, click Save.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.34.39