Derived Events

A derived event is an event that is triggered based on the triggering of another event. When the trigger you need is not available as a core event, use a derived event.

For example, it is common to configure a derived event to trigger when:

  • An object reaches a specific state in a workflow.

  • An event-based OIEP cannot discriminate the republish event from other types of events because it would also be registering events and publishing data.

  • Referenced images, referenced products, parent products, or products that are linked, removed, or modified in a specific classification structure.

  • The triggering object types are set up on an event-based OIEP, and then the business rules are applied to generate derived events based on the original object type triggering.

  • An object does not have a change in approval status, but the inherited value changes on the children need to be published.

Prerequisites

Derived Events is an advanced topic, it is expected that anyone reading this documentation is familiar with Core Events. For more information refer to the Core Events section of this guide here.

Also, a thorough understanding of business rules is needed to create successful derived events. For more information, refer to the Business Rules section here, and refer to the Event-Based Example Business Rules for Derived Events section of the Data Exchange documentation here.

Add a Derived Event Type

A derived event type must exist before it can be configured for an OIEP.

To create a derived event type:

  1. Go to System Setup.

  2. Click Derived Events.

  3. On the Derived Events tab, click the Add Derived Event Type link to display the Add Derived Event Type dialog.

  4. Type an ID and click the Add button to display the Derived Events tab with the newly added derived event type. In the example below, commonly used derived event types are listed. Once the derived event type is displayed, it is available for use.

Use a Derived Event Type in a Business Rule

JavaScript business rules can access derived event types (such as the WebSiteAdd type shown below) via the Derived Event Type bind, as defined in the Event Handling Binds topic of the Resource Materials documentation in online help here. Derived events are generated for an object on event queues (also required to bind), event processors, or outbound integration endpoints (OIEPs) using the necessary binds and one line of JavaScript.

For example, the WebItems event-based OIEP (assigned to the 'queue' variable name) uses the queueDerivedEvent() method, which accepts the derived event WebSiteAdd (assigned to the ‘event’ variable name), and the Current Object (assigned to the ‘node’ variable name), as shown in the image below.

Use a Derived Event Type in an OIEP

When configuring an event-based OIEP output template, derived event types can be selected to enable sending files formatted in different ways or to include different data based on the action that triggers the event. For example, when pushing data to a website, consider the following derived event types:

  • WebAdd - when an object is first linked into a classification.

  • WebModify - when an object link to a classification is modified.

  • WebRemove - when an object is unlinked from a classification.

Derived events can be used to trigger changes prior to approval by setting the Main workspace on the OIEP.

To use a derived event type:

  1. In an event-based OIEP, on the Configuration tab, open the Output Templates section and click the Add configuration link, or edit an output template that is already displayed.

  2. On the Conditions for Output Template dialog, select the object type and the derived event type. In this example the derived event type is 'WebAdd'.

  3. Repeat the previous steps to create additional output templates for other derived events.

    In this example, the format for all output templates is Excel but the mapping differs in each template based on the derived event being output. It is also possible to specify different output formats for each output template such as Generic XML, STEPXML, or CSV, depending on the specific requirements.

Delete a Derived Event Type

You can delete a derived event type when it is no longer necessary. This also removes it from the available Event Types displayed when configuring an OIEP Output Template.

To delete a derived event type:

  1. Go to System Setup.

  2. Click the Derived Events node.

  3. Find the derived event type to be removed, right-click the row icon to display the available options.

  1. Click Remove Derived Event Type to display the Remove Derived Event Type dialog.

  1. Click Remove and the Derived Events tab no longer lists the deleted derived event type.