K2 Workflow Tasks gets locked to previous user

  • 5 February 2022
  • 2 replies
  • 18 views

We have a K2 Five implementation which has workflows of version 4.7 running in compatibility mode. We do not use Smart Forms, bur instead use custom code for the front end.

We have a peculiar issue where the tasks gets locked with the user in the previous step of approval.

Example scenario:

1) User initiates a workflow and sends these for authorization.
2) User asks colleague to authorize.
3) The colleague tries to authorize but reports back the error “Work item is already allocated to user name (of the person who initiated the workflow)”
4) Currently the user goes into each work item and redirects to the colleague to authorize.

This is new behavior and is affecting multiple colleagues. It also happens when you open a task and the task gets allocated to the person who opened the task first.

I know that smart forms has a feature “Allocate Worklist Item on Open” which is available. If this option is selected, the task will be allocated to the first user who opens the task and other destination users will not have access to the task. However as we do not use smart forms, I know that this is not the reason why the issue is occurring.

Does anyone have any further pointers on this please and what other things can be seen within KO2 to resolve this?

Many thanks,


2 replies

Userlevel 5
Badge +13

Hello - I am understanding from your post that you do not use SmartForms, so how are you integrating with the tasks in K2? I assume you are using the K2 API, which also has a concept of allocating a task when it is open and that may be the problem here. We usually try to "Release" a task if the user ends up not working on it or, if it is more of a trusted working environment, automatically "Release" the task when someone else tries to act on it. Please elaborate on how you integrate with tasks today in your custom front end and maybe I can help further.

Userlevel 3
Badge +9

As the other responder says you are either opening the task or not releasing the task through code at the appropriate time.  If you do not make a call to the K2 API to open the work list item before you action the task then the task will not get locked.


 


You could also create a slot for each user if appropriate so that they can all open the task:


 



If you do this though you then need to modify the Outcome  from All Slots to At Least  1 if you only want 1 response to actually complete the task:


 



 


Cheers

Reply