Skip to main content


 

Symptoms

 


The client was using roles for their destination. When they start a workflow, a role is used in their destination set. Users in the role (when workflow started) are assigned worklist items. However, when they add an item (user) to the role, that user does not get assigned to the role worklist item? How can K2 black pearl be configured to refresh worklist items when user(s) are added to a role?
 

 

Diagnoses

 


This can be done via setting the roles to dynamic. However, since we are creating a large amount of roles and one is made for each process instance, this is going to cause a huge toll on the K2 server whenever anyone opens that worklist item. Each time the worklist item is opened it will attempt to refresh the roles.

 

 

 

With this design it sounds like we should utilize a smartobject tied to a SQL table for our users. Especially since we will be adding users to the role during the process instance.
 

 

Resolution

It was recommended that we utilize a smartobject tied to a SQL table in order to select our destination users for an activity.

 

 

 

We can also utilize Stored Proc based smartobjects to filter down the necessary users we are searching for.

 

 

 

We went over the general process in which we would set a destination user from a SQL Smartobject, (Set SQL Service Instance -andgt Create Smartobject off of Service Instance -andgt pull in smartobject call to our destination set in workflow) and I supplied the following documentation on SQL SmartObjects/Service Instances:

 

http://help.k2.com/onlinehelp/K2blackpearl/UserGuide/current/webframe.html#SIC03.html http://help.k2.com/onlinehelp/k2blackpearl/userguide/4.6.11/webframe.html#WS_SQL_01.html http://help.k2.com/onlinehelp/K2blackpearl/UserGuide/current/webframe.html#SIC02.html

 

 

 

Destination Set (Check the links at the bottom for this wizard for more details on each step of setting the Destination Set): http://help.k2.com/onlinehelp/K2blackpearl/UserGuide/current/webframe.html#Destination_Rule__Wizard_Navigation.html

 

 

 

With a SQL table we will not have to worry about waiting for a refresh of the role or any caching that could take place with our data. Whenever the smartobject methods are executed we are going to get the current information that is available from that SQL table at the time of execution.

 

 



 
Be the first to reply!

Reply