Programmatically determine if a workflow has started a new transaction?

Developers familiar with JDev 11 g features flow defined task ADF (BTF) know about the following options of the transaction for the working group called:

(a) no transaction controller
(b) always start new transaction
(c) always use existing transaction
(d) use the existing if possible transaction

Considers that the option "d", for the BTF called, it attaches to an existing transaction of the caller (options 'b' or 'c', for the appellant), or, if the appellant has not established a transaction (option ' a'), called BTF will establish a new transaction (essentially the answer "d" becomes option 'b').

As such the called BTF can run with a new transaction, or an existing transaction, determined by what the appellant.

Is there a programmatic solution/method for the called BTF determine if it is running with a new transaction or an existing transaction?

Business case:

In the working group called you present a Save"" button. Logically from the point of view of the users 'Save' means to commit to the database. If callee BTF has created a new transaction when the user selects the 'Save' button, ADF is actually committed the data to the database and that responds to the user intuitive expectations. However if the BTF has joined a new transaction, the 'Save' button submits only to environments and the user may be tricked into thinking the record was recorded in the database when it didn't really (yet). To save the data they need instead of returned to the BTF caller who created Save/validate the data of the transaction.

With this description in mind, it becomes necessary when a shared transaction is in progress, to change the label on the button 'Save' to 'Continue' (or any other human readable term that does not have the permanent connotations of 'Save'), the user of this type is not tricked into thinking that the data have been engaged in the database.

Your thoughts and help appreciated.

CM.

The classes TaskFlowCallActivityLogic and TaskFlowReturnActivityLogic in package oracle.adfinternal.controller.activity ( \oracle_common\modules\oracle.adf.pageflow_11.1.1\adf-pageflow-impl.jar JAR files) are responsible for the call and the return of TaskFlows. I know you would avoid rather using inner classes, but it is that I could find.

Take a look at the source of the private method TaskFlowReturnActivityLogic.resolveTransaction ().

You can use the following control:

import oracle.adfinternal.controller.util.StateUtils;
import oracle.adfinternal.controller.state.ViewPortContextImpl;
import oracle.adfinternal.controller.state.PageFlowStackEntry;

ViewPortContextImpl viewPort = StateUtils.getCurrentViewPort();
PageFlowStackEntry stackEntry = viewPort.getPageFlowStack().peek();
if (stackEntry.isTransactionStarted()) {
  // This TaskFlow has started a new transaction
}
else {
  // This TaskFlow has not started a new transaction
}

Dimitar

Tags: Java

Similar Questions

  • Always start the new transaction option

    Hello

    JDev 11.1.2.4

    Let's say I have 2 workflows, a (BTF1) is configured with always start new Transaction + control of shared data and the second a (BTF2) is configured with no. Transaction controller-control of shared data.

    I enter the BTF1, so a new transaction (tx1) is created. I let the workflow sailing with a menu to BTF2. This point, I did not specify if the transaction should be committed or rollbacked. I then navigate again to the BTF1 (tx2), so a new transaction is created.

    BTF1 (tx1)->-> BTF1 (tx2) BTF2

    What happens to tx1? time waiting and restore?

    Thank you

    Yes, you have to take care at the end of the transaction when you leave the workflow.

    Thank you

  • Programmatically determine what port of entry has been selected

    I use the default sequential model which has two entry points, Test DUT and Single Pass. I would like to determine in my sequence of what entry point has been selected by the operator. It is possible to programmatically determine what port of entry has been chosen, and if so where is that hidden in the massive TestStand API and properties?

    I would have preferred the entry point name to return.

    As long as you're MainSequence, then you can use RunState.Caller.Sequence.Name

    Otherwise, use RunState.Root.Sequence.Name

  • I was looking in my information system; software environment; system drivers and I noticed that many have stopped status. How can I determine which are to be started? How can I start them?

    I was looking in my information system; software environment; system drivers and I noticed that many have stopped status.  How can I determine which are to be started?  How can I start them?

    Hello

    · Do you see a problem with your computer?

    You can check the links which has more information on the information system: Description of Windows XP system information (Msinfo32.exe) tool: http://support.microsoft.com/kb/308549

  • How to determine if my PC has a Bluetooth function

    Past review windows help.

    Original title - how to determine if my PC has a Bluetooth facility? __Si a, is possible to download the software to connect to my laptop? *

    Bluetooth is more than simple software - it is a hardware device that communicates with bluetooth devices.  Software alone won't do the trick.

    Go to start / Control Panel / Device Manager and see if there is no list for a bluetooth device driver.  If this isn't the case, you probably have no bluetooth.  The best way to check is to contact the manufacturer of the computer and provide them with your serial number and have them check your system to see if bluetooth is installed.  Also, if you have there is probably an icon of Bluetooth configuration in the Control Panel-, but it can be a separate program or included in other categories.  Otherwise, you need both a bluetooth compatible device with your computer and your version of Vista (and appropriate software, firmware or drivers) - more you need set up and configure - and all that is required by the mobile to establish a bluetooth connection.  Here is an article that covers in detail: http://windows.microsoft.com/en-US/windows-vista/Set-up-a-Bluetooth-enabled-device.

    I hope this helps.

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • Programmatically determine if micro sd card encryption is enabled

    I create the code that needs to require that the micro sd card has encryption enabled on it.

    I so need programmatically determine that it is activated and if it is not my application must then leave.

    (1) is there a way to tell?

    It would be better if there was a way to tell which of the 3 types of encryption is enabled.

    (2) if it is not a way, so is there a way to make sure that the BES has set a strategy which tells the BlackBerry this micro sd card encryption must be activated?

    Thank you

    Unfortunately, there is no mechanism in place today to allow you to determine if the contents of the SD card is encrypted or you can determine if a policy is in place to force encryption of the SD card on the device.

    That said, the encryption on the SD card is intended to ensure the content of the SD card when removed from the unit.  The user would have full access to all content on the SD card and would be able to copy the files from the SD via USB Mass Storage without encryption.

    It is for this reason that we simply put in place encryption in the API itself (JSR-75) rather than expose APIs for what he.  If you consider your content to the need for additional security, I encourage you to encrypt the content yourself based on the Crypto API on the device.

  • How to determine if an exe has been installed?

    Gurus:

    I have Windows 7 and Norton-Anti-anti-virus/firewall.

    I came across a strange pop-up message when I logged in to my computer today. A pop-up window, said that "do you want to install \SYSWOW\MAClean.exe (not sure the path or the name of the exe)? While I was doing research on it using another computer, he disappeared. What is one-sided, I don't think any exe with MA*.exe in the computer. My computer also seems to be suspended during indexing - it connects normally - no delay - if I remove the wireless connection. other times, he connects very well, even with the wireless connection is ON.

    My questions are:-

    (1) how to determine if an exe has been installed ("I see not all facilities in uninstall it or change of program" window in the control panel)?

    (2) is it possible to list out all messages 'Alerts' or 'Popup' that appears on the screen?

    Best regards

    San

    HI San,

    Thanks for posting your question on the Forum of the Microsoft community.

    This can happen if the corresponding .exe file is associated with a program that is installed on your computer. To check the instance of the file, you can check in the list of programs and features in Control Panel. Apart from this, it can be due to an infection by the virus.

    To know different alerts and notifications, you can open the Action Center in Windows and check important notifications or the needs of Windows to accomplish tasks. To do this, please refer to the following location: Start > Control Panel (see: large icons) > Action Center.

    Also, you can also check error messages in the event viewer for more information.

    (Click Start, type Event Viewer in the Start Search and press ENTER.)

    To check the program third party or service by giving pop-ups/alerts, you can start the computer in a selective startup with no third-party software in operation. This process is known as a clean boot.

    How to perform a clean boot in Windows
    http://support.Microsoft.com/kb/929135

    Note: See "How to reset the computer to start normally after a boot minimum troubleshooting" to reset the computer to start as usual after a repair.

    In addition, if your computer hangs or crashes often, I suggest you to try the steps from the following link.

    8.1 Windows, Windows 8 or Windows 7 hangs or freezes

    http://support.Microsoft.com/kb/2681286/en-us

    Warning: The data files that are infected must be cleaned only by removing the file completely, which means that there is a risk of data loss.

    I hope this information is useful. Please post for any further assistance.

  • Thunderbird has started printing stuff unwanted header when I try to print emails I sent.

    Thunderbird has started printing stuff unwanted header (X-Mozilla-status:..., references:, Message-ID, etc.) when I try to print emails I sent.

    How can I get rid of these?

    Thank you.

    View-Headers-Normal instead of all

  • Firefox has started to crash at startup, after that I seconded a bookmark bar button

    Firefox has started crashign at startup after I seconded a button in the bookmarks bar. It does not start in SafeMode either.

    This looks like a problem with the taskbar previews.

    It is possible that there is a problem with the sessionstore.js and sessionstore.bak files in the Firefox profile folder.

    Delete the sessionstore.js file [2] and files possible sessionstore-# .js [3] with a number and sessionstore.bak in the Firefox profile folder.

    Delete sessionstore.js will cause App Tabs and tab groups and opened and closed the tabs (back) to get lost, so you will need to create them again (take note or bookmarks).

    See also:

    Create a new profile as a test to see if your profile is the source of the problems.

    See "basic troubleshooting: a new profile:

    There may be extensions and plugins installed by default in a new profile, so check that in "tools > Modules > Extensions & Plugins" in case there are still problems.

    If this new profile works then you can transfer files from the old profile to the new profile, but make sure not to copy corrupted files.

    See:

  • Re: Tecra M4 has started making a very annoying sound

    Hello

    Some time ago my Tecra M4 has started doing a very annoying sound. It's a constant high tone. You don't hear it very clearly, but I'll give you a headache after a while.
    Does anyone know what it is and how I can make them disappear?

    Thank you!

    Sincerely,
    Seppe

    Hello

    have you tried to play with the microphone settings? It seems annoying this noise comes from the microphone

  • Equium A100-338 has started to go very slow after using the recovery CD

    I used the recovery CD after my Equium A100-338 has started to go very slow, it still seems slower than it used to be.
    I haven't added anything to the computer from the CD recovery and verified the Manager tasks to see if I could spot anything suspicious.

    Statistics say, use 18-22% CPU, but the physical memory is about 68% is this normal or should it be less?

    Is there a list of standard processes I can check against mine to see if its doing something, it shouldn't be?

    Thank you

    Hello

    I think you feel that unity is a bit slow due to the high amount of different processes that run in the context of the BONE.

    The fact is that your laptop supports various features such as buttons FN, Toshiba control buttons, etc.
    All this has needs drivers.

    In addition, as I m not wrong the Norton Internet Security has been installed on your system.
    It s part of the image of Toshiba and this tool could affect the performance of the system.

    I have used in the past, but now changed to another application that doesn t need a lot of material resources.

    So if you want you can disable or delete some of the tools and utilities that are not important to you and could clean the system using a 3rd third party tool called CCleaner

    Welcome them

  • What is the order of the removal of the songs to an iPod Classic syncing > somehow my laptop has started the process of synchronization without my knowledge and removed approximately 2,000 songs of my iPod classic.  How can I identify which were delete

    What is the order of the removal of the songs to an iPod Classic syncing > somehow my laptop has started the process of synchronization without my knowledge and removed approximately 2,000 songs of my iPod classic.  How can I identify which were deleted songs?  I always manually move files to prevent this.  I'm on Windows 10.

    Has no way to know that...

    If your library iTunes music fits on the storage space of 160 GB of your iPod classic, you just set to automatically sync your entire library of music.  Then, it won't matter which has been removed and which do not get deleted, because your iPod music library is the same as your library iTunes music.  And iTunes it keeps this way, every time your iPod connection (or click sync , if already connected).

    If you don't want "everything" in your iTunes library on your iPod (understandable), you can create a playlist in your iTunes library with all the songs you want on the iPod.  Then, set to automatically synchronize the playlist to iPod.  Instead of manually managing iPod, you manually manage playlist in your iTunes library.  The iPod has no need to be connected.  The next time you connect the iPod (or click sync , if already connected), iTunes will update the iPod with the same changes.  The big advantage is, if something happens like what you describe, or needs to restore iPod (erased) or even if break you your iPod (and get a new), need you a few mouse clicks to solve the problem.  Just set it up to sync the same playlist once again, which exists in your library iTunes (not only on the iPod).

    You can post back for more information about how to use automatic synchronization to do what you want more easily, go ahead.

  • My monitor has started to Flash a few days ago... now it's for most of the colored lines.

    My monitor has started to Flash a few days ago... now that's for most of the colored lines... I updated the NVIDIA drivers for the NVIDIA Geforce 8400GS from NVIDIA site and it improved for a while, but now he's back. I got tired of another working monitor and the same thing happened so I think that this has to do with the video card.  Help, please.

    HP Pavilion a6130n

    Windows 7 Professional

    3 GB RAM

    400 GB HD

    NVIDIA Gefroce 8400GS

    It worked!  Thanks a lot to vnyga and old_geekster.

  • Why my iPhoto has started 'quit unexpectely' shortly after I click on the info button to access information on a particular photo?

    Why my iPhoto has started "leaving non-response" shortly after I click on the "info" button in order to access information about a particular photo?  It happens with all the photos in my iPhoto.

    I assume you are using v9.4.3 on 10.8.5

    Huxly647 discovered this fix

    1 goto /Applications/iPhoto.app/Contents/Resources

    2 delete the files 'googlemap.html' and googlesearch.html

    IPhoto no longer crashes, site does not work, but it doesn't bother me too much.

  • iPhone 4S.  Stuck on request to post a link to iTunes.  Has started after installing the recent software update.  Tried to turn but the iTunes link keeps coming.

    iPhone 4S.

    Stuck on request to post a link to iTunes.

    Has started after installing the recent software update.

    Tried to turn but the iTunes link keeps coming.

    You can not connect the phone to iTunes as requested?

Maybe you are looking for