How To: Bind SmartObject Data Used in a Form to a Workflow

Audience Required Knowledge
  • Developers
  • Form Designers
  • SmartObjects
  • Views
  • Forms
  • K2 Workflow Designer in particular 'Map the Identity Field' (Create Item Reference)

The Map the identity fields to the workflow option on the Workflow Name screen has been replaced by the option to create an Item Reference from a SmartObject. Data Fields are no longer automatically created for the identity field of the SmartObject. An Item Reference is now created using the default SmartObject linked to the Form.

An Item Reference is an XML structure that contains all the information of the specific SmartObject. The Item Reference feature automatically binds the SmartObject data used in a Form to the workflow making it easier and quicker to design a workflow. This eliminates the need to manually configure certain rules such as the rule to return data on a Form at approval and the need to define each Data Field. The Item Reference replaces the Identity Field/Data Field configuration as it has expanded upon the previous functionality.

If the option Map the identity fields to the workflow was used in a build prior to K2 smartforms 1.0.2, it will still be functional. However, should there be a need to edit the workflow and use the Item Reference feature instead, it is advised that the following steps are taken to ensure that performance is not affected:

There is a risk where incorrect Data Fields, Data Bindings or Rules/Rule Actions may be removed which will result in unexpected behavior. It is therefore advised to use Item References when configuring new workflows in K2 smartforms and keep the existing configuration for workflows configured prior to K2 smartforms 1.0.2.