Item References

This content applies to legacy design tools (such as K2 Studio, K2 for Visual Studio, or the Silverlight-based K2 workflow design tool). If you have upgraded from K2 blackpearl 4.7 to K2 Five, these tools may still be available in your environment. These legacy tools may not be available in new installations of K2 Five. These legacy tools may also not be available, supported, or behave as described, in future updates or versions of K2. Please see the legacy component support policy for more information about support for these components.

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 SmartObject is bound to a List View or an Editable List View, the Item Reference will automatically bind to the default List method of that SmartObject. 
  • If the SmartObject is bound to an Item View, the Item Reference will automatically bind to the first Load method found in that SmartObject.
  • If there is more than one View on the Form, the specific SmartObject to be used as the Item Reference must be manually selected from the Context Browser.

Identity Field mapping in early versions of K2 smartforms

In versions of SmartForms prior to K2 smartforms 1.0.2, there was an option to automatically Map the identity fields to the workflow on the Workflow Name screen. This was replaced as of SmartForms 1.0.2 with the option to create an Item Reference from a SmartObject. As such, Data Fields are no longer automatically created for the identity field of the SmartObject. Instead, an Item Reference is now created using the default SmartObject linked to the Form. 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. If you edit a workflow that used Identity Field mapping to use the Item Reference feature instead, take the following steps to ensure that performance is not affected:

  • Manually remove all Data Fields that were previously automatically created as a result of the identity fields used in the workflow  
  • Manually remove Data Bindings to these Data Fields in the workflow
  • Manually remove Rule Actions that were previously automatically added as a result of the identity fields used in the workflow

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.   

 

How to use workflow properties as output mappings