cancel
Showing results for 
Search instead for 
Did you mean: 

Work Queues - Set Data by child process

MichalPlich2
Level 4

Hi,

I have one main process, and couple of subprocesses (in order to increase readability of main process).
I have "Get next item" action in main process only.
Then my idea is to pass "item id" to subprocesses, so subprocesses can update main queue item with provided item id.
The issue is that when I'm trying to use "Set Data" action (in Work Queues BO), in subprocess, then it gives me  exception:
"The specified item was not locked by this business object"

Is it sth which is not allowed in BP? So item can be only updated by exact process, which locked it?



------------------------------
Michal Plich
PD
Nordea
Europe/Oslo
------------------------------
3 REPLIES 3

EmersonF
MVP
If the item is leased, it must be updated by the process that locked it, what can be done is to assign a tag for identification.
if the item is not leased you can filter the added TAG and decide what to do with the item

------------------------------
Emerson Ferreira
Sr Business Analyst
Avanade Brasil
Recife
+5581988869544
If my answer helped you? Mark as useful!
------------------------------
Sr Cons at Avanade Brazil

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.

MichalPlich2
Level 4
Thank you for your answer. Really appreciate it.

------------------------------
Michal Plich
PD
Nordea
Europe/Oslo
------------------------------