Monday, 30 May 2016

Message Triggers


triggerWhen implementing Integration to external systems the normal way to trigger outbound messages is by using Business Rules and Script Includes that will validate and decide if a message needs to be transmitted to external systems.
The concept that I am going to discuss uses a different data driven approach:
Message triggers.
It has some specific advantages, I will list them below.
Let’s start with a real life example:
image001
The Integration table is a custom table for all data directly related to the specific Integration and consists of 7 main elements:
• Generic data: Id, Company, Interface Type and Service Type
• SOAP data: Outbound SOAP messages to use, SOAP inbound Data
• Mapping: Integration specific mapping data
• Process Flow: Allows for Integration specific data handling
• Translations: Uses a custom Translation table for translation inbound and outbound elements.
• Transactions: every inbound and outbound message for this Integration is logged in a transaction table for traceability and error solving by keeping track of the message transfer status. It also allows for easy retransmission in case of errors.
• and finally Message Triggers:
image003
The Trigger Table, Message, Order and Condition are the key parts used.
Trigger Table will decide for which table the trigger is valid.
Message will decide which outbound message will be created.
Order will decide the Order in which Transactions will be created.
Condition will hold the code that decides that a message needs to be created.
By writing a simple BR for the Trigger Table (or Task in this case because we also will trigger on other Task related tables):
image005
The script Include will handle following tasks:
• Get all Message trigger for the Table.
• Check all Message Trigger conditions for a True result.
• Sort the found Triggers on Order.
• Create a Transaction (Message = Transaction Type) for every found Trigger.
The advantages of this approach are:
• Cleaner and more robust triggering.
• Easier to debug.
• Trigger Coding is done in the Message Trigger conditions.
• Easy to trigger for multiple integrations and multiple messages on 1 update event.
• Easy to expand to other tables on which you would like to trigger.
• Easy to add new Triggers.
Work Order Example:
image007
I hope that during your next integration this will help you in using a more data driven approach.
If you have any question, please let me know or leave a comment abhi.jain39@outlook.com

5 comments:

  1. Iam very impressive your site gives the best and the most interesting information. This is just the kind of information that i had been looking for, i'm already your rss reader now and i would regularly watch out for the new posts, once again hats off to you

    servicenow online training hyderabad

    ReplyDelete

  2. Great Article. its is very very helpful for all of us and I never get bored while reading your article because, they are becomes a more and more interesting from the starting lines until the end.

    servicenow online training

    ReplyDelete
  3. It is nice blog Thank you porovide importent information and i am searching for same information to save my time
    Great Article.
    selenium Online Training Hyderabad

    ReplyDelete
  4. Nice Article..I found some useful information in your blog, it was awesome to read, thanks for sharing this great content to my vision, keep sharing NITDATA Training institue

    ReplyDelete