TriggerEvent implementation used to test or preview an EmailTrigger, wrapping its configured trigger condition fields and website as if they had been produced by a live event. Used to exercise trigger matching logic for a given profile without a real event having occurred.
Implements: TriggerEvent
Properties
| Property | Returns | Description |
|---|---|---|
| attributes | Map<String,Object> | Extra attributes attached to this test event. Always an empty map for TestTriggerEvent since no attributes are ever added. |
| eventId | String | Event type identifier taken from the wrapped EmailTrigger, used to match this simulated event against trigger definitions. |
| sourceProfile | Profile | Profile supplied when this test event was created, used as the simulated source of the event. |
| triggerItem1 | String | First trigger condition value configured on the wrapped EmailTrigger. |
| triggerItem2 | String | Second trigger condition value configured on the wrapped EmailTrigger. |
| triggerItem3 | String | Third trigger condition value configured on the wrapped EmailTrigger. |
| triggerItem4 | String | Fourth trigger condition value configured on the wrapped EmailTrigger. |
| triggerItem5 | String | Fifth trigger condition value configured on the wrapped EmailTrigger. |
| website | Website | Website associated with the wrapped EmailTrigger. |
Inherited from TriggerEvent
Properties
| Property | Returns | Description |
|---|---|---|
| serialisable | boolean | Whether this event's attributes were built to survive being persisted, ie every value is a plain serialisable value rather than a persistent entity or some other object that only makes sense inside the firing transaction. Only the firing app can know this, so it declares it - see EventBuilder. An agent that subscribes to an event does not run when it fires. The event is written to storage as JSON, buffered with others, and read back minutes later in a different session, so a value that cannot be written and read back is not merely awkward, it breaks the whole delivery. The agent framework therefore ignores any event which does not say yes here. |
Methods
isSerialisable()
Returns: boolean
Whether this event's attributes were built to survive being persisted, ie every value is a plain serialisable value rather than a persistent entity or some other object that only makes sense inside the firing transaction. Only the firing app can know this, so it declares it - see EventBuilder. An agent that subscribes to an event does not run when it fires. The event is written to storage as JSON, buffered with others, and read back minutes later in a different session, so a value that cannot be written and read back is not merely awkward, it breaks the whole delivery. The agent framework therefore ignores any event which does not say yes here.
Methods
getEventId() · getWebsite() · getSourceProfile() · getTriggerItem1() · getTriggerItem2() · getTriggerItem3() · getTriggerItem4() · getTriggerItem5() · getAttributes()
getEventId()
Returns: String
Event type identifier taken from the wrapped EmailTrigger, used to match this simulated event against trigger definitions.
getWebsite()
Returns: Website
Website associated with the wrapped EmailTrigger.
getSourceProfile()
Returns: Profile
Profile supplied when this test event was created, used as the simulated source of the event.
getTriggerItem1()
Returns: String
First trigger condition value configured on the wrapped EmailTrigger.
getTriggerItem2()
Returns: String
Second trigger condition value configured on the wrapped EmailTrigger.
getTriggerItem3()
Returns: String
Third trigger condition value configured on the wrapped EmailTrigger.
getTriggerItem4()
Returns: String
Fourth trigger condition value configured on the wrapped EmailTrigger.
getTriggerItem5()
Returns: String
Fifth trigger condition value configured on the wrapped EmailTrigger.
getAttributes()
Returns: Map<String,Object>
Extra attributes attached to this test event. Always an empty map for TestTriggerEvent since no attributes are ever added.