This site is currently read-only as we are migrating to Oracle Forums for an improved community experience. You will not be able to initiate activity until January 30th, when you will be able to use this site as normal.

    Forum Stats

  • 3,889,743 Users
  • 2,269,775 Discussions


Closing a task flow with transactions, but no changes

Tony De Buys
Tony De Buys Member Posts: 4
edited Mar 11, 2015 10:50AM in JDeveloper and ADF

Hi there

When using bounded task flow that use shared transactions I would like to know what is best practice when closing the task flow if no changes need to be persisted to the database.

We would like to have three buttons on our pages/fragments: Save, Cancel, Close.  The Save button flows to a TaskFlowReturn which has an End Transaction set as commit.  The Cancel button has an End Transaction set to rollback. 

We intend the Close button to simply return to the calling flow, without calling a commit or rollback.

We can enable/disable the buttons depending on the "dirty" state.

We cannot, however, put a TaskFlowReturn on the flow without setting the End Transaction setting.

My question is: would setting a rollback End Transaction on the close button result in an unnecessary call to the database?

How should this be implemented should we want the Save, Cancel and Close buttons?

Thanks in advance


  • Timo Hahn
    Timo Hahn Senior Principal Consultant Cologne, GermanyMember, Moderator Posts: 39,055 Red Diamond
    edited Mar 11, 2015 8:41AM

    You should use commit. The commit is only executed in the task flow which holds the transaction which is the parent task flow. If a sub task flow commits nothing happens and the changes are be committed when the parent commits.  If nothing has changes nothing happens.

    If you use a rollback the parent has to rollback his changes too, which is not what you want to do.


  • Zlatko Sirotic
    Zlatko Sirotic Pula, CroatiaMember Posts: 2,134 Gold Trophy
    edited Mar 11, 2015 10:50AM

    When using bounded task flow that use shared transactions ...

    Which settings has your taskflow, perhaps:

    Shared Data Control Scope + Use Existing Transaction if possible ?



This discussion has been closed.