EPCIS 2.0 Events, How to Use Them in RCOM Gateway
EPCIS 2.0 (Electronic Product Code Information Services) is a GS1 standard that enables systems to share visibility data about the movement and status of products. In RCOM Gateway, EPCIS events can be ingested through REST API routes or MQTT topics and used as triggers for workflows.
Two event types are available: EpcisMessage and EpcisObject. While both process EPCIS 2.0 JSON-LD documents, they differ in how workflows handle the incoming data.
What Is an EpcisMessage?
An EpcisMessage treats the entire EPCIS 2.0 document as a single unit. Instead of splitting individual events, the workflow receives the full payload exactly as it was received.
This is useful when:
- You need to archive or validate the entire document.
- The grouping and order of events matter (e.g., compliance or traceability batches).
- You want to process bulk uploads (such as daily shipment manifests).
For example, a pharma company might receive a full serialized shipment file in EPCIS format. An EpcisMessage workflow can store, validate, or forward that file to downstream systems in one go.
What Is an EpcisObject?
An EpcisObject splits the incoming EPCIS 2.0 document into individual events, triggering the workflow once per event.
This allows fine-grained, event-level automation. Each ObjectEvent, AggregationEvent, AssociationEvent, TransactionEvent, or TransformationEvent becomes its own trigger with its attributes mapped into the workflow context.
This is useful when:
- You need real-time responses per event (e.g., updating digital twins, triggering alerts).
- Events require different handling logic depending on
bizStep,disposition, orreadPoint. - You want to filter or route events individually.
For example, on a packaging line, each carton sealing (ObjectEvent) or pallet association (AggregationEvent) can trigger its own workflow for validation, logging, or ERP integration.
Key Differences at a Glance
| Feature | EpcisMessage | EpcisObject |
|---|---|---|
| Processes full document | ✅ Yes | ❌ No |
| Splits into individual events | ❌ No | ✅ Yes |
| Preserves event grouping | ✅ Yes | ❌ No |
| Best for batch ingestion | ✅ Yes | ⚠ Not ideal |
| Best for per-event logic | ❌ No | ✅ Yes |
Using EPCIS Events in Workflows
Configure an Endpoint (REST/MQTT):
- Set the Event Type as
EpcisMessageorEpcisObject. - Ensure payloads follow GS1 EPCIS 2.0 JSON-LD format (with
@contextandtypefields).
Create an Event Processor:
- Choose the trigger type (
EpcisMessageorEpcisObject). - Map incoming variables into workflow parameters.
- Optionally set filters (for
EpcisObject, you can filter bybizStep,action,readPoint, etc.).
Design the Workflow:
- For
EpcisMessage: handle the entire payload (e.g., log, forward, or archive). - For
EpcisObject: add logic per event (e.g., update objects, send alerts, or run validations).
Monitor Workflow Jobs:
- Use workflow job logs to inspect how the EPCIS data was processed.
- Debug transformations or routing using the workflow context viewer.
Choosing the Right Approach
- Use
EpcisMessagewhen the EPCIS document must be preserved as-is for compliance, auditing, or batch processing. - Use
EpcisObjectwhen you need real-time, per-event automation, such as updating digital twins, tracking pallets, or enforcing business rules.
In practice, many organizations combine both:
- First ingest the EPCIS file as an
EpcisMessagefor compliance storage. - Then process the same file as
EpcisObjectfor operational workflows.