Documente Academic
Documente Profesional
Documente Cultură
Infosys
INFOSYS LIMITED
Pune
Date:
COPYRIGHT NOTICE
©2012 Infosys Limited, Bangalore, India. All rights reserved. Infosys believes the information
in this document is accurate as of its publication date; such information is subject to change
without notice. Infosys acknowledges the proprietary rights of other companies to the
trademarks, product names and such other intellectual property rights mentioned in this
document. Except as expressly permitted, neither this document nor any part of it may be
reproduced, stored in a retrieval system, or transmitted in any form or by any means,
electronic, mechanical, printing, photocopying, recording or otherwise, without the prior
permission of Infosys Technologies Limited and/or any named intellectual property rights
holders under this document.
Infosys Limited
Hosur Road
Electronic City, 3rd Cross
Bangalore 560 100
India.
Telephone: (91) (80)28520 261-270
Fax: (91) (80) 8520 362
Website: http://www.infosys.com
Project Details
H/W Platform : NA
S/W Environment : NA
Target readers
All
Keywords
Prerequisite
NA
Table of Contents
1.0 Introduction
An agent works for specific business objects like order base, order release, shipment etc.,
they are triggered by a pre-defined events associated with these business objects. It also
checks pre-set user conditions and perform a set of instruction as actions. I can also take
necessary actions and notify the concerned party in case an error occurs during the normal
processing of the agent.
1. When an OTM defined Event occurs, respective agent gets triggered automatically
Here the Agent “SHIPMENT – CREATED’ is triggered when a new Shipment is created
Define a custom event in Business Process Automation > Power Data > Event Management >
Agent Events.
Use this Event ID in the Event field of the Agent which needs to be invoked.
Raise this Event from any other agent, wherever require
Create an action under "Configuration and Administration > User Configuration > Actions Manager"
and add the label to it, also include the agent id in it.
Attach the label created in the above step to the to the respective screen set actions
Trigger the agent by going to the respective screenset, and clicking on the action id appearing
under the Actions window
Agent header:
Agent ID
Agent Type
Description
Event
Restrictions
Saved Conditions
Threshold Id
User role
Agent ID - unique, try to keep it same as Event that triggers this Agent
Agent Type – like Order Base, Order Release etc. Defines the business object on which this agent is
supposed to work
Description – Add a short description for describing what this agent is supposed to do (for documentation
and understanding)
Event – Can be OTM defined or user defined custom event. OTM listens for these Events, which than
triggers respective agents. These Events can be OTM defined like ORDER BASE created / ORDER BASE SHIP
UNIT updated or they can be custom defined through Business Process Automation>Event
Management>Agents Event.
Restrictions: Can be INTEGRATION/INTERNAL OR USER, depending upon the type of restriction one wants
to put on the Agent. These restrictions can be added only for an OTM defined Event and not for a custom
created event.
Saved Conditions: These are pre-defined conditions (one or more saved SQL queries) should hold true,
for the agent to get triggered. This must be used when an agent is required to action only under specific
condition.
Threshold: Thresholds can be used to tell the OTM not to trigger the agent unless the change is more than
the defined cutoff.
Run As: One can tell OTM to run the agent “as” a specific user role or using the rights of the domain.
Agent Action:
These are a set of instructions which are executed in top to down fashion once an agent is triggered.
Agents can perform large verity of action depending upon the Agent type defined in the header.
Example:
Error Handler:
Error Handler is used to define how the system should respond to an error arising during the normal
execution of an agent. Statements in Error Handler are written in similar fashion as in Action tab. They are
executed sequentially top to bottom. Most common statement is to NOTIFY the system ADMIN in case an
error is encountered while execution of the actions.
Example:
Only one agent should be defined for each Event type – to avoid inconsistency of result
Group multiple agents into one, when multiple agents need to be triggered on some event
Always use more specific agent events like ORDER RELEASE - DATES MODIFIED than generic ones
like ORDER RELEASE - MODIFIED event
Within the agent, add different IF sections to handle different conditions or child events with
appropriate STOP action to reduce unnecessary execution overflow
Name an agent same as Event type to avoid multiple agent acting on some ‘Event Type’
Describe the logic/functionality of the Agent in the Description field, this is a good practice and
will help others to understand the use of the agent
Used ‘Saved Query’ option effectively in Header tab to improve efficiency of an Agent
Prepare a flowchart for the business requirement before building an agent
Do not active an agent unless the entire logic is correctly written
All public agents should be de-activated on OTM installation
One should not delete any public agent, even if it’s not required
Do not use a public agent directly, copy it into your domain to use it
Use “LOG” statement followed by short description as the first line in Actions, this will help in
easily identifiable checkpoints in the system Logs, “LOG” action can also be used to describe a set
of statements
Direct SQL update statements should be scrutinized and tested carefully for any data corruption
and performance problem
Describe the intent of SQL in SQL Description field for Direct SQL Update action
While checking for negative IF condition, write statement for positive IF condition and place your
logic in the ELSE part
Use NOTIFY in error handler, to notify the admin in case of an error execution
Use system Logs to study the execution and flow of the agent
5.0 References
Oracle Help
www.otmfaq.com