Workflow step skipped in k2 as query fetched zero rows

  • 5 September 2022
  • 1 reply
  • 2 views

We have workflow where the query fetched the center names. In my case, no center was fetched using the query means no rows. and instead of getting into error, the step is skipped and workflow got approved.

 

Kindly let me know for such situation, how to avoid step to get proceed.

 

 


1 reply

Userlevel 3
Badge +9

You can use a Split decision step: https://help.nintex.com/en-us/k2five/userguide/5.3/default.htm#K2-Workflow-Designer/Use/Toolbox/Logic/Split/Split.htm?TocPath=Create%257CWorkflows%257CUsing%2520the%2520K2%2520Workflow%2520Designer%257CToolbox%257CLogic%257C_____4


 


Call the SmartObject and store the Centre Name in a workflow variable before you get to the Split step, add two Paths to it: Valid and Invalid choose the Custom Logic option.   


 


Then in the Split rule check to see if the variable is empty, if it is then follow the invalid path and add some handling around this (you might want to email a developer or some such), else follow the valid path and process as normal.


 


Cheers

Reply