Prev Next

Exchange Data Sets using DataObjects

When testing code generated from a DMN model, or when simulating BPMN models that call DMN models, you need a means of exchanging data sets. For example, in a BPMN call of a DMN model, a BPMN DataObject is used to store the set of variables that will be passed on to the DMN model that it is calling.  This DataObject needs to be populated with data fitting the DMN InputData's data structure ready to be passed to that InputData object.

This same BPMN DataObject is used when testing the code generated from a DMN model.

This topic describes the process of creating BPMN DataObjects, from DMN DataSets.

A Data Set is stored in a DMN InputData element and can be accessed using the icon on the DMN Expression window.

Auto-filling value fields in a DMN InputData Decision Table in the context of an Item Definition using Sparx Systems Enterprise Architect.

This opens the InputData's Edit Data Set dialog which can contain multiple sets of values:

An example of setting a Data Set for InputData used in simulation of a DMN model using Sparx Systems Enterprise Architect.

There are two options to transfer the Data Set to a DataObject:

1. Direct

  • Create a BPMN DataObject under a Package in the Browser.
  • Open the DMN Simulation window

An example of choosing a Dataset for DMN simulation using Enterprise Architect.

  • Select a Data Set from the Value drop-down
  • Click on the icon on the DMN Simulation window.
    This opens the Select Element dialog.
  • Select the BPMN DataObject element 
  • Click on OK.

The Data Set is now viewable in the Notes of the DataObject.

2. Manual

To manually exchange this Dataset:

  • Open the InputData element's DMN Expression dialog (see  above)
  • Click on the Edit DataSet icon . This opens the Edit Data Set dialog.
  • Use the CSV Export   icon to export these details to a file.

The text in the csv file can be added as text in the Notes of a BPMN DataObject Element.

Learn More