How to make execute "OnSuccess" of a!startprocess only if all the DB Delete/Write operations in that ProcessModel done its execution

Hi,

I have an issue where i am calling a Process Model through SAIL Interface using a!startprocess, having one DB Delete Operation in it.

Now the issue is,Process Model along with DB Deleting operation is getting executed successfully but "OnSuccess" of a!startprocess is getting executed prior to DB Deletion operation, as the data along with deleted row is getting populated in the local variable(calling using Expression Rule) in "OnSuccess" of a!startprocess.

Could someone help me with this issue.

Code Snippet:

a!imageField(
images: a!documentImage(
document: a!iconIndicator(
icon: "REMOVE"
),
link: a!dynamicLink(
saveInto: {
a!startProcess(
processModel: cons!PMCONSTANT,
processParameters: {
PrimaryKeyPV: fv!item.serialNo,

----

-----
},
onSuccess: {
a!save(
local!rows,
rule!getEmployeeDetailsUsingID(
local!empid
)

)})})))

 

Regards

Venkatesh

  Discussion posts and replies are publicly visible

Parents
  • Hi,
    Instead of a!startProcess() you could use a!deleteFromDataStoreEntities() smart service expression. Performance wise this is faster than invoking a process to delete the data from DB.
    Having said that, if your use case demands a process to be used in order to do some more checks/operations before delete the data from DB, then you need to chain all the activities till the deletion node.

    Thanks
Reply
  • Hi,
    Instead of a!startProcess() you could use a!deleteFromDataStoreEntities() smart service expression. Performance wise this is faster than invoking a process to delete the data from DB.
    Having said that, if your use case demands a process to be used in order to do some more checks/operations before delete the data from DB, then you need to chain all the activities till the deletion node.

    Thanks
Children
No Data