Hi Michal,
The solution recommended by
@EmersonF is exactly how you should be going about. Only one pointer to add here, whenever you are using get next item in the Main page try to use a tag filter which you can be using while adding the work queue items to the queue. Once the items are populated and the flow goes to your 'Get Next Item' stage based on the initial tag filter that you give the item ID will be picked. Based on the tag, you can pick the Item ID and pass the same to the sub process and do the updating and then you must either unlock the item, mark the status as exception or completed. If you go for marking the item it is simple but if you are trying to unlock the item so that you can reuse it, you can probably update the tag so that it does not get picked up again when your flow goes back to Get Next Item.
Such a scenario if is not handled via tags can result in infinite loop with that item being locked and unlocked again and again.
Also, I would suggest before you step into the stage where you are getting this exception 'Set Data' stage while debugging manually, kindly check the status of your work queue item with the item ID you are currently working on. I highly suspect this is not in a locked state that is why you are getting this error. To resolve it you need to ensure that the item is locked properly using either Get Next Item action which gives you the next item based on the priority, filters( if applied) and FIFO (First In First Out) mechanism if neither of the prior two parameters are used or Get Item By ID action where you can explicitly pass any item ID to get it as the currently locked item.
------------------------------
----------------------------------
Hope it helps you and if it resolves you query please mark it as the best answer so that others having the same problem can track the answer easily
Regards,
Devneet Mohanty
Intelligent Automation Consultant
Blueprism 6x Certified Professional
Website:
https://devneet.github.io/Email: devneetmohanty07@gmail.com
----------------------------------
------------------------------
---------------------------------------------------------------------------------------------------------------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.