We would like to use Smart Service to delete records from the DSE (Data Store Entity) and create records according to the input received from the screen.In this case, will the Delete and Write transactions be separated?For example, if Write after Delete fails for some reason, I would like the Delete transaction to rollback.
Please let me know if there is a way to execute Delete and Write in the same transaction on Smart Service.
Discussion posts and replies are publicly visible
I my experience, it is a better approach to not make the database manage a transaction, but to look at the Appian process to be that instance.
Probably for the first time ever I have to disagree with you. Here's why;
Until we get native "Begin Transaction" , "End Transaction", "Rollback Transaction" commands that can bracket multiple Smart Services in an Appian Process then by far the safest and reliable method is to use the DB's native functionality and incorporate this in a Stored Procedure.
LOL. I appreciate that you disagree. And the pattern I described does not fit all scenarios.
I try to keep as much logic as possible inside Appian and only offload to external systems, which includes the database, only when I have to. Now, when people join the Appian universe from a more database focused environment, some try to stay with their old approaches and loose a lot from the simplicity of Appian.
Understood and appreciate where you're coming from. We have to recognize the alternate danger of trying to do everything in Appian even when it doesn't meet the actual need as I feel this example highlights.
Agreed. Tools have a specific purpose and should be used accordingly.
Hello,
I have a similar requirement and may I know what was the approach used to handle this requirement ?
Is Stored procedure is the best way to handle this or is there any better approach to do in Appian process itself ?
Thanks