Map Data to and from the Decision

Configuring the data mapping is the last key piece in configuring a decision model. The data needs to flow from the web form into the decision and its result must flow out of the decision so the human task can display it.

  1. On the Decision Process tab, let’s view the data association that was automatically configured for the Input Forecast start activity and the Display Result human task.
    1. Select the Input Forecast element and click Data Association in the toolbar. Expand the values in both side panes. Notice that values entered into the web form are written to a data object called inputForecastWebFormDataObject. Click Cancel.
    2. Select the Display Result element and click Data Association in the toolbar. Notice that for input, the same data object—inputForecastWebFormDataObject—is used to write values back to the web form. Click Cancel.
  2. Map input and output data association for the decision element.

    The decision needs to use the input values (rain, temperature) contained in inputForecastWebFormDataObject and output the decision’s result (what to bring) into the data object.

    1. Open data association for the Decide What to Bring element. With the Input tab selected, expand the values in both side panes.
    2. Map the rain and temperature values as follows:

      inputForecastWebFormDataObject.rain to body.forecast.precipitation

      inputForecastWebFormDataObject.temperature to body.forecast.temperature

    3. With the Output tab selected, map the Decide What to Bring value as follows:

      bodyOutput.interpretation to inputForecastWebFormDataObject.whattobring

  3. Click Apply.