Re-Open Already Processed WorklistItem

  • 17 October 2011
  • 3 replies
  • 6 views

Badge +2

Hi,


I recently encountered a problem where if a workflow item which has already been processed (or completed) and we tried to open the worklistitem and trigger again, it will throw below error:


24411 K2:[domain][user] from [ipAddress] is not allowed to open the worklist item with SN=[serialNumer]



I understand once the worklistitem has been processed, we cannot trigger again. But I do not want the error to cause a false alarm so is it recommended we should catch the exception and check the error code: 24411? If this is the error code, we should ignore and complete the flow in our code.



Also , we are planning to have a few async server event in our workflow process. What will be the error like if we try to retrigger an already finished Async server event. Is it the same error code?


Thanks,


lyf


3 replies

Badge +10

Hi Lyf,


Yes you are correct. 24411 is the error code you should be looking for. If you find that error code handle the exception by ignoring it or displaying a user friendly message.


For Asynchronous Server Events the error number will most likely be 25225. You can handle this error number in the exact same fashion.


As a point of interest, check out all the error message numbers in the HostServerLogging.config file in the K2 blackpearlHost ServerBin folder. This file contains all the numbers with their corresponding error message text. Note that you can change the message text of each error, but if your code checks the error number you will always be able to handle the exception appropriately.


Hope this helps!

Badge +2

Thanks, Johan. I will check out the config file to find out more.

Badge +2

Hi


I have some more doubts about the K2 Client Error. So far there are 2 types of error encountered:


1) User does not have the right to trigger K2. This is due to user not configured in the domain group. We have alot of users and sometimes we can miss out adding them into the AD. We need to mark it as Failure for retry later.


2) User does not have the right to trigger K2 due to event already triggered before. We can still mark it as Success and just complete the flow in our code.


Now it seems both give the same errorcode 24411. How do we distinguish between the 2? Also is there any convenient way in the API that allows us to get the error code or we need to parse the error message for the code?


Cheers,


lyf

Reply