Configure Data Association
Data association refers to the flow of data within a process. Use the Data Association editor to define input and output for activities that need them.
On the input side, it needs data input into the activity (referred to as its payload).
On the output side, after the activity has just finished, it needs output from the activity to data objects, to store results for use elsewhere in the process.
To configure data association:
- In the process editor of a structured process, select an activity that needs data association, such as a human task or service task, click and then select Open Data Association . (This option is active when the selected activity needs association.)The Data Association editor opens. Use its center pane as a canvas for mapping associations, by dragging and dropping elements from the left and right panes. Any data associations already configured display below Data Association. You use the empty pair of fields to create a new association.
Note:Oracle Cloud Infrastructure Process Automation creates data associations for you in some cases, such as when you create a human task or start event with a form.
- Notice that the Input tab is selected. The left pane displays source objects (Data Objects) in an expandable tree. The right pane displays the payload, or entry parameters the activity needs to perform its function.
- Click the Output tab and notice how the left and right panes change. Now the left pane displays the task’s payload, and the right pane displays the variables available in the process.
- For a dynamic process - in the process editor, select a human task activity or a service activity. Click , select Data Association and then select Input to configure input data association. (This option is active when the selected activity needs association.) You can configure output data association by selecting Output.
- In the Input tab begin creating a new association by dragging an input object from the Data Objects tree and dropping it in the input field titled New Association. You can also begin typing and select from auto-complete options that appear using the inline expression builder. To specify attributes within objects, enter a . (period) and select from the list that displays.
The input source provides the value or expression to assign to the target. You select variables related to the process (such as data objects) to map to the specific parameters the activity needs to perform its function (its entry parameters).
- Complete the association by dragging an output object from the payload tree and dropping it in the output field. You can also begin typing and select from auto-complete options that appear using the inline expression builder.
Oracle Cloud Infrastructure Process Automation validates the new association and displays a green association icon if valid, or a red association icon and error if invalid:
Valid data association
Invalid data association
- If needed, create additional associations and reorder them. Drag and drop an association to move it up or down in the associations list. Associations are executed in the order in which you position them. For example, if multiple associations assign a value to the same object, the last assigned value is used.As you edit, click the Undo or Redo buttons as needed.
- Click the Output tab, and create output data associations. You can think of the output as though the activity has just finished, and likely contains results that you'd like to store for use elsewhere in the process.
- Click Apply to save the data associations.You can save invalid associations and fix them later. Note that you can't deploy applications that contain validation errors.
Data Association Tips
Use the Data Association Editor to add, edit, delete, and reorder data associations.
Below are tips for configuring data associations.
The following activities need data association. Note that some activities have only output, such as a start form event, which captures the data end users enter into the form.
Events, except timer catch and end events
You can access the data association editor:
- By clicking an activity in a structured process, clicking the More icon, and choosing Open Data Association.
- By selecting an activity in a structured process, and then clicking the Data Association icon that is present at the top right of the process editor.
- By clicking a human or service activity in a dynamic process, clicking the More icon, and then selecting Data Association. Choose Input to configure the activity's input data, and choose Output to configure the activity's output data.
In the Data Association Editor, click the Input tab to define data input into the activity, and the Output tab to define data output resulting from the activity.
Dropping an object into an association field that already contains a value replaces its value. If you drop an object into an input field that ends with an operator, the object name is appended to the field's contents.
- You can use predefined variables in data associations for structured and dynamic processes. Predefined variables contain process execution information. They enable users to use process execution information such as instanceId, creatorName, createdDate and so on in data association. Note that predefined variables are read only, and their values can't be edited.
Define Conditions for Data Associations
There may be a business scenario where you want a data association to execute in runtime only when a particular condition fulfills. Control the execution of data associations in runtime by adding conditions to them in the Data Association editor.
A data association that has been configured with conditional mapping executes in runtime only when the defined condition fulfills. Otherwise, it fails to execute. All other data associations that do not have conditional mapping defined execute normally in runtime.
To define a new condition:
- Click the Data Association icon in the data association for which you want to configure a condition. You can define the new condition in the resulting dialog box.
- Define the new condition by entering values directly in the given field.
- Alternatively, use the inline expression builder to define a condition using standard functions and operators.
- If the condition is valid a green icon is displayed next to the Data Association icon.
- If the configured condition is invalid, the icon turns red indicating an error .Note that you can also view the error details when you click the process validation error from the process editor canvas.
- Finally, click Apply to save all data associations including the data associations with conditions set on them.