Business Process Automation

Agent Gates

This page is accessed via Business Process Automation > Power Data > Event Management > Agent Gates.

When an external event is received, it must be determined if the event is valid. This is determined by Agent Gates. If valid, the agent gate sets the internal status and raises the appropriate event.

Agent Gates are assigned to objects, including, orders, order releases, and shipments. The object that your agent gate refers to is defined in the Object Type field. In the example described here, the object type is SHIPMENT. The agent gate also needs to be described. This is set in the Status Function field. In this example, your Status Function could be DELAY. Your Agent Gate ID is automatically generated and is a combination of your Domain, Object Type, and Status Function. In this example, it would be USERxSHIPMENTxDELAY.

An agent gate is connected to a corresponding class file, which is defined in the Functor Class field. In this example, we will use the ShipmentStatus.java class file. To properly assign a value to this field, you must know where the class file is located and follow the proper file structure for defining this field. In this example, the Functor Class would be glog.server.workflow.shipment.ShipmentStatus$Delay, where glog.server.workflow.shipment is the folder structure of where the class file is located, ShipmentStatus is the name of the class file, and $Delay is the class name defined in the class file.

The Agent Gate can optionally have a saved condition, defined in the Saved Condition ID field, which looks for specific criteria.

If you select the Saved Condition Additive check box, the saved condition is run in addition to the internal status check. If unchecked, the saved condition replaces what the code does.

The Saved Condition Error Translation field is an optional field. If a Saved Condition is added to the agent gate, this field can be used to specify a translation ID for a user-defined error message if that Saved Condition causes the Agent Gate to return false. If left blank, the error message will simply indicate the name of the Saved Condition.

Each class file has several Current State Definitions defined in it. In this example, the class file includes, Status Missing, Not Started, Delayed, and Enroute.

If the current status of the shipment is equal to one of the Current State Definitions, then the agent gate will determine the event valid. It will then set the internal status of the Shipment to one of the New State Definitions, in this example either Enroute or Enroute Delayed, and raise it as an event.

Related Topics