Configuring agents
You can configure different types of agents for different scenarios to meet your business need.
Enterprise agents
For enterprise agents, you can set the ColonyId or EnterpriseCode attribute in the agent criteria. If the EnterpriseCode attribute is passed in the agent criteria, the agent runs for the specified enterprise. If only the ColonyId attribute is passed in the agent criteria, the agent runs for those enterprises that match the ColonyId.
The enterprise agents implement the getJobsForEnterprise
function, whereas other
agents implement the getJobs
function.
Consider the following scenarios in which either ColonyId and/or EnterpriseCode is passed when the Enhanced Order Monitor agent is run.
- Scenario 1: Only ColonyId is passed – In this case, enterprises that match the ColonyId are derived and for each enterprise, the orders present in the colony are monitored.
- Scenario 2: If EnterpriseCode is passed – In this case, the orders for this enterprise present in the colony of the enterprise are monitored. This is irrespective of whether or not the ColonyId is passed in the criteria.
The enterprise agents that process across colonies are as follows:
- Extended Order Monitor
- Shipment Monitor
- Request Collection
Person Info Purge agents
Agents such as Person Info Purge and Person Info History Purge require a TableType attribute in the criteria, in addition to the ColonyId attribute. This is because the YFS_Person_Info and YFS_Audit tables exist in more than one shard and the agent runs with one TableType at a time. Therefore, for every colony, an agent must be configured with an agent criteria of TableType="TRANSACTION" and TableType="MASTER".
If the TableType attribute is not set, the agent works for the default TableType for that table. For YFS_Person_Info, the default TableType is TRANSACTION.
Other agents
Agents that process transactional data, such as non-enterprise agents and other purge agents, accept ColonyId as a criteria, and it has to be passed to process the data in the corresponding shard. So a shard level criteria is required for all these agents and gets triggered separately.