How to commit a transaction in Oracle Workflow

Hi All,
Oracle says there should not be any commit in Oracle WF .It is the responsbility of the calling program to Call Commit.
I have the following Requirement:-
I want to insert a record in one of the custom table, when a record is saved in one of the Oracle Apps Form( for e.g. insert a record in the custome table when user creates PO.)
What I have done is :-
1) Added a subscription to one of the seeded events that is raised when user saves a record in the Oracle apps.
2) Designed a Custom Function, that is called when the above subscription is triggered off.
3)The above custom function inserts a record in the custom table.
Q ) where to write a Commit ( as this custom function is called from the WF and WF says, dont put commit in the WF,it should be called by the callling program)
Can also you explain me , when user presses the Save button on the Oracle standard form--> that calls the Oracle API to create a record in the DB and commit , ---> then the event is raised and trigger offs all the subscriptions where does it commit then?
Thanks

Hi,
The commit should be done by the form, or whatever raises the business event.
The API fires the event in the same transaction (unless the subscription is deferred), and then the commit is issued. This commits the transaction, and all actions of the event subscription.
If the subscription is deferred, then the concurrent request which processes the subscription will issue the commit on completion.
HTH,
Matt
WorkflowFAQ.com - the ONLY independent resource for Oracle Workflow development
Alpha review chapters from my book "Developing With Oracle Workflow" are available via my website http://www.workflowfaq.com
Have you read the blog at http://thoughts.workflowfaq.com ?
WorkflowFAQ support forum: http://forum.workflowfaq.com

Similar Messages

  • How to commit each record in Oracle Form Personalization

    Hi,
    how to commit each record with out using save button in form...my requirement is when cursor goes to next record it vil automatically stored in database please give me your valuable suggestion...
    Actual Requirement:
    here we need to give the locators(it is  number) whenever the cursor goes to next record it vil automatically incremented by 1(i wrote query for incremetation) and previous one vil be stored in database.
    Here i am using WHEN NEW ITEM INSTANCE IS USED Trigger..
    Thank You,
    Regards,
    Putta

    Hi,
    The commit should be done by the form, or whatever raises the business event.
    The API fires the event in the same transaction (unless the subscription is deferred), and then the commit is issued. This commits the transaction, and all actions of the event subscription.
    If the subscription is deferred, then the concurrent request which processes the subscription will issue the commit on completion.
    HTH,
    Matt
    WorkflowFAQ.com - the ONLY independent resource for Oracle Workflow development
    Alpha review chapters from my book "Developing With Oracle Workflow" are available via my website http://www.workflowfaq.com
    Have you read the blog at http://thoughts.workflowfaq.com ?
    WorkflowFAQ support forum: http://forum.workflowfaq.com

  • How to configure global transaction wthin Oracle AS JMS and Oracle JMS

    How to configure global transaction if I take a message from Oracle JMS(AQ) and send it to the Oracle JMS?

    Which version of OC4J are you working on?
    In OC4J 10.1.3.x, presume your OC4J JMS listens messages via MDB which uses a resource adapter as a message listener. The resouce adaper could be the generic JMS adapter deployed in OC4J as the default.
    Resource adapter configuration to support MDBs is included in the standard ra.xml file, which lists the message listener types that the resource adapter supports.
    The MDB developer or deployer configures the MDB in the ejb-jar.xml file, through a <message-driven> element.
    In addition to above, configuration in the ejb-jar.xml file specifies whether an MDB uses transactions.
    1) The <transaction-type> subelement of <message-driven> in ejb-jar.xml has a value of Container, and the <trans-attribute> subelement of <container-transaction> (under the <assembly-descriptor> element) has a value of Required. In this circumstance, if there is an imported transaction, then message delivery and related work are performed within that transaction. If there is no imported transaction, OC4J creates a transaction, and message delivery and related work are performed within that transaction.
    2) The <transaction-type> subelement of <message-driven> in ejb-jar.xml has a value of Bean. In this circumstance, the MDB manages the transaction. If a transaction is imported, OC4J will suspend it before the message delivery method call to the MDB, in order to avoid conflict.
    Message delivery is not transacted if the <transaction-type> subelement of <message-driven> in ejb-jar.xml has a value of Container, but the <trans-attribute> element has a value of NotSupported. If there is an imported transaction in this circumstance, OC4J will suspend the transaction before the message delivery method call to the MDB.
    Details could be found from OC4J Resource Adapter Guide.

  • Unable to commit a transaction Using Oracle

    Hi all,
    I have created a JDBC System using the following link.
    http://help.sap.com/saphelp_nw04/helpdata/en/ab/082484173ae045ab8dad8a41d33da3/frameset.htm
    The JDBC Datasource is working absolutely fine , in my database actually autocommit is off , so i need to commit a transaction explicity , when i try using connection.commit() , it gives me the following eroor
    Commit not possible , xadatasource.
    Can any one provide the reason for this , and what is the alternative for the Same.
    Points will be rewarded for helpful answers
    Regards
    Sara

    Hi Sara,
    Are you using XADatasource ?I think it is an issue (http://wiki.jboss.org/wiki/Wiki.jsp?page=ConfigDataSources)with that
    try using this
    DataSource Type :-ConnectionPoolDataSource
    ClassName:-oracle.jdbc.pool.OracleConnectionPoolDataSource
    just restart the service and use it in your code.
    Thanks
    Pankaj

  • How to configure distributed transaction in Oracle Database Gateway for ODBC? (ORA-02047)

    I am connecting from Oracle to another database server (MS SQL Server, DB2 the error message is the same) through an ODBC connection using Oracle SQL Developer. (This is how I set up)
    I want to query the schema of a non-Oracle database using the data dictionary mapping of the Oracle Database Gateway for ODBC.
    This works well:
    select * from all_tables@katimssql;
    But this doesn't:
    create table alltables_mssql as
    select * from all_tables@katimssql;
    Output:
    Error report:
    SQL Error: ORA-00604: error occurred at recursive SQL level 1
    ORA-02047: cannot join the distributed transaction in progress
    ORA-06512: at "SYS.HS$_DDTF_SQLTABLES", line 58
    ORA-06512: at line 1
    Does anyone know the solution of this?
    Thanks in advance,
    Kata
    Details:
    Oracle Database 11g Express Edition Release 11.2.0.2.0
    Microsoft SQL Server 2008 (SP2) - 10.0.4000.0 (X64)
    ODBC Driver: SQL Server Native Client 11.0 (32 bit)
    initkatimssql.ora:
    HS_FDS_CONNECT_INFO=katimssql
    HS_FDS_TRACE_LEVEL = ON
    HS_TRANSACTION_MODEL = READ_ONLY_AUTOCOMMIT
    I tried these, none of them worked, the error message is the same.
    HS_FDS_TRACE_LEVEL = off
    HS_TRANSACTION_MODEL = SINGLE_SITE
    HS_TRANSACTION_MODEL = READ_ONLY_AUTOCOMMIT
    HS_TRANSACTION_MODEL = READ_ONLY

    Hi Kata,
    this won't work as the ALL_TABLES is not a table that exists in your SQl Server  - instead it is a "mimicked" table. This means the gateway will check if you have on your SQL Server a table called all_tables and when there's no table it will start an internal mechanism to check out what sort of tables exist in your SQL Server database. So the gateway is starting internally another transaction to get details from the foreign database and DG4ODBC can't participate in distributed transactions at all. Instead of using all_tables you have to use a real SQL Server table like SQ Server sys.objects or sys.tables.
    - Klaus

  • How to cancel a transaction in Oracle Lite 10g R3

    Hi,
    I have a publication with 7 publication items (updatables), Server wins in any conclict.
    I made some changes in some records of the 7 tables of my oracle lite database.
    I synchronize the changes, without any error messages, But I cannot find those changes in the tables in my oracle database (9i).
    So, I check in the Mobile Manager, in the Data Synchronization/Repository/Input Queue.
    I find the transaction #203 with all the publication items.
    I also find an error in the "Error queue", It seems like there was a conclict in one of my publication items. So I choose the option "Take value from server", then the error disapear from the "Error queue". However, the transaction stay in the "Input queue".
    I made other changes to the tables in the database lite, and then synchronize. But It seems like nothing happens, there isn´t any other transaction in the "input queue", and I cannot fin all the changes I made in my database (9i).
    Can anyone help me????
    Regards, Santiago

    I found this messagein the MGP History User
    Applied Record     Counts:
    Insert Count     = 3
    Update Count     = 6
    Delete Count     = 0
    Applied PubItems:
    TECNICO
    SUSCRIPTOR
    LISTA_MATERIALES
    LIQCLI
    VALORAC_ACTIVIDADES_OPE
    CARGA_DEMANDADA
    DESCSOL
    TECNICO
    SUSCRIPTOR
    LISTA_MATERIALES
    LIQCLI
    VALORAC_ACTIVIDADES_OPE
    CARGA_DEMANDADA
    DESCSOL
    TECNICO
    SUSCRIPTOR
    LISTA_MATERIALES
    LIQCLI
    VALORAC_ACTIVIDADES_OPE
    CARGA_DEMANDADA
    DESCSOL
    Compose Error:
    java.lang.Exception: MGP apply_before_compose aborted and compose postponed for SGARCIA as apply will generate sync errors
         at oracle.lite.sync.Consolidator$O8Server.fastPush(Unknown Source)
         at oracle.lite.sync.MGP$MGPG.run(Unknown Source)
         at java.lang.Thread.run(Thread.java:534)
    /*********************************************/

  • How to install oracle workflow middle tier in 10.2.0.4 64 bits

    Hi all !
    i've installed oracle workflow middle tier several times using oracle 10g companion CD release 1, 32 bits.
    Database has been upgraded to 10gR2 (10.2.0.4) and operating system upgraded to windows 2008 enterprise 64 bits.
    I've downloaded oracle companion CD 10.2.0.4 64 bits but there is no option for installing Oracle Workflow Middle Tier :(
    How should i proceed to install oracle workflow middle tier for 10.2.0.4 in an 64 bits operating system?
    Best Regards
    Rui Madaleno

    Any feedback, please?

  • Call business event from oracle workflow

    Hi,
    how to call business event from oracle workflow ?
    if possible, could you give any sample code.
    Thanks.

    In short terms: assign values to the attributes that compose the payload of the event. Then raise it. Here a simple example of raising the Flex Field compilation event:
    declare
    l_application_id fnd_application.application_id%TYPE := &1;
    l_descriptive_flexfield_name varchar2(200) := '&2';
    l_application_short_name fnd_application.application_short_name%TYPE;
    l_parameters wf_parameter_list_t := wf_parameter_list_t();
    begin
    SELECT application_short_name
    INTO l_application_short_name
    FROM fnd_application
    WHERE application_id = l_application_id;
    wf_event.addparametertolist(p_name => 'APPLICATION_SHORT_NAME',
    p_value => l_application_short_name,
    p_parameterlist => l_parameters);
    wf_event.addparametertolist(p_name => 'APPLICATION_ID',
    p_value => l_application_id,
    p_parameterlist => l_parameters);
    wf_event.addparametertolist(p_name => 'DESCRIPTIVE_FLEXFIELD_NAME',
    p_value => l_descriptive_flexfield_name,
    p_parameterlist => l_parameters);
    wf_event.raise(p_event_name => 'oracle.apps.fnd.flex.dff.compiled',
    p_event_key => (l_application_short_name || '.' ||l_descriptive_flexfield_name),
    p_event_data => NULL,
    p_parameters => l_parameters,
    p_send_date => Sysdate);
    end;
    Regards.

  • How to run Oracle workflow in windows 7 os

    Hi,
    Am new to oracle workflow.
    I have installed oracle workflow successfully in my laptop.
    After installation I dont see any shortcut's in my desktop.
    Can any one sugess me how to run oracle workflow.
    Steps to begin from basic level.
    Thanks
    Balaji

    You mean to say you installed Workflow Builder on your laptop? See that Oracle Workflow has a Client Side (WF Builder), a backend Server side and middle application side.
    Assuming you successfully installed the client side then you must have a group of programs called Oracle OUIHome and there one called Application Development. There you should be able to find Workflow builder.
    Useful notes for WF Builder:
    How To Download and Install the Latest Oracle Workflow Builder (Client Tool) and XML Gateway Message Designer for E-Business (Doc ID 261028.1)
    which leads to <internal URL removed>
    Regards.

  • Oracle ADF: Cannot Commit Database Transaction

    Hi All
    I am trying to update oracle database using Oracle ADF from command line. The following is my code snippet
      final String amName1 = "taxreturn.AM_Taxreturn";
      final String connStr = "jdbc:oracle:thin:o9ias/[email protected]:1521:t1fdbo";
      Hashtable env = new Hashtable(2);
      env.put(Context.INITIAL_CONTEXT_FACTORY, JboContext.JBO_CONTEXT_FACTORY);
      env.put(JboContext.DEPLOY_PLATFORM, JboContext.PLATFORM_LOCAL);
      ApplicationModule appMod1 = null;
    try {
       javax.naming.Context ic = new InitialContext(env);
      ApplicationModuleHome home1 = (ApplicationModuleHome)ic.lookup(amName1);
      appMod1 = home1.create();
      appMod1.getTransaction().connect(connStr);
    } catch (Exception e) {
        e.printStackTrace();
      ViewObject t1xvVO = appMod1.createViewObject("t1xvVO", "taxreturn.T1XrefVView");
      t1xvVO.setWhereClause("T1X_T1FU_USERID='" + "testlin2" + "' and T1X_T1_TAXYEAR='" + "2012" + "' and T1X_DELETED is null and T1X_INVOICE_T1_150 is null");
      t1xvVO.executeQuery();
    Row rowT1xv = null;
    int count = 0;
    while (t1xvVO.hasNext()) {
    count++;
    rowT1xv = t1xvVO.next();
    System.out.println("Number of records: " + count);
    t1xvVO.executeQuery();
    if (t1xvVO.hasNext()) {
        rowT1xv = t1xvVO.last();
        System.out.println("First Name: " + rowT1xv.getAttribute("T1FirstName"));
        System.out.println("T1xInvoiceT1150: Before: " + rowT1xv.getAttribute("T1xInvoiceT1150"));
        rowT1xv.setAttribute("T1xInvoiceT1150", "250");
        //appMod1.getTransaction().postChanges();
        System.out.println("T1xInvoiceT1150: After: " + rowT1xv.getAttribute("T1xInvoiceT1150"));
    System.out.println("Is Dirty: " + t1xvVO.getApplicationModule().getTransaction().isDirty());
    try {
        appMod1.getTransaction().commit();
        System.out.println("Commit succeeded.");
    } catch (oracle.jbo.JboException e) {
        System.out.println("Commit failed. " + e);
    I can see there are total 3 records retrieved. Then I execute query for the view object again and change the last record. But after the commit statement, the database is not update. What's wrong here? Thanks in advance
    Leaf

    Refer 6.4.9 How to Create a New Row for a View Object Instance
    http://docs.oracle.com/cd/E37975_01/web.111240/e16182/bcqueryresults.htm#sm0094
    The procedure to create an ApplicationModule and find View object is different than in the code snippet. Use the procedure in the link.

  • Exception during commit of transaction in wli when using oracle database

    I have configured oracle Database instead of pointbase in wli 9.2
    While getting the response through callback in wli process (from Worklist console)this errror is coming "Exception occurred during commit of transaction ".
    What should I do to remove this error??
    Stack trace is
    <Jan 6, 2007 5:19:59 PM CST> <Error> <EJB> <BEA-010026> <Exception occurred during commit of transac
    tion Xid=BEA1-012806F477B49C8F6264(7312912),Status=Rolled back. [Reason=weblogic.utils.NestedRuntime
    Exception: Error in beforeCompletion],numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=
    0,seconds left=60,XAServerResourceInfo[WLStore_oracle1domain_cgJMSStore]=(ServerResourceInfo[WLStore
    oracle1domaincgJMSStore]=(state=rolledback,assigned=AdminServer),xar=WLStore_oracle1domain_cgJMSSt
    ore1269044,re-Registered = false),XAServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(Ser
    verResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(state=rolledback,assigned=AdminServer),xar
    =weblogic.jdbc.wrapper.JTSXAResourceImpl@14c0a31,re-Registered = false),SCInfo[oracle1domain+AdminSe
    rver]=(state=rolledback),properties=({weblogic.jdbc=t3://199.81.36.226:7001}),local properties=({mod
    ifiedListeners=[weblogic.ejb.container.internal.TxManager$TxListener@1442c7b], class com.bea.wli.bpm
    .runtime.JpdContainer$TxnListener1168125300187=com.bea.wli.bpm.runtime.JpdContainer$TxnListener@1313
    24d}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=AdminServer+199.8
    1.36.226:7001+oracle1domain+t3+, XAResources={WLStore_oracle1domain_cgJMSStore, WLStore_oracle1domai
    n_WseeFileStore, WLStore_oracle1domain__WLS_AdminServer, weblogic.jdbc.wrapper.JTSXAResourceImpl},No
    nXAResources={})],CoordinatorURL=AdminServer+199.81.36.226:7001+oracle1domain+t3+): weblogic.transac
    tion.RollbackException: Unexpected exception in beforeCompletion: sync=weblogic.ejb.container.intern
    al.TxManager$TxListener@1442c7b
    Error in beforeCompletion
    at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java
    :1782)
    at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.
    java:331)
    at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:227
    at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:463)
    at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:335)
    at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:291)
    at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4060)
    at weblogic.jms.client.JMSSession.execute(JMSSession.java:3953)
    at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:4467)
    at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
    .>

    Did you get a solution to this problem ?I am seeing similar exceptions intermittently .
    Thanks,
    Meena.

  • How to use java api for function activity in embed oracle workflow?

    because i can't install standalone oracle workflow successfully.
    pls tell me how to use java api for function activity in embed oracle workflow?
    are there some patch or pulg-in package?
    ths a lot...........

    The Java Function Activity Agent is not certified for Oracle Workflow embedded in Oracle Applications. Installing standalone workflow should be a lot easier than what you have found, although it looks like you did hit a Pentium 4 issue with the Oracle Universal Installer. I suggest you contact Oracle Support or Oracle Consulting for assistance.
    because i can't install standalone oracle workflow successfully.
    pls tell me how to use java api for function activity in embed oracle workflow?
    are there some patch or pulg-in package?
    ths a lot...........

  • How to use Oracle Workflow in Apex

    Hi All,
    I want to use oracle workflows in my apex application.
    can anybody tell me how can I get this ?
    Thanks in advance..
    Database version : 11g XE
    Apex version : 4.0
    Nagesh Patil

    Nagesh.Patil wrote:
    Hi All,
    I want to use oracle workflows in my apex application.
    can anybody tell me how can I get this ?
    Thanks in advance..
    Database version : 11g XE
    Apex version : 4.0
    Nagesh Patil
    Oracle Workflow is only available as a component of EBS. It has never been available on, and is not certified for Oracle 11g, nor any version of XE.

  • How to design Forms and Reports using Oracle workflow 2.6

    Is it possible to design Forms & Reports for Data Entry and
    reporting purposes using oracle workflow standalone version?
    if so how?.
    Please helpme!! is veri urgent.

    Con este apellido seguro que entiendes el Espaqol.
    Mi empresa esta iniciando un proyecto con la tecnologia que
    estas buscando, es decir, Utilizar Forms y Reports para manejar
    las APIS de WorkFlow Server, hemos encontardo muchos problemas,
    el principal es que la API de WorkFlow es demasiado pequeqa para
    manipular todos los procesos de WorkFlow por este motivo nos
    hemos visto obligados a acceder a tablas y vistas del modelo de
    datos de WorkFlow.
    Saludos.

  • How to Install oracle workflow and why we need Oracle Application Server

    I want to install and configure Oracle Workflow using Oracle 10g
    Please help me and guide me with the process in deatial from scratch what should i need to install
    Oracle Database
    Oracle Application server middle tier
    Oracle Content Management SDK
    Also help me how can i configuer oracle internet directory because when installing Oracle application server it requires HostName and Port No.
    I am a student
    I know just how to install oracle database 10g
    and New to oracle Application Server
    Waqar Habib

    The files at
    http://otn.oracle.com/software/products/ias/workflow/htdocs/winsoft.html
    are for Oracle Workflow version 2.6.0. Here is some information from the announcement for downloading the latest version, 2.6.3:
    Oracle Workflow 2.6.3 for Oracle Database 10g is now available for download from OTN.
    Please point your browsers to http://otn.oracle.com/software/index.html
    Currently, the availability is limited to Windows and we are working towards availability on other platforms. I will post another message as soon as it becomes available.
    The Workflow Server requires an Oracle 10g database home and the Workflow mid-tier requires an Oracle HTTP Server home - Apache Install from the Oracle 10g Companion CD. For more information please read the installation notes.

Maybe you are looking for

  • BAPI_DOCUMENT_CREATE2 with CHARACTERISTICVALUES

    Hello I'm trying to use the FM BAPI_DOCUMENT_CREATE2 filling the CHARACTERISTICVALUES table but i'm not sucessfull, anybody has an example or others? The type of the characteristics is 017,  values are stored in AUSP table but the characteristic is a

  • Error Handling in Forms

    Dear all, we are using oracle developer suite 10g r2 with oracle database 10g r2 against windows server 2003. Error handling is a very big issue. i try to do the following, just correct me, or make the trigger more efficient. i face unexpected messag

  • Every 10-15 minutes Firefox 3.6 cannot load pages (from bookmarks or links) and must be re-started

    Every 10-15 minutes I find that clicking a link in a webpage or selecting a bookmark will elicit the white error page message that the target page could not be loaded; usually (but not always) I will be told that my internet connection "does not seem

  • Good way to trigger exit event for VI's loaded in subpanels?

    Sorry if this is a novice question, but I haven't gotten much traction searching for an answer the last couple days. I have a setup that uses remote panels for an interactive "lab."  The panel loads a reentrant VI that is just a tab control, the fron

  • Oracle Login with sysdba not working

    Hi All, I have oracle datatbase version 9.2.0.4 on solaris 9. I have assigned sysdba to a user with grant command. when i am trying to login with as sysdba option from a remote system running windows 2000 server, its giving error as follows. ORA-0103