Events

Pricefx generates various events which can trigger an action by IntegrationManager. Events are pulled from Pricefx on a scheduled interval and routed to Camel endpoints.

Enable Events on Pricefx Server

  1. Log in to the required partition

  2. Go to Administration > Configuration > General Settings

  3. Fill in the Event URL field with http://dummy_url

  4. Check the Disable sending events through HTTP (PUSH) option

See the Event Admin section in PlatformManager docs.


Approach 1: Properties-Based (Recommended)

The simplest way — configure event-to-route mappings in config/application.properties. IM automatically creates the fetch and file-consumer routes for each event type. You only write the handler route.

Configuration

integration.events.enabled=true
integration.events.event-to-route-mapping.PADATALOAD_COMPLETED=direct:eventPADataLoadCompleted
integration.events.event-to-route-mapping.CALCULATION_COMPLETED_CFS=direct:eventCFSCompleted
integration.events.event-to-route-mapping.ITEM_APPROVED_PGI=direct:eventItemApproved
# Custom events use CUSTOM. prefix in the key
integration.events.event-to-route-mapping.CUSTOM.MY_EVENT=direct:eventMyCustom

Properties

Property

Default

Description

integration.events.enabled

false

Enable/disable event polling

integration.events.scheduler-delay

60000

How frequently IM pulls events from Pricefx (ms)

integration.events.delay

10000

How often saved events are read from cache (ms)

integration.events.max-events

1000

Maximum events pulled per connection

integration.events.connection

pricefx

Pricefx connection name for event fetch

integration.events.initial-delay

1000

Initial delay before first pull (ms)

integration.events.event-to-route-mapping.<TYPE>


Map event type to Camel endpoint

Handler Route

XML
<routes xmlns="http://camel.apache.org/schema/spring">
    <route id="eventPADataLoadCompleted">
        <from uri="direct:eventPADataLoadCompleted"/>
        <setHeader name="targetName">
            <simple>${body[data][0][targetName]}</simple>
        </setHeader>
        <choice>
            <when>
                <simple>${headers.targetName} == 'DMDS.Product'</simple>
                <to uri="pfx-api:truncate?targetName=DMF.Product"/>
            </when>
        </choice>
    </route>
</routes>

The event body is a Map containing the full Pricefx event payload. Access fields with ${body[fieldName]}.


Approach 2: Direct pfx-event:fetch Route

When you need full control over scheduling or want to handle multiple event types in a single route, use pfx-event:fetch directly as the route consumer.

XML
<routes xmlns="http://camel.apache.org/schema/spring">
    <route id="eventFetch">
        <from uri="pfx-event:fetch
            ?eventTypes=PADATALOAD_COMPLETED,CALCULATION_COMPLETED_CFS
            &amp;maxEvents=500
            &amp;delay=10000
            &amp;initialDelay=5000"/>
        <choice>
            <when>
                <simple>${body[eventType]} == 'PADATALOAD_COMPLETED'</simple>
                <to uri="direct:handlePADataLoad"/>
            </when>
            <when>
                <simple>${body[eventType]} == 'CALCULATION_COMPLETED_CFS'</simple>
                <to uri="direct:handleCFSCalc"/>
            </when>
        </choice>
    </route>

    <route id="handlePADataLoad">
        <from uri="direct:handlePADataLoad"/>
        <log message="PA data load completed: ${body[data][0][targetName]}"/>
        <!-- downstream processing -->
    </route>
</routes>

When to choose Approach 2:

  • You need to handle multiple event types in one route with custom branching logic

  • You need fine-grained control over polling intervals per event type

  • You need different processing before forwarding to the handler

When to choose Approach 1: Everything else — it's less boilerplate and automatically handles caching, retries, and acknowledgement.

See pfx-event Component for the full parameter reference.


Stuck Events Monitoring

Property

Default

Description

integration.events.check-stuck-processing.enabled

true

Check for stuck events

integration.events.check-stuck-processing.scheduled-ms

7200000

Check interval (2 hours)

integration.events.check-stuck-processing.timeout-duration

24

When event is considered stuck

integration.events.check-stuck-processing.timeout-unit

h

Unit: d (day), h (hour), m (minute), s (second)

When a stuck event is found, a summary email is sent (requires error-handling email to be enabled).


Common Event Types

Event Type

Triggered When

PADATALOAD_COMPLETED

Data source load/flush finished

CALCULATION_COMPLETED_CFS

CFS calculation completed

ITEM_APPROVED_PGI

Price grid item approved

ITEM_UPDATE_PGI

Price grid item updated

ITEM_UPDATE_PPV

Pricing parameter value updated


See Also