Dynamically change activity priority based on data field?

  • 25 March 2015
  • 1 reply
  • 1 view

Badge +8

I need to change the priority of specific activities in a process based on a data field in the same process.  Currently, the Priority is a drop down only.

 

I've been purusing the various View Code options for the activity and the client event, but I haven't found it yet.  Assitance appreciated.


1 reply

Userlevel 5
Badge +18

I believe you may be able to change the priority for an activity via a Server Event:


 


K2.ProcessInstance.ActivityInstances[1].Priority = (int) K2.ProcessInstance.DataFields["mydatafield"].Value;


 


Where:


 


0 = High


1 = Medium 


2 = Low


 


Similar to earlier version of K2:


 


http://help.k2.com/kb000024

Reply