Skip to main content

Greetings All,

 

 

I have requirment to validate a user if the user has that particular task assigned to him and allow him to perform the task.

This i am able to achieve it with help of Serial Number when he comes from tasklist but what if he comes directly to form and tries to complete the task.

I should not allow him to do so.

 

Thanks and Regards,

Mohammed Asif M

Hi Mohammed,


 


I believe this happens out of the box depending on how your destination planning is done.  If your'e assigning to a group, other members of that group may be able to action, however, the item would exist in thier worklists at that point.



Either way, I believe your users will hit a message similar to this:


 


11903i3E9EDDA3EFDD4BC4.png


 


Granted, if you have to programatically check, I'd look into the worklist API, which you can use to retrieve a user's worklist details and further verify that they are the currently assigned user, however, that is likley redundant.



Regards,


 


Mike


 


 


Hi Mohammed

 

If you add the "Open a worklist item" statement to your task form initialize rule then K2 will report an error as per Mike's post if the user does not have permission to open the task item (or if the item is opened by someone else or completed). This rule is inserted automatically if you are using the smartforms client event in your workflow.

 

When you configure the open worklist statement you pass in the serial number. K2 will attempt to open the worklist item for the logged on user when they open the form. If you don't like the error message displayed you can use the "Error Occurred" condition and show a more friendly error.

 

16450iDA3EAECE6FA3942C.png


Reply