IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

Join condition in Trigger

  • 1.  Join condition in Trigger

    Posted Mon February 27, 2006 04:07 PM

    Hi,
    Two publishable documents are calling the same service. Then during subscription of this which doucment referece I have to use?.

    Thanks in advance
    Hari


    #Integration-Server-and-ESB
    #webMethods
    #Universal-Messaging-Broker
    #broker


  • 2.  RE: Join condition in Trigger

    Posted Mon February 27, 2006 05:42 PM

    If a Flow or java service is referenced in multiple triggers, you should specify both publishable document types as inputs. Only one of the document types will contain data.

    I’d suggest starting your Flow with a branch statement that tests whether the first document is null and if so maps the second document to a new “internal” document that references the same document type structure. If the first document is not null ($default case) then map the first document type to an internal document.

    Your Flow can then proceed using the internal document type. Renaming the publishable document type to an internal document type allows the major portion of your Flow service to reference a much shorter name. If both input documents share the same structure, then renaming also allows you to avoid having to duplicate code.

    HTH,

    Mark


    #webMethods
    #Integration-Server-and-ESB
    #Universal-Messaging-Broker
    #broker


  • 3.  RE: Join condition in Trigger

    Posted Wed September 06, 2006 06:35 AM

    Mark,

    On the other hand how do I create a service to accept 2 documents as inputs and trigger the service only when 2 documents are received by the join manager. So far I can get this scenario working by doing the following steps

    Subscribe side

    1. Create 2 documents docA, docB
    2. Create a service to process (ServiceX)
    3. Create a Trigger with docA and docB as input documents with join condition set to All(AND) and assign ServiceX as processing service.

    Publishing side

    1. Generate a UNIQUIE ID (id1)for corelation
    2. Create a docA instance and assign the id1 to _env.activation
    3. publish docA
    4. Create docB instance and assign the id1 to _env.activation
    5. publish docB

    But my question is can I get through this by not touching the _env document. Which means can I assign a custom filed for corelation. More over I remember there are some changes to the way broker works in the new realease with regards to activationID. Can some one explain what those changes are please.

    Cheers,
    Ram Challuri


    #Integration-Server-and-ESB
    #webMethods
    #broker
    #Universal-Messaging-Broker


  • 4.  RE: Join condition in Trigger

    Posted Wed September 06, 2006 08:50 PM


  • 5.  RE: Join condition in Trigger

    Posted Wed September 06, 2006 11:43 PM

    If both documents are published within the same top-level service, then you do not need to manually assign an activiation ID. IS automatically assigns the same activation ID to all docs published within a single top-level service.

    May I ask the rationale for publishing two different docs and then processing them together on the subscribe side? Would one doc type be sufficient?


    #webMethods
    #Integration-Server-and-ESB
    #broker
    #Universal-Messaging-Broker


  • 6.  RE: Join condition in Trigger

    Posted Fri September 15, 2006 01:20 AM

    Hi,

    pryWM - can you explain why you don’t think so.

    Reamon - I agree with you that if we use the same toplevel service to publish 2 documents then IS is going to assign the same activationid. But what happens if the TOP level service is different. Now the answer to your next question is the same. What happens if I am expecting input from 2 departments for me to proceed with my service.

    e.g. - in our environments we have morethen 25 production integration servers and every. We have atleast one for every department and all of them connected through wm brokers and gateways and teritories. It is very common for us to expect input from 2 different departments to perform a task.

    Ram Challuri


    #webMethods
    #Integration-Server-and-ESB
    #Universal-Messaging-Broker
    #broker


  • 7.  RE: Join condition in Trigger

    Posted Fri September 15, 2006 04:24 PM

    For two published docs to meet the join criteria of a trigger, they must have the same activationId. If they do not, they will never be joined.

    If you don’t publish the two documents within the same top level service, then you must set the activationId manually, and it must be the same in both published docs. This is described in the pub/sub guide. It still applies to IS 6.5.

    So, if you’re using two different top level services to publish two documents, you must somehow set the activationId to be the same in both published documents. The best bet is to use something from the document data that is unique.


    #webMethods
    #broker
    #Integration-Server-and-ESB
    #Universal-Messaging-Broker


  • 8.  RE: Join condition in Trigger

    Posted Fri September 15, 2006 08:40 PM

    sorry for leaving a short and incomplete message in my last post.

    I would go with the things explained by raemon.


    #Universal-Messaging-Broker
    #Integration-Server-and-ESB
    #broker
    #webMethods


  • 9.  RE: Join condition in Trigger

    Posted Mon September 25, 2006 12:27 AM

    Thanks for the clarification.

    The other part of the question was, Can I use any part of the document as the activation id or I should only use the _env.activationID.


    #Integration-Server-and-ESB
    #broker
    #Universal-Messaging-Broker
    #webMethods


  • 10.  RE: Join condition in Trigger

    Posted Mon September 25, 2006 06:32 PM

    You can place any value you like into _env.activationID but whatever value you use, it must be placed into that field. Let me know if I misunderstood your question.


    #broker
    #webMethods
    #Universal-Messaging-Broker
    #Integration-Server-and-ESB


  • 11.  RE: Join condition in Trigger

    Posted Mon October 23, 2006 02:17 AM

    Reamon,
    Thanks for your response.

    I have been placing document specific ID’s {e.g. po#, invoice# etc} into _env.activationID. But my question was instead of using the activationID from _env, can I use any other variable from the document itself.

    Cheers,
    Ram Challuri


    #Integration-Server-and-ESB
    #broker
    #webMethods
    #Universal-Messaging-Broker


  • 12.  RE: Join condition in Trigger

    Posted Mon October 23, 2006 08:59 PM

    No. According to the documentation (you have read it, no?), only the _env.activationID is used to determine whether or not to join documents.


    #Universal-Messaging-Broker
    #Integration-Server-and-ESB
    #webMethods
    #broker


  • 13.  RE: Join condition in Trigger

    Posted Mon October 23, 2006 09:27 PM

    Hi Guys,

    In this scenario i have a question too…according to the documentation, to enable the trigger check for duplicates the docuemnts should have the same uuid. I have tried setting up the same uuid’s and also setting up the trigger settings for duplicate verification. But webM internally assigns a uuid to the document published and hence am not able to chk for duplicates at the trigger level. Is there anything i am missing out here?

    Rgds,
    Pradeep


    #broker
    #webMethods
    #Universal-Messaging-Broker
    #Integration-Server-and-ESB


  • 14.  RE: Join condition in Trigger

    Posted Mon October 23, 2006 11:49 PM

    What IS considers a duplicate and what your process considers a duplicate is likely two different things. The UUID is used and tracked to prevent processing the exact same message more than once (to overcome network failures, etc.). If you’re trying to prevent processing the same invoice, or PO, or other document more than once, you’ll need to use some other mechanism to detect duplicates at this level.


    #Integration-Server-and-ESB
    #broker
    #webMethods
    #Universal-Messaging-Broker


  • 15.  RE: Join condition in Trigger

    Posted Tue October 24, 2006 01:05 AM

    Thanks Reamon.


    #broker
    #Integration-Server-and-ESB
    #webMethods
    #Universal-Messaging-Broker


  • 16.  RE: Join condition in Trigger

    Posted Tue October 24, 2006 02:36 PM

    Reamon,

    Is there any way in which the dupliactes (in our sense like dupliate PO/SO) can be controlled at trigger level. The document resolver service can be used for the same purpose, but i was trying in a different way.
    Instead of doing a pub.pub:publish i was trying to create a broker client using the broker API and set the UUID in it from the data and publish the event to broker. But i messed it up :slight_smile: at the end and i gave up that idea

    Rgds,
    Pradeep


    #Integration-Server-and-ESB
    #broker
    #webMethods
    #Universal-Messaging-Broker


  • 17.  RE: Join condition in Trigger

    Posted Tue October 24, 2006 03:45 PM

    The document resolver service would be a good way to go. You’ll need to have that service store and/or look-up an identifier (PO#, etc) to determine if it has a dupe.


    #webMethods
    #Universal-Messaging-Broker
    #Integration-Server-and-ESB
    #broker