Question
2
Replies
121
Views
Posted: May 29, 2017
Last activity: June 14, 2017
Closed
Solved
restrict multiple creation of subcases (of the same type) until user actions subcase
Hello,
We have a situation where based on a SOAP request, we trigger the creation of a subcase. In the event that a second request comes again before the original subcase is actioned, we should not be creating another subcase. If the user is already 'actioning' the subcase, we would allow the creation of the subcase.
Any idea how to proceed. The subcases are getting created multiple times at this time and I am not sure how to restrict this behaviour.
Thanks
It sounds like you should look at the locking functions available from the developer portal under
( i ) > Engine APIs
See class LockManager .
in particular, those functions let you use any string as a lock key, so you can lock on your intended-ID instead of it needed to be an already-existing ID.
That way, if you have a second process attempt to lock on the SAME intended-ID, it will get an error indication showing that another process is already creating that ID.