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
Log in to the required partition
Go to Administration > Configuration > General Settings
Fill in the Event URL field with
http://dummy_urlCheck 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:eventMyCustomProperties
Property | Default | Description |
|---|---|---|
|
| Enable/disable event polling |
|
| How frequently IM pulls events from Pricefx (ms) |
|
| How often saved events are read from cache (ms) |
|
| Maximum events pulled per connection |
|
| Pricefx connection name for event fetch |
|
| Initial delay before first pull (ms) |
|
| Map event type to Camel endpoint |
Handler Route
<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.
<routes xmlns="http://camel.apache.org/schema/spring">
<route id="eventFetch">
<from uri="pfx-event:fetch
?eventTypes=PADATALOAD_COMPLETED,CALCULATION_COMPLETED_CFS
&maxEvents=500
&delay=10000
&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 |
|---|---|---|
|
| Check for stuck events |
|
| Check interval (2 hours) |
|
| When event is considered stuck |
|
| 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 |
|---|---|
| Data source load/flush finished |
| CFS calculation completed |
| Price grid item approved |
| Price grid item updated |
| Pricing parameter value updated |
See Also
pfx-event Component — Technical reference for pfx-event:fetch and pfx-event:sendCustom
Error Handling — Configure error email notifications for stuck events