Multi-Step and destination assignment

  • 8 July 2019
  • 1 reply
  • 16 views

Badge +13

We recently encountered this issue.  The SmO create reference to get the destination is outside of the Task step.

The SmO step is placed on top of the Multi-Step.

K2 Five 5.2 FP27 behavior is that it ran the destination task rule first, then executes the mult-step in the order.

 

We had to extract the logic to get the destination value in a separate activity in the process.

Now each task has an extra step showing in the process flow. (not user friendly when viewing business process)

 

Why can't the activity destination rule be evalated at the Task level after all preceding steps are executed? 

"At runtime the destination is set at activity level"

 

https://help.k2.com/onlinehelp/k2five/userguide/5.0/default.htm#K2_Workflow_Designer/Use/Canvas/MultiSteps/Create-Multi-Steps.htm

  • When you add a Create Reference and Task step in the same multi-step and then use the email reference (created from a SmartObject in the Create Reference step) as the destination email (assigned recipient) in the Task step, the following runtime error occurs “An Activity with a client event should at least have one destination”. At runtime the destination is set at activity level and having the Create Reference step in the same multi-step as the task prevents the destination reference from executing it as it should. Rather drag the Create Reference step out of the multi-step so this can execute before the Task step

1 reply

Badge +15

Hi,


 


I am afraid I do not have an answer for this. Since this is clearly stated in the documentation, the developers most probably have investigated this before, and categorized this as "by design".


 


Back before K2 Five, there two desktop tools that you can use to create your workflow. Back then the destinations are also configured on an activity level. 


 


It is very possible that this behaviour is brought over to K2 Five. Steps used to be called an event, and the container that all steps reside in is called activity. Each time you drag a event to the canvas, an activity will automatically be created to enclose that event. This is exactly how K2 Five's HTML5 worfklow designer works as well, just that it is less defined if you are not using multi-step. A single step is still enclosed within an activity, just that it it is less obvious. Changing this behaviour will most likely affect other parts of the workflow engine, and require significant changes made to the existing workflow engine.


 

Reply