ADF business event mechanism

Hi,
I have been reading about ADF business events and it seems to me that the current mechanism (11g) only supports raising events at EO level on DB commit (create/update/delete), AND the service that subscribed to the event will be triggered asynchronously. Is that a correct statement?
what I am looking for is a mechanism to register a UI event (button click, switch to another row, or field value change without actually committing to DB) to a series of services, with some condition evaluation support. At runtime, each of the registered services will be called synchronously if the condition is met, in the specified sequence. Since these services are on the same app server, we also need the optimization to avoid SOAP overhead. Can someone suggest any ADF feature that I can leverage, or if none exists, any suggestion on how to implement something like this?
thanks,
-Ying

Hi,
if you need to implement this in JDeveloper 11 I suggest to ask this question on Oracle internal mail lists or the internal forums. This forum does not cover any topic related to software that isn't publicly accessible
Frank

Similar Messages

  • [SOLVED] ADF BC : event mechanism

    hi
    I'm not sure what I am looking for, but I was wondering if ADF BC had some kind of "event mechanism" to "notify the view of changes in the model"?
    For example, what if I would like to be "notified" (in my view implementation), if a change to some SCOTT.EMP.SAL value would cause the average SCOTT.EMP.SAL value to be above some limit?
    Because ADF BC has this "Active Data Model" implementation, it looks like some "event mechanism" could fit in.
    For things that "go wrong" there is already a "Bundled Exception Mode" feature in place, but maybe a general "event mechanism" could be similar.
    many thanks
    Jan Vervecken

    Thanks for your reply Steve.
    Based on both your sample applications 98 and 101 I have been able to create an example application that has some kind of "model to view event mechanism":
    http://verveja.footsteps.be/~verveja/files/oracle/ADFEventMechanismStuff-v0.05.zip
    It enables me to "react" in the view implementation to "events in the model", like this:
    public class EmpViewAllPanel
         extends JPanel
         implements JUPanel
         private void myInit()
              JboWarningEventBindingContainer vJboWarningEventBindingContainer =
                   (JboWarningEventBindingContainer)panelBinding;
              vJboWarningEventBindingContainer.addJboWarningEventListener(
                   new JboWarningEventListener()
                        public void handleJboWarningEvent(JboWarningEvent pJboWarningEvent)
                             myHandleJboWarningEvent(pJboWarningEvent);     
         public void myHandleJboWarningEvent(JboWarningEvent pJboWarningEvent)
              if (pJboWarningEvent instanceof AverageSalEvent)
                   AverageSalEvent vAverageSalEvent = (AverageSalEvent)pJboWarningEvent;
                   fMyStatusPanel.setAverageSalAlert(
                        !vAverageSalEvent.isAverageSalBelowLimit());
              else if (pJboWarningEvent instanceof CreateEmpEvent)
                   CreateEmpEvent vCreateEmpEvent = (CreateEmpEvent)pJboWarningEvent;
                   fMyStatusPanel.setEmpCreateDate(vCreateEmpEvent.getCreateDate());
    }All suggestions for improvement are welcome.
    I also wonder if there would be an alternative that does not require a DCBindingContainer subclass as a JboExceptionHandler implementation?
    regards
    Jan Vervecken

  • Issues With ADF-BC Business Events.

    Hi All,
    I was just trying out how ADF-BC business events works, so tried to create a small application based on scott.EMP table.
    In the EmpEO entity, created and published a new business event for employee creation.
    However, when I run the AM Tester to see how it works, I faced the 'Business Event Connection Configuration Invalid' error.
    The detailed log is as follows:
    [53] executeQueryForCollection ViewObject:EmpVO1, RowSet:EmpVO1
    [54] EmpVO1>#q computed SQLStmtBufLen: 204, actual=177, storing=207
    [55] SELECT EmpEO.EMPNO, EmpEO.ENAME, EmpEO.JOB, EmpEO.MGR, EmpEO.HIREDATE, EmpEO.SAL, EmpEO.COMM, EmpEO.DEPTNO FROM EMP EmpEO
    [56] ViewObject: [model.EmpVO]AppModule.EmpVO1 Created new QUERY statement
    [57] Bind params for ViewObject: [model.EmpVO]AppModule.EmpVO1
    [58] DBTransactionImpl.mDefaultSparseArrayThreshold is 20
    [59] **** refreshControl() for BindingContainer :AppModule_EmpVO1_0PageDef
    [60] *** DCDataControl.sync() called from :DCBindingContainer.refresh
    [61] **** refreshControl() for BindingContainer :AppModule_EmpVO1_0PageDef
    [62] *** DCDataControl.sync() called from :DCBindingContainer.refresh
    [63] INFO: No app def in BindingContext for: adfFacesContext
    [64] INFO: mDCRefMap lookup failed. Does the cpx have a dataControlUsages 'dc' entry? adfFacesContext
    [65] INFO: No app def in BindingContext for: adfFacesContext
    [66] INFO: mDCRefMap lookup failed. Does the cpx have a dataControlUsages 'dc' entry? adfFacesContext
    [67] DBG: beforeActionPerformed :javax_swing_JToolBara1_16
    [68] OracleSQLBuilder: SAVEPOINT 'BO_SP'
    [69] OracleSQLBuilder Executing, Lock 2 DML on: EMP (Insert)
    [70] INSERT buf EmpEO>#i SQLStmtBufLen: 210, actual=43
    [71] INSERT INTO EMP(EMPNO,ENAME) VALUES (:1,:2)
    [72] Insert binding param 1: 9116
    [73] Insert binding param 2: lk
    [74] Attempting to queue business event: model.EmpEO.EmpCreate
    [75] Successfully queued business event: EmpCreate
    [76] Attempting to raise business event: {http://model/events/edl/EmpEO}EmpCreate
    INFO: Looking for BusinessEventConnectionFactory
    INFO: Looking for EDN-DB JNDI configuration to create SAQRemoteBusinessEventConnectionFactory.
    *INFO: Unable to create SAQRemoteBusinessEventConnectionFactory: [jdbc/EDNSource or jdbc/EDNDataSource] undefined.*
    INFO: Looking for EDN-JMS JNDI configuration to create JMSRemoteBusinessEventConnectionFactory.
    *INFO: Unable to create JMSRemoteBusinessEventConnectionFactory: [java:comp/UserTransaction] undefined.*
    *INFO: Unable to create JMSRemoteBusinessEventConnectionFactory: [jms/fabric/EDNConnectionFactory] undefined.*
    INFO: Failed to get ConnectionFactory instance.
    [77] Batch Warning:Business Event Connection Configuration Invalid
    [78] * * * BindingContainer caching EXCEPTION:oracle.jbo.JboException
    [79] java.lang.NullPointerException
         at oracle.jbo.server.EventInvocation.raiseEvent(EventInvocation.java:513)
         at oracle.jbo.server.EntityImpl.raiseEvents(EntityImpl.java:7724)
         at oracle.jbo.server.EntityImpl.afterCommit(EntityImpl.java:7329)
         at oracle.jbo.server.DBTransactionImpl.doAfterCommit(DBTransactionImpl.java:2285)
         at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:2176)
         at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2369)
         at oracle.adf.model.bc4j.DCJboDataControl.commitTransaction(DCJboDataControl.java:1608)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    [80] DCBindingContainer.reportException :oracle.jbo.JboException
    [81] oracle.jbo.JboException: Business Event Connection Configuration Invalid     
    at oracle.jbo.server.EventInvocation.raiseEvent(EventInvocation.java:521)
         at oracle.jbo.server.EntityImpl.raiseEvents(EntityImpl.java:7724)
         at oracle.jbo.server.EntityImpl.afterCommit(EntityImpl.java:7329)
         at oracle.jbo.server.DBTransactionImpl.doAfterCommit(DBTransactionImpl.java:2285)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    Caused by: java.lang.NullPointerException
         at oracle.jbo.server.EventInvocation.raiseEvent(EventInvocation.java:513)
         ... 40 more
    ## Detail 0 ##
    java.lang.NullPointerException
         at oracle.jbo.server.EventInvocation.raiseEvent(EventInvocation.java:513)
         at oracle.jbo.server.EntityImpl.raiseEvents(EntityImpl.java:7724)
         at oracle.jbo.server.EntityImpl.afterCommit(EntityImpl.java:7329)
         at oracle.jbo.server.DBTransactionImpl.doAfterCommit(DBTransactionImpl.java:2285)
         at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:2176)
         at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2369)
         at oracle.adf.model.bc4j.DCJboDataControl.commitTransaction(DCJboDataControl.java:1608)
         at oracle.adf.model.binding.DCDataControl.callCommitTransaction(DCDataControl.java:1416)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    And when I tried to create a new employee from a JSF page, I get the following error:
    Target URL -- http://127.0.0.1:7101/BusinessEventsApplication-ViewController-context-root/faces/CreateEmployee.jspx
    <Utils> <buildFacesMessage> ADF: Adding the following JSF error message: oracle/fabric/blocks/event/BusinessEventConnectionFactory
    java.lang.NoClassDefFoundError: oracle/fabric/blocks/event/BusinessEventConnectionFactory
         at oracle.jbo.server.EventInvocation.raiseEvent(EventInvocation.java:513)
         at oracle.jbo.server.EntityImpl.raiseEvents(EntityImpl.java:7724)
         at oracle.jbo.server.EntityImpl.afterCommit(EntityImpl.java:7329)
         at oracle.jbo.server.DBTransactionImpl.doAfterCommit(DBTransactionImpl.java:2285)
         at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:2176)
         at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2369)
         at oracle.adf.model.bc4j.DCJboDataControl.commitTransaction(DCJboDataControl.java:1608)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
    Caused by: java.lang.ClassNotFoundException: oracle.fabric.blocks.event.BusinessEventConnectionFactory
         at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:297)
         at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:270)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
         at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:179)
         ... 65 more
    Could you please tell me what I am missing, as I cant find any documentation which says anything about these errors. I tried added 'SOA Runtime' library to both model and UI project but still it did not work out.

    This is the configuration of the global data source I created earlier when BE worked:
    EDNSource
    JNDI Name: jdbc/EDNSource
    URL: jdbc:oracle:thin:@localhost:1521:orcl
    Driver Class Name: oracle.jdbc.xa.client.OracleXADataSource
    user= DEV_SOAINFRA
    EDNDataSource
    JNDI Name: jdbc/EDNDataSource
    URL: jdbc:oracle:thin:@localhost:1521:orcl
    Driver Class Name: oracle.jdbc.xa.client.OracleXADataSource
    user= DEV_SOAINFRA
    So now to test local data sources, I deleted the above to data sources and created the following data source (non-XA) having configuration listed below:
    EDNSource
    JNDI Name: jdbc/EDNSource
    URL: jdbc:oracle:thin:@localhost:1521:orcl
    Driver Class Name: oracle.jdbc.OracleDriver
    user= DEV_SOAINFRA
    This is what happens when I raise the business event with EDNSource data source using non-XA data source with class 'oracle.jdbc.OracleDriver'
    Target URL -- http://127.0.0.1:7101/BusinessEventsApplication-ViewController-context-root/faces/CreateEmployee.jspx
    <JmsBusinessEventBusMessages> <warnUsingOldDatasoureNames> Couldn't find the required datasources, but found them via the old names. Please update your datasource configurations.
    <JmsBusinessEventBusMessages> <warnUsingGlobalDatasourecForLocal> Local Tx Datasource not found, using XA datasource. Please update your configuration.
    Looks like ENDSource is old name of the driver and the new name is EDNDataSource, so created a new data source with name EDNDataSource (after deleting previous data source EDNSource) with the following configuration:
    EDNDataSource
    JNDI Name: jdbc/EDNDataSource
    URL: jdbc:oracle:thin:@localhost:1521:orcl
    Driver Class Name: oracle.jdbc.OracleDriver
    user= DEV_SOAINFRA
    Target URL -- http://127.0.0.1:7101/BusinessEventsApplication-ViewController-context-root/faces/CreateEmployee.jspx
    <JmsBusinessEventBusMessages> <warnUsingGlobalDatasourecForLocal> Local Tx Datasource not found, using XA datasource. Please update your configuration.
    The warning still comes. Luckily, its just a warning and not an error. ;)

  • Business Event System in Workflow

    Hi,
    I am having difficulties with the Business Event System (BES).
    Actually, I've read the Oracle documentation about BES. Still I don't understand much.
    There are little documentation about the BES, and I still get blank point.
    Here are my questions :
    1. What the Business Event System is?
    2. Some of documentations show that using the BES, the workflow can interact with
    different system.
    What does 'different system' mean?
    Does it mean to another computer (perhaps Client Server type)?
    Or to another system (like headquarter which has several branches) located in
    different location?
    Or to another database service in the same computer (perhaps ORCL and ORCL2)?
    Or with another database applications (i.e Microsoft SQL Server, MySQL)?
    3. How do we use the BES?
    How do we define BES?
    Where do we use the BES?
    Is it using PL/SQL?
    Or the BES itself is a PL/SQL which is inside a procedure or function or trigger (used
    to manipulate the database)?
    What does the BES look like? Is it a PL/SQL code, an e-mail, or ...?
    4. Some documentations said that using the Event (with Receive type) as a start node
    (in Workflow Builder), the process will wait and respon <u>until</u> a Business
    Event is detected?
    How do we interact with BES?
    How do we know what kind of BES to start the process?
    Do we use the Oracle Advanced Queuing?
    Is it using an e-mail to start the Event?
    5. There is a statement from the "Feature Overview Oracel9i Application Server : Oracle Workflow" (from Oracle site)
    "Business event messages from Oracle Workflow can be placed on or received from Oracle9i Advanced Queues, providing support for Oracle Net as well as HTTP and HTTPS communication protocols."
    and
    "The Business Event System uses Oracle Advanced Queuing to propagate messages between communication points on systems, called agents, using a specified protocol. Events received from external systems are processed by an agent listener that runs on the agent's queue."
    Actually what the Advanced Queuing is?
    Is it the mechanism of scheduling activites such as sending a message?
    Is it use to start the Workflow Background Engine periodically?
    What does the Events received from external system is? Is it an e-mail?
    If it is True, so the workflow process could be start using an e-mail?
    6. There is also a documentation stated that the Event can be raised using the PL/SQL WF_EVENT.Raise() API.
    The Event also could be launch using the Workflow Home Page (Workflow monitor) in Event link?
    So what does the BES is used for, if the Event could be launch using a PL/SQL?
    Is the process of raising the Event called BES?
    Such as a procedure to manipulate database tables that consist the WF_EVENT.Raise().
    What is Generate Function is?
    7. What Agent is?
    What Subscription is?
    What Event group is?
    8. Perhaps there is a guide book of using the Business Event System?
    Any light would be grateful.
    Many many thanks,
    Buntoro

    Hi
    I am in exactly the same position...
    Have queued up my events using wf_event and the subscription is putting them in WF_OUT ok.
    So, I guess that WF_OUT is a multisubscriber queue, so when we register with it in BPEL it asks for us to identify ourselves using the consumer and/or correlation ID.
    However, I'm with you in that I have no idea how to specify the consumer.
    There is a CORRID column in WF_OUT and I'm banking on that being the correlation ID at the moment....
    I'll let you know if I crack it!
    Chris

  • Badi and Business event( Urgent)

    Hi experts,
          I am new to badi and business event 1120P. Please post how this business event exactly comes in to picture in this badi. also how to find this business event?
    And also Post the logic or code. The requirement is given below . Pls Post the solution. Its very urgent.
    Enhancement Summary
    Two user exits are needed to determine the correct G/L Account and Cost Center on Shipment Cost documents and post the Material Group on the Accounting document. BADI_SCD_ACCTG and Business Event 1120P can be used to accommodate the new functionality.
    Business Process
    Specific G/L Accounts and Cost Centers have to be determined to post on the Shipment Cost document. This is needed to provide accurate management reporting capabilities on shipments for Sales Order or Stock Transfer Order. A new custom table must be created which contains the following information: Distribution, Mode of Transport, Account, Cost Center Material group. Distribution is an identifier here if this shipment originated from an SO or STO.
    There are no screens involved in this enhancement.
    Components
    Table: ZTABLE1
    Field     Data Element     Type     Length     Description
    MANDT     MANDT     CLNT (key)     3     Client
    DISTRIBUTION     Z_DISTRIBUTION     CHAR (key)     1     Distribution
    MOT     ZZDEF_MOT     CHAR (key)     2     Mode of Transportation
    MATKL     MATKL     CHAR (key)     9     Material group
    SAKNR     SAKNR     CHAR     10     G/L Account Number
    KOSTL     KOSTL     CHAR     10     Cost Center
    This table gets updated manually by the FI team.
    Values for Distribution are:
    ‘1’  =  Primary Distribution to Refinery
    ‘2’ = Primary and Secondary– Excluding refinery
    All entries must be checked against SAP config and master tables
    User exit BADI BADI_SCD_ACCTG will be used to determine the correct G/L Account, Cost Center and Product Group based on Distribution and Mode of Transport. This BADI gets called only when a new Shipment Cost document get created.
    Once the BADI determined the new values it populates field c_vfkn-sakto with the G/L account, field c_vfkn-kostl with the Cost Center and exports the Product group to memory.
    There is no field on the Shipment Cost Document to store the Product group. Therefore another mechanism must be used to get the Product Group on the accounting document.
    Business Event 1120P can be used to import the Product group out of memory and put it on BSEG-MATNR. Structure BSEG_SUBST must be enhanced with field MATNR for this purpose.
    Function, Rules, Exits      Description of Functionality, Rules, Exits
    BADI_SCD_ACCTG     Business Add-In for Shipment Cost Account Assignment
    Business Framework     Business Event 1120P can be used to import the Product Group from memory and to populate field BSEG_SUBST-MATNR.
    This event gets called from different places. It needs to be ensured that it only populates the value when it was called from BADI_SCD_ACCTG.
    Custom Table     A look-up Table needs to be maintained for Distribution, Mode of Transport, G/L Account, Cost Center and Material Group
    Transaction code     To maintain the new table
    Append Structure     To enhance structure BSEG_SUBST with MATNR
          Business Add-In BADI_SCD_ACCTG can be used to determine the account assignments for a shipment cost item to set the G/L Account and Cost Center. All data needed to determine the new information gets provided in this BADI.
    Logic:
    •     Determine if STO or SO based on Document Category from internal table I_REFOBJ-VTRLP field VGTYP If is C then Distribution type is Sales Order (Primary and Secondary – Excluding Refinery – ‘2’ ) else we need to check the receiving plant. If the receiving plant (I_REFOBJ-VTRLK field WERKS) is a refinery the Distribution type is Primary (1) else it’s a (Primary and Secondary – Excluding Refinery – ‘2’ ). Refineries can be identified via Function Module ZPLANTCLASSIFICATION. The plant must be passed into Import Parameter IP_SAPPLANT and field INT_PLANTCHAR-ATNAM must be looked up with value SAPTYPE. If it exists and field ATWRT contains ‘RFY’, the plant is a refinery.
    •     Product Group can be determined from the Material master through Material group field MARA-MATKL.
    •     Mode of Transport will be passed in the BADI in VTRLK-OIC_MOT.
    •     Select single entry from table ZTABLE1based on Distribution, Mode of Transport and Material Group. If nothing gets selected, error message ‘No entry exists in table ZTABLE1for Distribution (distribution), MOT (MOT) & Mat. Group (material group)’ should be triggered.
    •     Move ZTABLE1-SAKNR  to c_vfkn-sakto and ZTABLE1-KOSTL to c_vfkn-kostl
    •     The Material group must be exported to memory in BADI_SCD_ACCTG
    •     The Material group must be imported from memory in Business Event BP1120P
    •     Free Memory in Business Event BP1120P
    This is VI01 – Creation of Freight Cost Item screen
    and also code for function module ZPLANTCLASSIFICATION below
    FUNCTION zplantclassification .
    ""Local interface:
    *"  IMPORTING
    *"     REFERENCE(IP_SAPPLANT) LIKE  AUSP-OBJEK OPTIONAL
    *"     REFERENCE(IP_CPSPLANT) LIKE  AUSP-ATWRT OPTIONAL
    *"     REFERENCE(IP_SISLOC) LIKE  AUSP-ATWRT OPTIONAL
    *"  EXPORTING
    *"     VALUE(EP_SAPPLANT) LIKE  AUSP-OBJEK
    *"     VALUE(EP_CPSPLANT) LIKE  AUSP-ATWRT
    *"     VALUE(EP_SISLOC) LIKE  AUSP-ATWRT
    *"     VALUE(EP_OWNERSHIP) LIKE  AUSP-ATWRT
    *"     VALUE(EP_SMISTYPE) LIKE  AUSP-ATWRT
    *"     VALUE(EP_SPOTREF) LIKE  AUSP-ATWRT
    *"     VALUE(EP_SUBTYPE) LIKE  AUSP-ATWRT
    *"     VALUE(EP_SUPPLYREGION) LIKE  AUSP-ATWRT
    *"     VALUE(EP_TYPE) LIKE  AUSP-ATWRT
    *"     VALUE(EP_DISTAREA) LIKE  AUSP-ATWRT
    *"     VALUE(EP_GEOGAREA) LIKE  AUSP-ATWRT
    *"     VALUE(EP_HMF) LIKE  AUSP-ATWRT
    *"     VALUE(EP_IATACODE) LIKE  AUSP-ATWRT
    *"     VALUE(EP_IRSTCN) LIKE  AUSP-ATWRT
    *"     VALUE(EP_OPSAREA) LIKE  AUSP-ATWRT
    *"     VALUE(EP_PLANTSTAT) LIKE  AUSP-ATWRT
    *"     VALUE(EP_PORTCODE) LIKE  AUSP-ATWRT
    *"     VALUE(EP_REFAREA) LIKE  AUSP-ATWRT
    *"     VALUE(EP_SAPTYPE) LIKE  AUSP-ATWRT
    *"     VALUE(EP_MFGWARRANTY) LIKE  AUSP-ATWRT
    *"     VALUE(EP_USERTYPE) LIKE  AUSP-ATWRT
    *"     VALUE(EP_TRMCENTER) LIKE  AUSP-ATWRT
    *"     VALUE(EP_TRANSCENTER) LIKE  AUSP-ATWRT
    *"     VALUE(EP_FEIN) LIKE  AUSP-ATWRT
    *"  TABLES
    *"      INT_PLANTCHAR STRUCTURE  ZPLANTCLASSIFICATION OPTIONAL
    *"  EXCEPTIONS
    *"      NO_OBJEK_FOUND
    *"      NO_CPSPLANT_FOUND
    *"      NO_SISLOC_FOUND
    *"      NO_INPUT_FOUND
    *"      VALID_PLANT_NO_CHARACTERISTIC
    *"      ONE_TO_MANY_ISSUE
    *"      PLANT_NOT_FOUND_ZDEF_DELPLANT
    *"      UNKNOWN_ERRORS
    FM Name: ZPLANTCLASSIFICATION     
    Created By  :  SYUB                                                  *
    Description : Function Module to retrieve plant characteristics      *
    The function module has two capabilities:
    1. Retrieve only the necessary characteristics
    2. Retrieve the whole characteristics into an internal table.
    Parameter Description                                                *
    In the future, if there is a new characteristic added to the
    plant classification tables, the characteristic has to be added
    to the list of the export parameters and the loop statement.
      TABLES: ausp, cabn, ksml, zdef_delplant.
      DATA: ws_objek LIKE ausp-objek,
            ws_countchar TYPE i,
            ws_countplant TYPE i.
    *Internal table for SAP plant
      DATA: BEGIN OF int_plant OCCURS 0,
            plant LIKE ausp-objek,
            END OF int_plant.
    *sap plant code is the input parameter.Move objek, atnam, and atwrt to
    *internal table PLANTCHAR using inner join of AUSP, CABN, and KSML to
    *synch up the internal characteristic numbers throughout the 3 tables.
      IF NOT ip_sapplant IS INITIAL.
        SELECT auspobjek cabnatnam ausp~atwrt
          INTO CORRESPONDING FIELDS OF TABLE int_plantchar
          FROM ksml AS ksml
          INNER JOIN cabn AS cabn
            ON cabnatinn = ksmlimerk
          INNER JOIN ausp AS ausp
            ON ausp~objek = ip_sapplant
            AND auspatinn = cabnatinn
            AND ausp~mafid = 'O'
            AND ausp~klart = 'Z01'.
    *Checking the existence of ip_sapplant in the table, if it doesn't
    *exist, raise the exception else if it exists, check if it has
    *characteristic values.
        IF sy-subrc NE 0.
          RAISE no_objek_found.
        ELSE.
          DESCRIBE TABLE int_plantchar LINES ws_countchar.
          IF ws_countchar LT 2.
            RAISE valid_plant_no_characteristic.
          ENDIF.
        ENDIF.
    *cps plant code is the input parameter. Move objek from table AUSP to
    *ws_objek using inner join of CABN and AUSP to match up the internal
    *characteristic numbers from the 2 tables.
      ELSEIF NOT ip_cpsplant IS INITIAL.
        SELECT ausp~objek
          INTO TABLE int_plant
          FROM ausp AS ausp
          INNER JOIN cabn AS cabn
            ON cabn~atnam = 'OLDCODE'
              WHERE auspatinn = cabnatinn
                AND ausp~mafid = 'O'
                AND ausp~klart = 'Z01'
                AND ausp~atwrt = ip_cpsplant.
    *Checking the existence of ip_cpsplant in the table
        IF sy-subrc EQ 0.
    *Counting the number of SAP plants in the internal table int_plant
          DESCRIBE TABLE int_plant LINES ws_countplant.
    *Moving the values of objek, atnam, and atwrt to PLANTCHAR using objek
    *from ws_objek.
          IF ws_countplant EQ 1.
            LOOP AT int_plant.
              SELECT auspobjek cabnatnam ausp~atwrt
                INTO CORRESPONDING FIELDS OF TABLE int_plantchar
                FROM ksml AS ksml
                INNER JOIN cabn AS cabn
                  ON cabnatinn = ksmlimerk
                INNER JOIN ausp AS ausp
                  ON ausp~objek = int_plant-plant
                  AND auspatinn = cabnatinn
                  AND ausp~mafid = 'O'
                  AND ausp~klart = 'Z01'.
            ENDLOOP.
    *If there more than one SAP Plants, then raise an exception.
          ELSEIF ws_countplant GT 1.
            RAISE one_to_many_issue.
          ENDIF.
        ELSE.
          SELECT SINGLE werks FROM zdef_delplant
            INTO ws_objek
            WHERE cpsloc = ip_cpsplant.
          SELECT auspobjek cabnatnam ausp~atwrt
           INTO CORRESPONDING FIELDS OF TABLE int_plantchar
           FROM ksml AS ksml
           INNER JOIN cabn AS cabn
             ON cabnatinn = ksmlimerk
           INNER JOIN ausp AS ausp
             ON ausp~objek = ws_objek
             AND auspatinn = cabnatinn
             AND ausp~mafid = 'O'
             AND ausp~klart = 'Z01'.
          if sy-subrc ne 0.
            raise plant_not_found_zdef_delplant.
          endif.
        ENDIF.
    *cps plant code is the input parameter. Move objek from table AUSP to
    *ws_objek using inner join of CABN and AUSP to match up the internal
    *characteristic numbers from the 2 tables.
      ELSEIF NOT ip_sisloc IS INITIAL.
        SELECT ausp~objek
          INTO TABLE int_plant
          FROM ausp AS ausp
          INNER JOIN cabn AS cabn
            ON cabn~atnam = 'SISLOC'
              WHERE auspatinn = cabnatinn
                AND ausp~mafid = 'O'
                AND ausp~klart = 'Z01'
                AND ausp~atwrt = ip_sisloc.
    *Checking the existence of ip_sapplant in the table
        IF sy-subrc EQ 0.
          DESCRIBE TABLE int_plant LINES ws_countplant.
    *Moving the values of objek, atnam, and atwrt to PLANTCHAR using objek
    *from ws_objek.
          IF ws_countplant EQ 1.
            LOOP AT int_plant.
              SELECT auspobjek cabnatnam ausp~atwrt
                INTO CORRESPONDING FIELDS OF TABLE int_plantchar
                FROM ksml AS ksml
                INNER JOIN cabn AS cabn
                  ON cabnatinn = ksmlimerk
                INNER JOIN ausp AS ausp
                  ON ausp~objek = int_plant-plant
                  AND auspatinn = cabnatinn
                  AND ausp~mafid = 'O'
                  AND ausp~klart = 'Z01'.
            ENDLOOP.
    *If there more than one SAP Plants, then raise an exception.
          ELSEIF ws_countplant GT 1.
            RAISE one_to_many_issue.
          ENDIF.
        ELSE.
          SELECT SINGLE werks FROM zdef_delplant
            INTO ws_objek
            WHERE sisloc = ip_sisloc.
          SELECT auspobjek cabnatnam ausp~atwrt
           INTO CORRESPONDING FIELDS OF TABLE int_plantchar
           FROM ksml AS ksml
           INNER JOIN cabn AS cabn
             ON cabnatinn = ksmlimerk
           INNER JOIN ausp AS ausp
             ON ausp~objek = ws_objek
             AND auspatinn = cabnatinn
             AND ausp~mafid = 'O'
             AND ausp~klart = 'Z01'.
          if sy-subrc ne 0.
            raise plant_not_found_zdef_delplant.
          endif.
        ENDIF.
      ELSE.
    *Checking if there is an input parameter entered.
        RAISE no_input_found.
      ENDIF.
    Modified 7/30 by RFOR to validate SAP plant is in plant master
      data: wa_t001w like t001w.
      read table int_plantchar.
      SELECT SINGLE * from t001w into wa_t001w where
      werks = int_plantchar-objek.
      if sy-subrc ne 0.
        raise NO_OBJEK_FOUND.
      endif.
    *Moving all the characteristic values to the export parameters
      LOOP AT int_plantchar.
        MOVE int_plantchar-objek TO ep_sapplant.
        CASE int_plantchar-atnam.
          WHEN 'OLDCODE'.
            MOVE int_plantchar-atwrt TO ep_cpsplant.
          WHEN 'SISLOC'.
            MOVE int_plantchar-atwrt TO ep_sisloc.
          WHEN 'OWNERSHIP'.
            MOVE int_plantchar-atwrt TO ep_ownership.
          WHEN 'SMISTYPE'.
            MOVE int_plantchar-atwrt TO ep_smistype.
          WHEN 'SPOTREF'.
            MOVE int_plantchar-atwrt TO ep_spotref.
          WHEN 'SUBTYPE'.
            MOVE int_plantchar-atwrt TO ep_subtype.
          WHEN 'SUPPLYREGION'.
            MOVE int_plantchar-atwrt TO ep_supplyregion.
          WHEN 'TYPE'.
            MOVE int_plantchar-atwrt TO ep_type.
          WHEN 'DISTAREA'.
            MOVE int_plantchar-atwrt TO ep_distarea.
          WHEN 'GEOGAREA'.
            MOVE int_plantchar-atwrt TO ep_geogarea.
          WHEN 'HMF'.
            MOVE int_plantchar-atwrt TO ep_hmf.
          WHEN 'IATACODE'.
            MOVE int_plantchar-atwrt TO ep_iatacode.
          WHEN 'IRSTCN'.
            MOVE int_plantchar-atwrt TO ep_irstcn.
          WHEN 'OPSAREA'.
            MOVE int_plantchar-atwrt TO ep_opsarea.
          WHEN 'PLANTSTAT'.
            MOVE int_plantchar-atwrt TO ep_plantstat.
          WHEN 'PORTCODE'.
            MOVE int_plantchar-atwrt TO ep_portcode.
          WHEN 'REFAREA'.
            MOVE int_plantchar-atwrt TO ep_refarea.
          WHEN 'SAPTYPE'.
            MOVE int_plantchar-atwrt TO ep_saptype.
          WHEN 'MFG_WARRANTY'.
            MOVE int_plantchar-atwrt TO ep_mfgwarranty.
          WHEN 'USER_TYPE'.
            MOVE int_plantchar-atwrt TO ep_usertype.
          WHEN 'TERMINALCENTER'.
            MOVE int_plantchar-atwrt TO ep_trmcenter.
          WHEN 'TRANSPORTATIONCENTER'.
            MOVE int_plantchar-atwrt TO ep_transcenter.
          when 'FEIN'.
            move int_plantchar-atwrt to ep_fein.
        ENDCASE.
      ENDLOOP.
    ENDFUNCTION.
    Pls help me out from this problem its very urgent.
    Thanks

    hi SK ,
    process like this .
    in BADI
    method.
    1.Here u have to put ur logic based on the Requirement.
    2.then u have to call BTE like this
    <b>call function 'OPEN_FI_PERFORM_00001020_E'
          tables
            t_bseg = xbseg
            t_bkpf = xbkpf.</b>
    3.Update Ztables.
    endmethod.
    this is sample logic only.First get logic of TS then u will come to know how to do?
    regards
    prabhu

  • How to create new or check current business event in Oracle INV/PO?

    Hi Gurus,
    How can i define/create new business event related to items or suppliers?
    I know we need to login to WF admin responsibility. But i just wanted to where we can able to create event from frontend and that too from inventory or purchasing responsibilities.
    I have collected five from oracle.apps.inv.item realted to items and four related to suppliers.
    Could you please help me in how to create Business events from frontend and that to from oracle inventory.. and even i would like to here some thing on trading partners setups also.
    I'm new to this Business events, hence required your help on high priority.else send me an document with existed business events.
    Awaiting on your response.
    Regards,
    Ajay

    No, in this case, I'm using standard JSP with ADF and struts validator.
    If I don't use struts validator and there are errors (such as putting a string into a number which produces a jbo-25009), the list value will be retained.
    When using the validator, it appears that it is NOT retained.
    I've written some code to attempt to set the list element back, which "looks like" it's working right now.
    There's still a problem with the second scenario:
    1. user clicks checkbox and hits [submit]
    2. get's error - you have to enter 5 address items
    3. User wants to backout, so he unchecks the box and resubmits
    4. The box redisplays as "checked"
    SO, at that point, I thought... can't I use YOUR EXAMPLE on how to handle a checkbox.
    I place some code in the reset method of the form to perform this:
    map.put("AddressChangeFlag", (String) "" );
    (that is, I've detected via the request that this flag is null), so I'm trying to make sure it retains it!
    I do that and it runs into a problem during the processUpdateModel aT:
    BindingContainerValidationForm updateForm= (BindingContainerValidationForm) actionContext.getActionForm();
    //Get the binding for our particular column JUCtrlAttrsBinding checkBoxBinding = (JUCtrlAttrsBinding)updateForm.get("AddressChangeFlag");
    call, with an error:
    JBO-29000: Unexpected exception caught: java.lang.ClassCastException, msg=java.lang.String
    java.lang.String
    The value for updateForm.get("AddressChangeFlag") is "", which I'm assuming means the form field is no longer in the request object??
    I'm lost at this point, and have been working on it for more than 1 day.
    Thanks for responding though, and I await feedback ;)

  • Business Event Data

    Guys,
    I'm using Business events in my project. I raise the business event from an ADF application.
    when i raise an event, I would like to 'see the event and its data' in weblogic server (without creating any subscription). I use 11.1.1.6
    Is this possible?
    Thanks in advance.

    From my understanding, this is not possible. If there is no subscription you will not be able to see any data as basically it's treated like a black box.

  • Business Event Appraisal in Training and event management

    Hi
    I am facing issue releated to Business Event Appraisal Functionality in ESS. I have maintained value as blank in field HAP00 REPLA switch.
    We have created I View of transacion PV7I in ESS. When i am selecting "APPRAISAL" button for attended event , i can select appraisal form from appraisal form list. On next screen i don't get Appraisal Form where i have to give feedback on different criteria's. I get Rating column and four buttons: Save, Check data, back, Complete.
    When i am executing PV7i through R3 then it's working properly. Why it is not working properly in ESS. Kindly help me ?
    Other issue..... :
    My client needs INSTRCUCTOR feedback functionality means feedback for instructors by participants for particular event. How we can configure in the system for TEM module not for LSO.
    KINDLY help me ...
    Thanks and Best Regards
    Puneet

    Good Day !
    Unfortunately the appraisal services (my_appraisals, my_app_create, my_appraisalsm) have not been migrated for the use with integrated ITS.
    Please review SAP notes 870126 and 771196
    Note:
    Since the appraisal services (My_appraisals, My_app_create) have not
    been migrated, you can no longer use the appraisal function from the
    services PV7I and PV8I with the integrated ITS.
    At the same time I am afraid the succession product is not an option
    for you as the TEM functionality is not integrated with the new
    appraisal functionality of 'Performance Management'. Performance
    Management only offers an integration with the succession product of
    TEM, i.e. LSO (Learning Solution).
    Hope this information helps you.
    Best Regards
    Chetan

  • Business Event Brochure in Training and Event Management?

    Hi Guru's
    My client has a requirement as follows. The training administrator decides the Business Event Types which for which superiors can book their subordinates or not. Those events are stored at a particular place. Once the administrator stores them, a mail should be triggered to all the superiors. Thus superior can have a list of event types for which he can book his subordinates. When he books for such events, a mail should be triggered to his subordinates regarding the training event. If an employee books for an event, a mail should be triggered to his superior for approval.
    How is this possible? According to me, those events will be "Included in Brochure" (in Business Event Type Infotype). Am I right?
    Please suggest me.
    Points assured!
    Thanks in advance.

    Hello ,
    see the links it might help :
    Business processes of Training and Event Managment
    Training and Event Management
    Lots of workflow

  • Unable to configure Oracle Applications Adapter to capture Business Event

    Hi All,
    I am new to SOA and BPEL so please bare that in mind when reading and responding to this post.
    I am attempting to trigger BPEL from an EBS business event as per the SOA gateway developers guide.
    I am working on EBIZ R12.1.2, 11g weblogic, Jdev 11g release 1
    Step 1. I have enabled the business event oracle.apps.per.api.employee.create_employee and created a subscription from the integration repository which I can see from the business events subscription window.
    Step 2. I have created a new SOA project in JDev with an empty composite and added a BPEL process and called it createOrsResource.
    Step 3. Following this I opened the BPEL process and added in an applications adapter and set this up to interact with the WSDL that I got from going through the adapter configuration wizard (i.e. selected the business event detailed above).
    I then tried to compile and got the following error:
    Error: Load of wsdl "createEmployeeEvent.wsdl with Message part element undefined in wsdl [file:/D:/jdev_home/mywork/IntegrationApplication/integrationExample/createEmployeeEvent.wsdl] part name = WF_EVENT_T     type = {http://xmlns.oracle.com/xdb/APPS/createEmployeeEvent}WF_EVENT_T" failed
    This is obviously something to do with the business event message type that materialized when I selected the business event in the Adapter Config Wizard.
    I went back into the Apps Adapter and checked the config, when I clicked next .. next .. next etc... through the wizard just before hit the schema definition page I got the following error:
    null file is either missing or is corrupt.
    This schema defines the stricture of wf event. Wizard would not be able
    to edit the service
    Also when I tried to add an assign activity using the WF_EVENT_T as an input to another variable I got the following WF_EVENT_T node in the left mapping window:
    Exception: Unable to parse schema APPS_WF_EVENT_T_createEmployeeEvent.xsd
    Can anyone point me in the right direction???
    Keith

    Tapas123 wrote:
    Hi Osama,
    Database is working perfectly fine in my machine. Please let me know the procedure to fix the client issue , if you know.
    Thanks.It is not - else you would not have posted this thread. Home version architecture differs significantly from Professional version and higher, especially in the area of User Access Control. It is tough enough to try and solve issues on certified/supported OS versions/hardware, let alone on uncertified/unsupported ones ;-)
    http://en.wikipedia.org/wiki/Windows_7_editions
    http://docs.oracle.com/cd/E11882_01/install.112/e24187/pre_install.htm#CIHIAGFG
    Pl use a supported OS version
    HTH
    Srini

  • Business Event not triggering the SOA BPEL Process with OA Adapter

    Hello Gurus,
    I am working on Business event "oracle.apps.per.api.employee.create_employee" and the event is getting triggered when creating an employee from EBS.
    The message has come till WF_BPEL_QTAB(I could seeit) and in "READY" status.We have a SOA BPEL Process that is subscribed to the event "oracle.apps.per.api.employee.create_employee" using OA Adapter.
    The issue is that the SOA BPEL process is not getting triggered and it is not dequeing the message from WF_BPEL_Q.
    Please let me know if I have missed any steps on SOA BPEL side.
    Note: Agent Listener is up and running.
    Thanks,
    Sunil

    Ofcourse, I subscribed to the business event using BPEL. Ideally the instances should be created and I should be able to receive the standard payload.
    Yes the JNDIs are correct. We have other business events working in the same fashion and we are using same JNDI.

  • Business Event not triggering the PLSQL procedure.. What to do?

    We need to call a plsql procedure when the GL Approval workflow has ended with approval. I thought i could do this by customizing the relevant business event.
    We are on EBS 12.1.3 with RDBMS : 11.2.0.3.0.
    I saw that the business event oracle.apps.gl.Journals.journal.approve was disabled currently. I enabled it and created a subscription for it. Subscription was a PLSQL procedure. Currently, for test purpose only thing it is doing is to insert a row into a table.
    Business Event Subscription settings:
    System: ORDEBS.SYSTEM.COM
    Triggering Event
    Source Type:Local
    Event Filter: oracle.apps.gl.Journals.journal.approve
    Execution Condition
    Phase: 100
    Status: Enabled
    Rule Data: Message
    Action Type:Custom
    On Error: Stop and Rollback
    Action
    PL/SQL Rule Function: XX_GL_APPROVE_BE_PKG.Get_Attributes
    Priority: Normal
    Documentation (Not sure what value to be given for these. I went with the below values.)
    Owner: Company Name
    Owner Tag: Custom Schema
    Using the below query i can see that the business event is getting called when the approval happens (One row added each time approval happened). But I cant see any rows in the table where it should insert a row. What could be going wrong? How can i verify that the procedure has been called?
    select * from WF_DEFERRED where corrid ='APPS:oracle.apps.gl.Journals.journal.approve'
    Procedure:
    CREATE OR REPLACE PACKAGE BODY APPS.XX_GL_APPROVE_BE_PKG
    AS
    PROCEDURE Get_Attributes
    IS
    BEGIN
    INSERT INTO xx.xx_test_table VALUES ('From BE');
    COMMIT;
    END Get_Attributes;
    END XX_GL_APPROVE_BE_PKG;

    Thanks Alejandro. Now this is working.
    Changes i made:
    1. Added the WFERROR workflow as a subscription to this event. So i could see that the function i am calling from the event did not have proper signature.
    2. Changed the function signature to have standard parameters like:
    CREATE OR REPLACE PACKAGE BODY XX_GL_APPROVE_BE_PKG
    AS
    function subscription(p_subscription_guid in raw,
    p_event in out nocopy wf_event_t) return varchar2 is
    l_result varchar2(20);
    begin
    insert into xxvtv.xxvtv_test_table values ('From BE');
    commit;
    exception
    when others then
    wf_core.context('XX_GL_APPROVE_BE_PKG','function subscription', p_event.getEventName(), p_event.getEventKey());
    wf_event.setErrorInfo(p_event, 'ERROR');
    return 'ERROR';
    end subscription;
    END XX_GL_APPROVE_BE_PKG;
    3. Changed the owner name and owner tag both to the custom schema name (XX)

  • Problem to deploy to a WebService interface for ADF Business Components to Weblogic Server

    Hi,
      I'm trying to deploy a custom application ,in which i have exposed ADF Business Components through a WebService interface, to a standalone weblogic server.
    Application Module is configured with a Service Interface for ordinary ViewObjects.
    Now I want to create a EAR file of this application to deploy it on the weblogic server.
    But I got an error while deploying it.The error i am getting is shown below.
    ERROR: No Java EE modules detected in EAR archive. Deployment aborted. == (oracle.jdevimpl.deploy.ear.WeblogicAssembler)
    I have followed the steps mention in the below link :
    http://technology.amis.nl/2010/12/29/quickly-creating-reploying-and-testing-a-webservice-interface-for-adf-business-components/
    I'm using Jdeveloper 11.1.2.4 on windows.
    Please suggest what i could be doing wrong.
    Regards,
    Himanshu

    Does the deployment profile include Java EE modules?
    Refer
    Java EE Developer: ERROR: No j2ee modules detected in EAR archive. Deployment aborted. == (oracle.jdeveloper.deploy.Veto…

  • Business event (HR) -- follow up

    Hi,
    how can I know the business event group and business event type of a business event?
    Thanks.

    Hi Joseph,
    If you have a BusinessEvent .. you can find out the Type and Group with a Relationship it holds in table HRP1001.
    Business Event Group is of Object Type "L"
    Business Event Type is of Object Type "D"
    and Business Event is of Object Type  "E"
    Business Event "E" is Linked BEType "D" with a Relationship <b>A020</b>
    BEType "D" is linked with BEGroup "L" with a Relationship <b>A003</b>
    Hope this helps you.

  • Follow up Business Event by specific qualification date.

    Hi Expert,
    In the follow up business event, I want to transfer qualification to attendee with the start and end date of business event. For example, the business event date is held on 07.05.2007 – 11.05.2007 and the qualification will be given to all attendees by t-code: PV15. By standard the start and end date of given qualification is 11.05.2007 – 31.12.9999. My intention is to give the date as 07.05.2007 – 11.05.2007 instead. Is there any solution?
    Here is the background of the question. We migrated the training history record from legacy system in to SAP and stored it as qualification, and start and end date of qualification are the duration of (start/end date) of training course.
    Thanks in advance,
    ECTSAKC

    Hi,
    Sorry my English is not well. I'll tried.
    Our training process like this. When any employee who has attended the training course, he/she will be given the qualification according to the particular course. The qualification should be dated the same as the duration of training course. For example, the Techinical English course is held on 07.05.2007 - 11.05.2007. When the courese is finished, the user will do the follow-up activities by using T-code PV15. By default, the start date of given qualification is 11.05.2007 and end date is 31.12.9999.  But our intention is to give the start date of assigned qualification as 07.05.2007 - 11.05.2007.
    There is any user exit available to do that?
    Thanks.
    ECTSAKC

Maybe you are looking for