This content has been marked as final. Show 4 replies
Please specify the version of JDeveloper you're using when posting to this forum.
Some documentation on the DataBindings.cpx file can be found here:
However if you're using 11.1.1.X.0 and you're using task flows read this post:
If you're using 11.1.2.X and you're using task flows read these post:
Ensure to read the 2nd post.
Thank you very much for your reply. I am sorry for not mentioning the version. I'm using JDev 188.8.131.52.0.
I had tried task flow transaction options. Although, I didn’t know the background mechanism and your post jdev-11g-task-flows-adf-bc-one-root was very helpful. I have a problem using task flow transaction options. When I use DCJboDataControl.commitTransaction(), everything’s Ok. But if I use ApplicationModule.getTransaction().commit() or postChanges(), only the changes in the current application module are committed. I don’t need to call ApplicationModule.getTransaction().commit(), but postChanges() is something that I need. When I use BC4JDataControl.TransactionName I don’t have this problem. It works well.
I read the documentation on the DataBindings.cpx file, but it doesn’t mention TransactionName. It seems very useful and someone must know something about it.
Apologies for the slow reply, I'm currently travelling.
"When I use DCJboDataControl.commitTransaction(), everything’s Ok. But if I use ApplicationModule.getTransaction().commit() or postChanges(), only the changes in the current application module are committed. I don’t need to call ApplicationModule.getTransaction().commit(), but postChanges() is something that I need."
This confuses me. Are you calling this code from your ViewController level? This is not the standard way to commit from the ViewController layer. You should be accessing this code through the binding layer..... maybe I've misunderstood why you're calling this code directly?
However I still believe you should be looking at the task flow transaction options here. These were specifically designed to commit/rollback multiple data controls (such as multiple root Application Module data controls) in a group.
In order to do this from the context of a task flow within the ViewController, if your task flow is part of a task flow transaction (controlled by an internal class known as the DataControlFrame), to commit/rollback the task flow transaction you can either use the task-flow-return "commit" activity or programatically call the DataControlFrame commit() method.
The following section of the ADF Fusion Dev Guide gives more information on the task flow transaction options: http://docs.oracle.com/cd/E23943_01/web.1111/b31974/toc.htm#
Ensure to research this and the data control scope options of the task flow.
In terms of calling the task flow/data control frame operations programmatically, a utility class entitled TaskFlowUtils.java is available here: http://java.net/projects/adfemg/downloads
Please note the class has no implied warranty, use at your own risk.
You don't need to apologize. In fact, I appreciate your help a lot.
We use postChanges() in Model layer. In some cases we need to force the framework to apply some DML instructions before we execute a query using executeQuery method of a ReadOnly ViewObject, because the DMLs affect the result of the ViewObject. Such code is written in methods of ApplicationModules which are called from ViewController. By mentioning ApplicationModule.getTransaction().commit() I tried to make my problem more clear. As you said we commit the transaction through binding layer.
I'll follow the links you mentioned. Although, I'm really curious about BC4JDataControl.TransactionName ;)
I'll post the result.
Thank you very much.