View Single Post
  #2 (permalink)  
Old May 27th, 2008, 10:19
AntonyC AntonyC is offline
Junior Member
 
Join Date: May 2008
Location: UK
Posts: 4
Thanks: 0
Thanked 1 Time in 1 Post
Groans: 0
Groaned at 0 Times in 0 Posts
Rep Power: 0
AntonyC is on a distinguished road
Send a message via AIM to AntonyC Send a message via Skype™ to AntonyC
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
Reply With Quote