Friday, August 31, 2012

EAI Dispatch Service


It’s the business Service that invokes the other business services/workflows based on the properties of its input property set.

Scenarios of Dispatch Service
  1. Inbound Request - The EAI Dispatch Service can be the first step of the inbound integration to decide which business service should process an incoming message/document. For example in case of MQ series transport, whenever message is placed in a queue, MQ receiver in Siebel receives the message and dispatches to different workflows/Business services based on defined rules
  2. Outbound Request - Can be last step in outbound integration to send the outgoing message/document to the right transport. For example When sending an Opportunity message from Siebel to external system , message needs to be send to different external teams using different transports(MQSeries , HTTP , MSMQ)  depending on the Opportunity Sales stage (Prospect, Qualifying Lead, Selected) being send.
  3. It can also be used to change the root tags/elements and sending the new messages.

Demo of Outbound Request
  1. Created a simple workflow using EAI Dispatch service to dispatch the message to different workflows based on Opportunity Sales Stage.
  2. Create Rule Set for the Dispatch Service.
·         Go to Sitemap>Administration-Integration>EAI Dispatch Service View.
·         In the Rule Set Applet, create a new rule set with following values:


Dispatch Service Grammar. 

Symbol
Description
/
Defines a level of Hierarchy
@
Indicates the attribute
*
No specific criteria and that everything matches in the input


In above example input provided to dispatch service is shown below:



So to read the value of Sales Stage of an Opportunity we need to go to the 4th level defined below:
  1. PropertySet
  2. SiebelMessage
  3. ListofOpportunity_PRM_ANI
  4. Opportunity ---- Sales_Stage

Expression used to reach to Sales_Stage is /*/SiebelMessage/*/Opportunity@Sales_Stage. 
  • Uses 4 Slashes(/) to reach 4th level.
  • To retrieve the value of Attribute Sales_stage used @ symbol
  • *  specifies no Criteria. In this example 1st level is PropertySet instead of that lets say it was XMLHierarchy then even same expression will have worked.
  • After second slash in expression SiebelMessage is specified , it indicates that at 2nd level xml tag should have type as SiebelMessage which is true in above example. If it would have been say SiebelMessage2 then expression will have failed.
Please refer to Bookshelf for Detailed description of Dispatch Service Grammar. 

I will be writing one more blog for explaining other scenarios as well.

No comments:

Post a Comment