In Process Designer, to
pass variables to an activity or step you have to set the input and
output data mapping.
Before you begin
You must have a process that contains a set of declared variables and an activity, or a
service that contains a set of declared variables and a step. The activity or step must implement a
service or linked process which also contains a set of declared variables that match the ones in the
main process for an activity, or the service for a step.
Restriction: For client-side
human services, mapping input and output data is applicable only if the client-side human service is
used within a process. Data mapping is not applicable if the client-side human service was created
with a Launch or Details UI view in the process editor, or is used for a dashboard.
About this task
When developing processes in Process Designer, you
must set the input and output mapping for each activity included in
a process so that the variable values received and generated by the
subprocesses and services that implement the activities map to the
variables from the main process. Similarly, if you have a service,
you must set the input and output mapping for each step included in
the service.
Note: This task is not relevant if you use the Activity
Wizard to create a service to implement an activity.
The
following procedure describes how to map both input and output data
for an activity or a step. Depending on the logic of your process
or service, an activity or step may only require input or output data
and not both.
Procedure
- Open the process or service diagram.
- Click the activity in the diagram or the step in the service
diagram, and then click the Data Mapping tab
in the properties. The Data Mapping tab displays the variables that are available
from the service implemented in the activity or step.
Note: If your activity is an inline user task,
no variables are displayed that are available from a service, but you can add variables that you
want to pass to a service.
- To complete the data mapping, click the Auto-map input properties with variables
from service icon (
) in both the Input Mapping and Output Mapping
sections.
Note: For inline user
tasks, the Data Mapping tab does not contain any auto-mapping capability. The interface of user
inline tasks is defined entirely by what you choose to map. Additional information about inline user
tasks is found in the topic
Working with inline user tasks.
In the desktop Process Designer, auto-mapping works only when variable names
and types match exactly. You should always use an identical name and data type for a set of input
and output variables that are passed in, processed, and then passed back. If no matching output
parameters are found, you can choose to generate them. Existing mappings are over-written by the
newly generated ones. Auto-mapping does not take into account existing variables with the same names
and different types, and creates duplicate variables which result in validation errors. The output
variables generated are always private variables.
Auto-mapping works slightly differently in the web Process Designer. Existing mappings are not overwritten.
No variables are generated for existing variables with the same name but different types. By
default, the variables are created as private variables. You can choose to make them input, output,
or input and output variables.
If your variable is a shared business object then the output mapping from the activity or step is
not required.
- Click Save or Finish
Editing.
What to do next
The data mapping is complete, and you can test it.