We're trying to implement record locking using @Version JPA. Using the expression a!writetodatastoreentity() will throw an error in designer but not in the actual user interface.
There's nothing similar to even the onError: {} parameter in the process model based option.
Are there any suggestions for capturing a failure and altering the process path accordingly?
Thanks in advance
Discussion posts and replies are publicly visible
Hello Rich,
I am not sure what is exactly your issue? Can you please share more details on your use case? Why you picked the optimistic locking and what is the final goal.
The problem is On the function or the process model? Are you maybe calling the process with startProcess function or something like that ?
Can you please share more details,
- On which version you are?
- How are you adding the locking on the cdt? maybe just share ele element of the cdt/Xsd
- are you expecting the actual error message ? Or you want to know there was an error?
- have too taken a look to the logs and check if there was an error message ?
The documention of that function does give you the onError Option for that function. Please refer to the docs,
It is mentioned like “onError (Any Type): A list of saves or an HTTP response to execute when the smart service does not execute successfully. Created with a!save() or a!httpResponse().”
In case of the process model, well if it fails to insert the process will stop with error, and you will be able to see the error on the node on the “error” tab. So if you need to take action if any of this situations happens, maybe you will need to check the value or change the application to avoid that scenario.
Hope this helps
Jose