IBM BPM, V8.0.1, All platforms > Create processes in IBM Process Designer > Modeling processes > Business objects and variables > Declaring and passing variables

Testing declared variables and data mapping with coaches

When you declare and map variables in your BPD, you can test the mapping between activities by using coaches and running your BPD in the Inspector.

Make sure:

This task is an example of how you can test your JavaScript variable mechanics from the graphic interface of Process Designer by passing a variable from the BPD to an activity. You can also test your variable mechanics through the JavaScript text box inside your services or activities.


Procedure

  1. In Process Designer, open the BPD that includes at least an activity for which you established data mapping.

  2. For each activity you want to test, add a coach to it and add the controls representing each variable inside the coach.

    For example, if you want to test data mapping between 2 activities that implement their own services, add a coach to each service and drag all the variables (input and output) available into it.

  3. Save by clicking the Save icon.

  4. Click the Run Process icon (

    ) to run the BPD in the Inspector.

    If prompted to switch to the Inspector, click Yes.

  5. Check your data mapping with the coaches:

    1. In the Process Instances tab in the Inspector, run the current task by clicking the line of the table on the right side of the screen indicating Received in the Status column and then click the Run the selected task icon ().

    2. When prompted, select the user account that you want to use to run the task. By default, activities in the participant lane are assigned to the All Users group. The task runs and the coach displays the values of the local variables in a browser window. The values that are displayed depend on the data mapping of the current task.
    3. Modify the values of the variables to see whether the changes will be passed on to the next task for which you mapped the data. To validate your changes click OK. The browser closes.

    4. In the Inspector toolbar, click the Refresh icon (). The task generated by the following activity in the BPD is displayed.
    5. Repeat the previous steps and check that the current variables displayed in the browser reflect the changes you made in the previous coach.


What to do next

If the data you modify in a task is displayed in the following task of your BPD, your data mapping is properly set. If the data should match but does not, review your data mapping settings.

Declaring and passing variables


Related tasks:
Mapping input and output data for an activity or step