Mashables and Mashups : Mashups in EMML : Writing Mashups in EMML : Controlling Mashup Processing Flow : Database Mashable Transactions
Database Mashable Transactions
 
<presto:beginTransaction>
<presto:commitTransaction>
<presto:rollbackTransaction>
For database mashables created in Business Analytics 2.7.0 or earlier, you can add transaction handling using these Business Analytics extension statements:
*<presto:beginTransaction>: opens a connection to the database associated with the mashable specified in the command and sets AutoCommit to false.
*<presto:commitTransaction>: sends a commit message to the database associated with the mashable specified in the command and closes the database connection.
*<presto:rollbackTransaction>: sends a rollback message to the database associated with the mashable specified in the command and closes the database connection. The Business Analytics Server also automatically sends a rollback for any invocation failures for the specified Database service within the bounds of the transaction.
Important:  
For transaction handling for database mashables created in later versions of Business Analytics, see SQL Transactions.
The Business Analytics Server does not support distributed transactions. These commands only affect the invocations for a specific database mashable. All other commands are unaffected, including invocations of other services.
Transaction Example
This sample uses a database mashable with operations to insert, update or delete records in several Personnel tables.
...
<presto:beginTransaction service="personnel"/>
<invoke service="personnel" operation="addEmployee"
inputvariables="newEmployee" outputvariable="employeeResult"/>
<invoke service="personnel" operation="addDemographics"
inputvariables="newEmployee" outputvariable="$demoResult"/>
<invoke service="personnel" operation="addBenefits"
inputvariables="newEmployee" outputvariable="$benefitsResult"/>
<if condition="$employeeResult/response/response/errorcode = 300
or $demoResult/response/response/errorcode = 300
or $benefitsResult/response/response/errorcode = 300">
<presto:rollbackTransaction service="personnel"/>
<else>
<presto:commitTransaction service="personnel"/>
</else>
</if>
...
Copyright © 2013-2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback