Simple response to changes of AMICO variables.
java -jar %AMICO_HOME%/bin/amico-event-handler.jar [<conf-url>]
A main configuration file:
This is a minimal configuration file that uses default
parameters for missing attributes. --------------------------------------------- <?xml version="1.0"
encoding="UTF-8"?> |
This is a full configuration file that overrides default parameters. --------------------------------------------- <?xml version="1.0"
encoding="UTF-8"?> <command>UPDATE
last-loaded-module EH</command>
|
A configuration file for AMICO event handler adapter (linked from a main
configuration file):
<?xml version="1.0" encoding="UTF-8"?> <event-handlers> <event-handler trigger="test[.='xml']"
trigger-on-every-update="true" <variable name="user-id" value="<%=user-id%>"/> </event-handler> <event-handler trigger="test[.='xslt']" trigger-on-every-update="true"
type="xml" input-type="empty" <parameter name="numberOfSteps" value="<%=number%>"/> <parameter name="startNumber" value="<%=number%>"/> <parameter name="user-id" value="<%=user-id%>"/--> </event-handler> <event-handler trigger="test[.='list']" trigger-on-every-update="true" type="list"> <command timeOffsetMs="1000">UPDATE-DIRECT age 12</command> <command timeOffsetMs="1000">UPDATE-DIRECT age 13</command> <command timeOffsetMs="1000">UPDATE-DIRECT age 20</command> <command timeOffsetMs="1000">UPDATE-DIRECT age 30</command> </event-handler> <event-handler trigger="a" trigger-on-every-update="true" type="list"> <command timeOffsetMs="10">UPDATE-DIRECT b 1</command> <command timeOffsetMs="10">UPDATE-DIRECT b 2</command> </event-handler> </event-handlers> |
Each event-handler is runs a sequence of command when trigger variable is changed. Sequence of commands can be given as list, as a link to a file that contains list of commands, or to a XSLT that derives list of commands. XSLT file can also receive parameters.