Event filters for publish channels

You can write event filter classes in Java™ to filter events so that the channel publishes a message only when a certain state condition is met.

To create a filter script, in the Automation Scripts application, click Create > Script for Integration. In the Create Script for Integration window, select Publish Channel. Specify the publish channel. Select Event Filter. Click Create.

The following filter script is an example that can be used on the MXASSETInterface publish channel:
if service.getMbo().isModified("status") and service.getMbo().getString("status")=="BROKEN":
  evalresult = False
else:
  evalresult = True

This script filters all events that did not change the status to APPR for the work order.

The event filters apply to event-based publish channels. Publish channels that are used to export data cannot use these filters.

Also, the mbo variable is not directly accessible here. Use the service.getMbo() to get access to the event MBO here.