Shashi Kshirsagar OTM SIG 2013 Agenda • • • • • • • • • • • • What is an automation Agent ? What is Agent Tracking? Objectives Design Process Flow What needs to be added to every agent Result Metrics that can be collected KSAP User Interface Benefits Points to be considered QA 2 What is an Automation Agent? • An Automation Agent automates most of the things you can do manually with an action for a business object. • An Automation Agent listens for something to occur in OTM, called an event, and then performs actions based on that event occurring. Examples: • Every time OTM builds a new shipment, OTM tenders the shipment. • Every time a shipment tender is declined, notify a specific Involved Party. • Every time shipment receives a carrier arrival message, create an invoice. • Every time an order fails bulk plan, notify the transportation planner. Event Condition Action Shipment Created shipment that is over 38,500LBS and is leaving the Kansas City DC Tender the shipment Tender Declined Declined by a specific carrier e.g JB Hunt, Jack Cooper. Notify Joe, Mike or Business group Shipment Arrival Message received from Auto Pay carrier Order Failed to Bulk Plan Create Invoice Notify Planner Agent flow Agents Order Changes Anticipates Agent listens to Order Modification WMS Resolves Cancel Shipment Quantity Status Update Date OTM External sources Status Location Re-plan Indicator Update CSR Analyze Customer Collaborates Who is the Order Owner Notify Involve Parties Is order released Update WMS Are any shipments planned What is the shipment status Email Alerts Send ASN What is Agent Tracking? • Agent tracking is a methodology used to monitor performance of OTM agents by inserting additional logic into required agents that the user wants to track for performance or debugging transactional issues. • This methodology helps to gain intelligence without sacrificing performance, especially when OTM Logs are turned off. • Agent Monitoring is achieved by having each agent create a START row in the AGENT_TRACKING table (custom table) at the beginning of the agent and then updating the row to COMPLETE at the end of the agent. • The AGENT_TRACKING table is updated via a stored procedure call trigger from Agent action (DSU) 5 Objectives • Capture agent performance metrics to monitor, analyze, and react to downward trends in performance. • Transactional issue debugging with error details. • To identify agents that were in progress at the time of an unexpected system outage. • Use this information to rapidly recover from a catastrophic system failure without losing data. • Provide Alert notification on: – Unfinished agents that have been running longer than a given time threshold – Agents that ran successfully, but took longer than expected to run (daily summary) 6 Design • AGENT_TRACKING custom table • A Store Procedure to insert / update records in a AGENT_TRACKING custom table • Additional lines to call the store procedure in all agents 7 AGENT_TRACKING Custom Table 8 Agent Monitor Process Flow Agent Trigger Get Row Num Insert new entry in AGENT_TRACKING table with START time Agent Processing NO YES Agent Error ? Update AGENT_TRACKING table with COMPLETE status with END time Update AGENT_TRACKING table with ERROR status and Error details 9 Additions to Agents • Additional 3 actions on the ‘Actions’ tab 1. Get a sequence number of Agent Tracking table to store the successful update of the database record later. 2. Direct Sql Update (DSU) to insert of an agent’s record in the AGENT_TRACKING table. 3. DSU to update the Agent Tracking record upon agent completion. • Additional 1 line on the ‘Error Handler’ tab 1. DSU to update the Agent Tracking record upon agent failure 10 Inside Agent • Following extra actions needs to be added 11 Inside AGENT_TRACKING_NEXT_SEQ • To retrieve the next sequence, create an agent variable ($NEXT_SEQ) and specify the AGENT_TRACKING_NEXT_SEQ saved query 12 Inside STOP Line • In the event that an agent has ‘STOPs’ or a series of checks to make sure that it is working correctly, an update DSU must be placed prior to each ‘STOP’. This is the same as the action added at the end of the agent 13 Result Microsoft Excel 97-2003 Worksheet 14 Reports that can be collected from Agent Tracking • OTM Data Queries can be configured and scheduled to run on desired frequency to monitor the Agent performance based on various parameters such as mentioned below Report Look-back Period Frequency Number of agents running longer than xx minutes Last 1 day Daily Maximum run time of all agents Last 1 day Daily Number of FAILED Agents per day Last 7 day Weekly How often each agent fails Last 1 day Daily Maximum run time for COMPLETE agents Last hour Hourly 15 KSAP User Interface KSAP User Interface – Agent Tracking Setup • Select Domain • Select ‘Active’ agents from the list • Save KSAP User Interface – Agent Tracking Search • Various search field options to provide correct required record. • Most popular search fields: Object ID, Agent ID + Status, Duration + Status KSAP User Interface – Result Benefits • Helps find all agents that are triggered during given object’s life cycle. • Exact error identification without having the logs turn on • Helps to ensure all OTM processing is complete prior to ‘planned’ outages for graceful shutdown. • Helps to identify poor performing workflows and fine tune them • Identify multiple agents running based on same event. • Better control on which agents to be tracked. • Easy enabling & disabling of tracking • Reduce overall support effort and thus the Support cost. 20 Points to be considered • Agent monitoring is not automatic. Every agent that requires tracking must have the agent tracking steps added. • Need regular purging from AGENT_TRACKING table. Each agent being monitored will create a new row in the AGENT_TRACKING table and given the frequency of agent execution expected, there will be MANY monitoring data rows created. The AGENT_TRACKING table will quickly grow. The data purge process will keep this table from growing indefinitely. • Additional patch needs to be installed to get Error details. Oracle provides the patch upon request – patch 13554521: new agent variables 21 • Shashi Kshirsagar • OTM SIG 2013 22
© Copyright 2026 Paperzz