Announcement

Collapse
No announcement yet.

Possibility of creation of Child Events in Agent

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Possibility of creation of Child Events in Agent

    Hi,
    I want an agent to listen to modification of BASE COST in Shipment. I selected the agent event SHIPMENT - COST MODIFIED and found not child event set is assoicated with it.

    As we know, generally in OTM, the cost types are base , accessorial, discounts,etc. But i want agent to listen only for BASE COST and not other costs.. I can go with saved conditions.

    But......
    Is it possible to create child events when the event does not contain any?? I searched in power data and also help file but of no use reg. ceration.

    Appreciate your guidance..

    thanks.
    Cheers,
    -Neo

  • #2
    Re: Possibility of creation of Child Events in Agent

    Hi there,
    This is possible but not using standard events.

    You will need to create a custom event that is triggered from a change to a defined field in a defined table, that custom event will trigger an agent that can compare your costs to a pre-stored cost in the shipment_cost_remarks table.

    What I suggest is that on shipment creation you copy the BASE shipment cost to the shipment cost remarks via Direct SQL Update.

    Then, populate the following 4 tables with details of the new event and table and column names (this can be done via CSV, SQL etc)
    1) NOTIFY_SUBJECT
    2) AGENT_EVENT
    3) AGENT_EVENT_TABLE_MAPPING
    4) AGENT_EVENT_COLUMN_MAPPING

    In the AGENT_EVENT_TABLE_MAPPING you should specify the SHIPMENT_COST table
    In the AGENT_EVENT_COLUMN_MAPPING you should specify the SHIPMENT_COST table and the COST field
    In the agent_event table you should specify the new event that you want to trigger.,
    (Note: the data_query_type_gid field should be SHIPMENT and the event_topic_class field should be: glog.server.workflow.lifetime.shipment.CustomModSh ipmentEvent)

    The new event can then trigger a new agent that in the actions can compare the BASE cost stored in the shipment cost remarks with the current value to see if it is the BASE cost that has changed, if it has then update it and continue to do the actions you need.

    Also another note, you will need to bounce the app once you have populated the four tables so that OTM can cache the new event.

    Hope this helps.
    Regards,
    Antony
    Antony Carter
    Mavenwire

    www.MavenWire.com

    Comment


    • #3
      Re: Possibility of creation of Child Events in Agent

      i thought it would be as simple as creation of custom events in OTM. But after you have mentioned abt it i need to try it in my training environment.

      Thank you so much for such a wonderful explanation.
      I have one query to be clarified... you have mentioned that "You will need to create a custom event that is triggered from a change to a defined field in a defined table"..
      is it possible to trigger an agent based on change in particular field

      I also tried to figure out but got no clue abt doing that , to my understanding, agent will trigger based on some event captured by OTM...will it trigger for even database table change?
      Please let me know abt this

      Cheers!
      Cheers,
      -Neo

      Comment


      • #4
        Re: Possibility of creation of Child Events in Agent

        Yes, that's correct. Populating the four tables I mentioned will enable OTM to trigger a custom event, and hence an agent, for a change to a field in the UI that has it's own database field.

        Cheers.
        Antony Carter
        Mavenwire

        www.MavenWire.com

        Comment

        Working...
        X