5 Replies Latest reply on Mar 8, 2006 8:26 AM by 416900

    OAI Event is not reading the workflow queue

      I'm creating the workflow event using iStudio (created automatically by iStudio) with the following information:

      Item Type: OAI Process Bundle: EDWARD
      Display Name: Receive Request EDWARD.PAATransaction:IN
      Description: OAI Event
      Event Action: Receive
      Event Filter: oai.edward.paatransaction.oai_v1.receive_request.oai_v1
      Cost: 0.0

      I also create the event subscription for oracle.apps.wf.event.agent.create, oracle.apps.wf.event.event.create, and oracle.apps.wf.event.subscription.create and put the following information:

      Source Type: External
      Event Filter: oracle.apps.wf.event.subscription.create
      Source Agent: <blank>
      Phase: 1
      Status: Enabled
      Rule Data: Key
      Workflow Item Type: EDWARD
      Workflow Process Name: PAATRANSACTION
      Out Agent: <blank>
      Priority: Normal
      Parameters: <blank>

      I can see that the interconnect OAI Hub is putting a message into the WF_IN queue but the event does not dequeue the message and run the process.

      So, I don't know if I'm missing anything here or there is something wrong with my configuration.

      Can anyone help me please?


        • 1. Re: OAI Event is not reading the workflow queue

          Have you "Deployed" the Workflow correctly?
          Deploying the Workflow from iStudio does 2 things.
          Firstly it creates a *.wft file, which you edit and configure using Workflow Builder to create the actual workflow process.
          The second thing it does is to export the definitions to the Workflow Business Event System - this creates the Event Subscriptions.You can check that this has succeeded by looking at "Event Subscription" of the Workflow Homepage.
          If you have done this OK, and you have saved your configured Workflow back to the database, then one problem I have faced in the past is the length of OAI Process Bundle name only allows up to 8 characters when you Deploy the Workflow Event.
          If your Event Name is "OAI_WORKFLOW ", then you may find that in the Workflow Builder, your OAI Process Bundle name has been truncated to "OAI_WORK ".
          If this is the case, log onto your Workflow Homepage.
          Click on "Event Subscriptions" and find your Subcribing Workflow Event. Notice that if you have deployed it correctly, your Workflow entry will be something like "OAI_WORKFLOW/UPDATE_EMPLOYEE". If so, then edit the entry, and change the Workflow Item Type Name to "OAI_WORK". Once saved, your Workflow Event Name will match your Workflow Process e.g. "OAI_WORK/UPDATE_EMPLOYEE".

          BTW, as you didn't mention it, you have actually created the workflow itself using Oracle Workflow Builder? Apologies for this obvious question.

          • 2. Re: OAI Event is not reading the workflow queue
            Yan, thank you for your kind reply. Actually, I create the event subscription manually because when I deploy the event from the iStudio, it doesn't automatically create the event subscription. So, I read some thread in this discussion and I try to add the event subscription manually. However, it still doesn't work.

            So, do you think something wrong with my iStudio client because when I deploy the business event, it said "Operation Completed Successfully" but I never see the event subscription when I go to the workflow homepage.

            Any suggestion Yan?

            Thank You,

            • 3. Re: OAI Event is not reading the workflow queue

              Have you set up Content Based Routing rules for your workflow adapter in iStudio too?

              Have a look at this thread.

              Re: Can't find agent in workflow

              Although we didn't get a reply if the suggestion worked or not, this is how I've got the Workflow working in the past. (BTW, I am still using a very old 9iAS version of the InterConnect, but I don't think that it has changed).

              On the subject of "Operation Completed Successfully", I have had experience of this when you are using iStudio via Citrix (or other Windows Terminal services). You need to ensure that you have a pure client/server connection or this often does not work.


              • 4. Re: OAI Event is not reading the workflow queue
                Yan, thanks for your reply again. I was wondering what do you mean by setting-up the "Content Based Routing Rules" because I pretty much just install the workflow adapter but never touch the adapter.ini file whatsoever. Is there something I have to do with the adapter.ini (any extra steps) or this rules was actually automatically set-up by the installation wizard? I'm not really sure how to set it up, perhaps you could give me a shed of light on this.

                Thank You,

                • 5. Re: OAI Event is not reading the workflow queue

                  I am basing this reply on the OAI build I have on my laptop, which is an Oracle 9iAS Integration build, however I do not think that it has changed since.

                  Before you do this, it is always a good idea to add the "OAIHeader" objects to the Common View.
                  1. Under "Common Views", expand the "Business Objects" and find your Business Object (e.g. MY_BO)
                  2. Under the "Events", expand the "Events" to find your event (e.g. MY_EVENT)
                  3. Highlight you event (MY_EVENT), Right-click on your mouse, and choose "Edit". This will bring up the "Edit Event" window.
                  4. Choose "Add". This will create a new line.
                  The 'Name' will be blank.
                  The 'Type' will be "String".
                  The 'Owner' will be blank.
                  The 'Array' will be blank, and
                  The 'Default' will be 'NULL'.

                  5. On the 'Type' value ("String"), click on the value "String". This will bring up a pop-up list.
                  6. From this list, select "Data Type..."
                  7. Now click once anywhere in the "Edit Event" window. This will bring up a "Common Data Types" window.
                  8. Scroll down, find and highlight the the name "OAIHeader". Press 'OK'
                  9. Now back in the 'Edit Event' window, you will notice that the type is "OAIHeader".
                  10. Now give the "Name" (currently still blank) a value. Give it the name "OAIHeader" too.
                  11. Press 'OK'
                  12. You will now see that the Event now has "OAIHeader" information. Some of these values will be of interest and of use later.

                  The actual values for "EventName, EventVersion" etc. will be added to the data of the message at Runtime.

                  *** TIP: I always do the above exercise first for every Business Object event I create. Once I've included the 'OAIHeader', I then add all of the actual other message attributes to the message afterwards. ***

                  Create Content Based Routing Rules

                  In this example, I am going to route a message from a sending DB Adapter (DBAPP1) to the Workflow Adapter (WORKFLOW). Then once the message has been passed to the Workflow, it will be passed to the receiving DB Adapter (DBAPP2).

                  1. In iStudio, under the "Design" tab, expand the "Enabling Infrastructure".
                  2. Under "Content Based Routing", find your Business Object.
                  e.g. MY_BO
                  3. Expand the Business Object, and then expand the "Events" to find your event.
                  e.g. MY_EVENT
                  4. On the Event (MY_EVENT), highlight it, then right mouse click. Choose Edit.
                  5. A window will pop-up called "Content Based Routing: MY_EVENT"
                  6. Hit the "New" button.
                  7. Expand the message structure (MY_EVENT), and find the 'OAIHeader' node.
                  8. Expand the "OAIHeader" node, and select (highlight) the "SendingApplication" attribute.
                  9. Press 'Next'. This will move you onto the next screen.
                  10. From the drop-down list, choose the "==" Operator. Press 'Next'.
                  11. Enter a Value in the box. Since my sending application is "DBAPP1", type in "DBAPP1". Press Next.
                  12. Since I have completed the "source" CBR rules, check the "Condition Complete" radio button, and Press 'Next'.
                  13. Now in the next screen, select "WORKFLOW". Now press 'Finish'.

                  Perform the same as above, this time routing the message from the "WORKFLOW" adapter to your receiving adapter (e.g. 'DBAPP2'). If the Workflow message does not have the 'OAIHeader' information in it's structure, once again refer to the above and add it in.

                  Once you have completed all of your CBR configuration, use "File > Push Metadata" to send this new message structure and CBR rules to your adapters (DBAPP1, WORKFLOW and DBAPP2).