Actioned By (Activity context)

  • 26 October 2017
  • 3 replies
  • 7 views

Badge +7

Hi Guys,

 

I need to be able to find out who actiioned  a client event in a preceeding activity in k2studio. Is this possible?

 

I want to produce logs that contain more user friendly information so after many hours I've found that I can get most of what I need when placing a smartobject event at the start of each activity that writes to my custom log table in SQL. 

 

 

Example: I need to say x user was allocated by y user but I can't seem to mix the 2, x user is represented by the Activity detstination Instance participant name, simple enough when in the same activity, however, getting the Actioned By is elluding me. 

 

I;ve tried using a data event and attempted to store value in a date and retrieve it form the next activity but this just crashed the workflow.

 

I've never been down this road before so forgive me if missing something obvious. Thanks in advance 


3 replies

I also faced this issue and came up with a solution that captured the Activity Instance ID in a data field and then used the Workflow ReportsActivity Instance Destination SmO to return who completed the task (Destination), by passing in the ProcessID, ActivityInstanceID data field and 'Completed' for Status.  I then passed this Destination FQN value to the URMUser SmO to get the DisplayName.  This worked a treat, but would occasionally fail retreiving the user as the data had not been written to the relevant K2 log table.

 

Then I found this: http://community.k2.com/t5/K2-blackpearl/How-to-get-the-user-who-actioned-the-user-task/td-p/53443.  Yes it's Visual Studio, but only 1 line of code.  Just remember to create the datafield before attempting to assign a value. 

 

I can now get the user details into a datafield and use that value whenever I want.

Badge +7

We did the same thing without code by putting the smartobject call in the next activity and just putting a Preceding rule to start after 30 seconds. We also put a loop in to wait another 30 seconds if it was empty.

 

I have not found a way to do a preceding rule in designer but you work around this by assigning an activity to say the k2 account (don't send an email). Then escalate that activity after a minute and do the smart object call to get the data.

 

I use K2 studio but I train business users to use designer so I have had to do some very interesting work arounds including doing more heavy lifting with smart object calls in the form.

 

I hope this helps

 

Badge +7

This is great guys! Releived to know I'm not alone for one and sound suggestions, thank very much.

Reply