How to open tasks marked with "Allow any user to finish this client event"

  • 28 January 2010
  • 7 replies
  • 0 views

Badge +4

I have a task that goes to the process originator but that sometimes needs to be actioned by other users. 


Only the process originator needs to get an email and see the task in their task list.


I decided the best way to handle this is by checking the "Allow any user to finish this client event" and by storing the serial number in the database.


But whenever I action this task making use of the serial number in the DB, it works for the originator but for other users I get the folowing "26030 Worklist item 2956_181 not found for K2:WOODSIDEadmh44" when I open the worklistitem.


I was under the impression that the "Allow any user to finish this client event" flag will cause this to work.


Any ideas to resolve this problem or suggestions on other approaches would be much approciated.


7 replies

Badge +9

If the user opening the workitem and the original destination name do not match, you probably need to use the OpenSharedWorklistItem call.


http://www.k2underground.com/blogs/johnny/archive/2009/02/26/out-of-office-feature-in-0807-and-the-sourcecode-workflow-client-apis.aspx 


You can try this out and see if it works.

Badge +4

Thanks Johnny, it works with OpenSharedWorklistItem, but this causes another problem. 


I can retrieve the worklistitem but not execute the action.  I then discovered that I need to give the user explicit rights to execute the action.  I also discovered that I can't give domain users rights to execute this action.


If I have to manually manage the list of users who can execute a action, it is a problem.


I would have though that "Allow any user to finish this client event" would allow any user to execute the action.


 

Badge +9

I think that is by design as it is intended to prevent non-authorised users to action the item.


Normally I do not set rights on actions (which means all users have access) .

Badge +4

Normally I also do not set the rights, but in this instance even with no rights being set only the originator (assigned user) can executre the action.


Since i would not know who the user is going to be, there is not way for me to give the user rights, unless I do tis at run time.


Not sure if this is possible.


My other option is to assignthe task toa ll the possible users who can execute the action, but then I will have to do a lot of work because only the process originator needs to see the task and get an email.

Badge +9

Taking a step back, is there any reason why this couldn't be done by redirecting/delegating the workitem to the person who wants to actually work on it?

Badge +4

The requirements is for anybody in the organisation to submit a request.   This request will then go through a 3 step approval process.


If any of these approvals is declined a task is sent to the originator to submit more information or to cancel his request.


One of the approvers is called the planner and the planner has the ability to go into an activity and when more information is required for that activity, he can then submit that information.


My problem is that the planner does not want to get a task or email for this.


I can't redirect since auither the originator or the pllanner can action the task. 


Redirecting will result in the planner having the task in his task list. 

Badge +9

Hmm that sounds like you need to create a planner's group and give permissions to them on the actions.


The only other thing I can think of is to do some creative coding in the page to use the impersonate method on the connection object to action the task as the original user.

Reply