Known Issue: Incorrect data returns when using a SmartObject list method as a reference in a workflow
KBS100228
PRODUCTIssue
After installing K2 Five (5.0) September 2018 Cumulative Update Fix Pack 6, multiple rows of data return instead of just one value. This occurs when your workflow is configured to return the destination user’s name that approved a task, by creating a reference in the workflow using the Activity Instance Destination SmartObject and passing the folio and activity display names to the reference.
Cause
This issue was introduced by a fix made in K2 Five (5.0) September 2018 Cumulative Update Fix Pack 6. More information on the fix can be found here.
Resolution/Workaround
Update your workflow by following the steps below:
-
- For the Activity Instance Destination use a SmartObject method instead of the Create Reference Step.
- Use the mappings as illustrated below. Ensure to add Workflow ID for the Process Instance ID. The Process Instance ID needs to be specified to filter out previous executed instances.
- Create a new data field and map it to the destination as illustrated in the image above. The data field will then be updated after every task.
- On the second SmartObject method, the data field can now be used in the workflow as an input property based on the correct return value.
- For the Activity Instance Destination use a SmartObject method instead of the Create Reference Step.
Considerations
Note the same issue may occur in other versions of K2 Five, you can apply the same workaround to these versions.