Open active workitems with new assigned user


Badge +1

Hi,

 

I'm using a SMO method to generate the destination users of a workflow. I would like to assign a new user to have access to existing workitems, but it's only working for new items generated after the user is assigned to the SMO method (in a sql server database) or to the already Completed items.

 

Is there a way to update the Destination users of a workflow task with that approach? I cannot change the SMO method becauase I need to filter the users based on a condition that's stored in the table.

 

This is the message that I'm seeing when I try to open the form:

 

Worklist item could not be opened. 24411 {Username} from 10.0.1.44:4191 is not allowed to open the worklist item with SN=12713_17

 

13453iD40C7B6430CE370F.png

 

Thanks,

Pablo Colaiacovo


5 replies

Userlevel 1
Badge +8

Hi Pablo

 

I am not sure this will work with a smartobject method, but you when you use K2 Roles you can make them dynamic, "When the role changes, the user receives a worklist item when the worklist refreshes or after they login"

 

See: http://help.k2.com/onlinehelp/k2blackpearl/userguide/current/webframe.html#HowTo-WS_MCon-Roles.html

 

You can also use a smartobject to populate the role, see http://help.k2.com/onlinehelp/k2blackpearl/userguide/current/webframe.html#SmartObject_as_Role_Item__-_Adding_a_Role_using_a_SmartObject.html

Badge +1

Thanks for your reply.

 

Is there a way to pass a parameter to a role? I'll need to filter the users based on a parameter, that's why thhe smartobject method is used directly. Hope the images add more clarity to the situation:

 

13797iAE1B967453A9C8D0.png

 

Thanks,

Pablo

Userlevel 1
Badge +8

Hi Pablo, if you need to pass a parameter to the smartobject list method then K2 Roles are not going to help as you need to set the parameters at the time you set up the Role. I don't know of any other way to dynamically allocate tasks, or to add/remove destination users after a task is created.

Badge +1

Is it possible to create a new process that selects a user and creates a new workitem for each active instance of the other process? If it possible, do you know any example or documentation post that might help me?

 

The idea would be someting like this:

  1. Select a user in a form.
  2. Get all the active instances of a specific workflow.
  3. Create a new workitem for the selected user in the form for each active instance.

 

Hope it makes sense.

Thanks,

Userlevel 1
Badge +8

Hi Pablo,

 

This could be an instance where destination sets would come in handy. You could create a process level data field that is intended to contain a redirected user, but with a default value of blank.

 

In your destination sets, you define one set to be used if your process data field is blank. This set would contain your origianl smart object call.

 

The other destination set would be used if the field wasn't blank and the field itself would be used as the destination.

 

The end result is that the first time through the process the smart object is used as the destinaitons, but if you choose to assign to a specific user then you set that user to the process data field when you direct back to that activity and it is planned with the field value instead of the smart object.

 

To get to the destination sets, in the activity properties under destinations, click the back button, click Advanced mode and then next next til you get to the destination sets screen. The default is you will a have one called default. 

 

Modify as needed.

 

S.

Reply