以下示例说明如何通过活动关联技术提供的变量来访问与事件相关的信息。
act_event.getAttribute("hostname");
act_eventList.get(0);
<eventSelector alias="TECevent"> <eventType type="serverStatus"/> <filteringPredicate expressionLanguage="java"> return act_event.getStringAttribute("source").equals("TEC"); </filteringPredicate> </eventSelector> <eventSelector alias="WASevent"> <eventType type="serverStatus"/> <filteringPredicate expressionLanguage="java"> return act_event.getStringAttribute("source").equals("WAS"); </filteringPredicate> </eventSelector>以下代码显示如何使用 act_eventList 变量来获取已由第一个事件选择器接受的事件(名为 TECevent):
act_eventList.get("TECevent");