Agent Tracking OTM SIG 2013 - Copy.ppt · What is an Automation Agent? • An Automation Agent...

22
Shashi Kshirsagar OTM SIG 2013

Transcript of Agent Tracking OTM SIG 2013 - Copy.ppt · What is an Automation Agent? • An Automation Agent...

Shashi KshirsagarOTM SIG 2013

• 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

Agenda

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 Create Invoice

Order Failed to Bulk Plan Notify Planner

WMS

External sources

CSR

Quantity

Date

Status

Location

Agent listens to Order Modification

Order Changes

Cancel Shipment

Status Update

Re-plan

Indicator Update

Anticipates Resolves

Analyze Collaborates

Who is the Order Owner

Is order released

Are any shipments planned

What is the shipment status

Notify Involve Parties

Update WMS

Email Alerts

Send ASN

Agents

OTM

Agent flow

Customer

• 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

What is Agent Tracking?

• 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

Objectives

• 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

Design

8

AGENT_TRACKING Custom Table

9

Agent Monitor Process Flow

Agent Trigger

Get Row

Num

Insert new entry in

AGENT_TRACKING table with

START time

Agent

Processing

Agent

Error ?

Update AGENT_TRACKING

table with COMPLETE status

with END time

Update AGENT_TRACKING

table with ERROR status and

Error details

YESNO

• 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

Additions to Agents

11

Inside Agent

• Following extra actions needs to be added

• To retrieve the next sequence, create an agent variable ($NEXT_SEQ) and

specify the AGENT_TRACKING_NEXT_SEQ saved query

12

Inside AGENT_TRACKING_NEXT_SEQ

• 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

Inside STOP Line

14

Result

Microsoft Excel

97-2003 Worksheet

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

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

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

• 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

Benefits

• 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

Points to be considered

22

• Shashi Kshirsagar• OTM SIG 2013