I want to know about to show confirmation form on any error or completion of a particular activity.
Suppose, in write to data store entity, i want to show the alert box on the success updation/insertion of the data.
Discussion posts and replies are publicly visible
The simplest way to do exactly what you specify is to populate PV's using the onSuccess output and onError outputs that come pre-defined in the Write to Datastore node. Then use an XOR gateway on the process model to send flow to one of two User Input tasks. Make your forms to show the error or success, plus any data you got from Write to Datastore you want to show. That and a big friendly submit button the user can use to close the form when they've looked it over enough.
The onSuccess message probably just closes the process when they submit that form. You are free to do whatever you want to handle the error when they submit that form, or just end the process too. Another helpful thing is a timer exception on the confirmation screens, so that it eventually submits on behalf of the user, should they navigate away or do something else like that.
A write to DS node will pause if there is an error. And that is by intention as the process controls integrity of the data in DB.
That does make me wonder why there's an onError output sometimes. Maybe there's errors that don't cause it to crash?
I think the 'OnSuccess' & 'OnError' outputs are available only for the smart service functions & not for the smart service nodes.
Exactly. And this is also why we can only call a single smart service function in a saveInto.