Event Handling#
Overview#
CAMX integration processes equipment events received through the IPC-2501 MIME message format over an HTTP broker. The controller automatically routes each event type to a dedicated automation workflow that coordinates DEE (Dynamic Execution Engine) actions and MES integration.
Supported Events:#
- ItemTransferIn — Material enters equipment
- ItemTransferOut — Material exits equipment
- EquipmentChangeState — Equipment state transition, see Equipment State Change
- EquipmentRecipeReady — Recipe ready for production, see Recipe Management
Event Processing Flow#
General Workflow Pattern#
All CAMX events follow a similar processing pattern:
Equipment sends message via HTTP broker
↓
CAMX driver polls GetMessage
↓
Driver receives MIME-formatted message
↓
Driver sends Acknowledge to broker
↓
Event type identified from message schema
↓
EquipmentEvent task extracts event properties
↓
Retrieve task gets resource context (ResourceName)
↓
Event-specific processing
↓
Custom DEE invoked (if configured)
↓
Result handling and logging
↓
Workflow completes
ItemTransferIn Event#
Overview#
Material transfer events (ItemTransferIn and ItemTransferOut) are triggered when material moves in or out of equipment. Both events are processed through dedicated workflows and invoke custom DEE (Dynamic Execution Engine) actions for business logic processing.
CAMX controller does NOT automatically track materials in/out of MES. The responsibility of material tracking is delegated entirely to the configured DEE. This allows flexible integration with custom business logic without enforcing a specific tracking model.
Configuration#
To enable custom DEE processing for ItemTransferIn events:
Feature Flags in IoTMetadataDefinition#
| Configuration Key | Type | Value | Description |
|---|---|---|---|
| CAMX_ItemTransferIn_useDEE | String | CustomComplexTrackIn | DEE name to invoke for ItemTransferIn events (required to enable processing) |
| CAMX_ItemTransferIn_retries | Integer | 3 | Max retry attempts for ItemTransferIn (default: 1) |
DEE is Required
If CAMX_ItemTransferIn_useDEE is not configured, the ItemTransferIn event is logged but NOT processed. The DEE name must be explicitly configured for event processing to occur.
ItemTransferOut Event#
Overview#
ItemTransferOut is triggered when material exits equipment and follows the same processing pattern as ItemTransferIn.
Configuration#
To enable custom DEE processing for ItemTransferOut events:
Feature Flags in IoTMetadataDefinition#
| Configuration Key | Type | Value | Description |
|---|---|---|---|
| CAMX_ItemTransferOut_useDEE | String | CustomComplexTrackOut | DEE name to invoke for ItemTransferOut events (required to enable processing) |
| CAMX_ItemTransferOut_retries | Integer | Max retry attempts for ItemTransferOut (default: 1) |
DEE is Required
If CAMX_ItemTransferOut_useDEE is not configured, the ItemTransferIn event is logged but NOT processed. The DEE name must be explicitly configured for event processing to occur.
Message Fields#
| Field | Type | Description |
|---|---|---|
| itemInstanceId | String | Material identifier |
| laneId | String | Equipment lane/position |
| Extensions | Object | Optional custom data from equipment |
Integration#
Workflow Processing#
Material entering equipment flows through:
Equipment Event (ItemTransferIn/ItemTransferOut)
↓
EquipmentEvent task → Parse itemInstanceId, laneId, Extensions
↓
doCommonLogic subworkflow → Execute custom DEE
↓
Result handling → Log success or error
Detailed Steps#
- Message Reception: CAMX driver receives ItemTransferIn message from broker
- Property Extraction: equipmentEvent task extracts:
itemInstanceId: Material identifierlaneId: Equipment lane/positionExtensions: Optional custom data- Resource Resolution: retrieve task retrieves ResourceName from context
- Configuration Check: codeExecution task:
- Validates itemInstanceId is not null/empty
- Checks
CAMX_ItemTransferIn_useDEEorCAMX_ItemTransferOut_useDEEconfiguration - Extracts DEE name and retry settings
- DEE Invocation: doCommonLogic subworkflow calls the configured custom DEE with:
- ResourceName: MES resource name
- Content: itemInstanceId (material identifier)
- EventType: "ItemTransferIn"
- Attributes: Additional material properties (laneId, etc.)
- Extensions: Custom data from equipment
- Error Handling: If DEE fails:
- Retriable errors (deadlock, data changed): Retry up to configured attempts
- Non-retriable errors (validation, permission): Fail immediately
- Result Logging: Workflow logs completion status
DEE Input Parameters#
When ItemTransferIn or ItemTransferOut is processed, the configured DEE expects:
| Input | Source | Example Value | Description |
|---|---|---|---|
| ResourceName | Automation context | "SMT_SPI_1" | MES resource processing the event |
| Content | Equipment message | "PANEL-001" | Material identifier (itemInstanceId) |
| EventType | Equipment event type | "ItemTransferIn/Out" | Type of transfer event |
| Attributes | Parsed event data | { laneId: "Lane-1" } | Material attributes from event |
| Extensions | Equipment extension data | { "recipe": "recipe01" } | Custom data within the event |
Attributes is a property containing all event attributes
Expected DEE Output#
The DEE should return results indicating processing status:
| Output | Type | Expected Values | Description |
|---|---|---|---|
| Result | Boolean/String | true, false, "Success", "Error" | Operation success indicator |
| Message | String | Any | Error/status description |
Result Interpretation
Result = trueorResult = "Success": Event processed successfullyResult = falseorResult = "Error": Processing failed, may trigger retry- Missing/null Result: Treated as processing error
Error Handling#
Retriable Errors#
These errors trigger automatic retry (up to configured max retries):
| Error Type | Cause |
|---|---|
| Deadlock | Database concurrency conflict |
| Data Changed | Referenced object modified |
| MES Bug | Service returned unexpected error |
| Host Down | Temporary service unavailability |
Non-Retriable Errors#
These errors fail immediately without retry:
| Error Type | Cause |
|---|---|
| Validation Failed | null/empty itemInstanceId |
| DEE Not Found | Configured DEE doesn't exist |
| Resource Not Found | LinkedEntityName missing |
Error Logging#
- EventType: ItemTransferIn
- itemInstanceId: Material identifier
- ResourceName: MES resource
- Error Details: Error message and cause
- Retry Count: Number of attempts (if retriable error)
- Timestamp: When error occurred
Troubleshooting#
Material Transfer Events Not Processed#
Equipment sends ItemTransferIn but no DEE invocation occurs
Root Causes and Solutions:
- DEE Configuration Missing
- Verify
CAMX_ItemTransferIn_useDEEis configured - Check value is not empty/null
-
Restart Automation Controller after adding configuration
-
Resource Name Mismatch
-
Verify resource linked to controller matches IoTMetadataDefinition resource
-
DEE Not Found
- Verify DEE exists in MES with exact name from configuration
- Check DEE name spelling and case sensitivity
- Confirm DEE is published and available
DEE Processing Fails#
DEE called but returns error
Diagnosis and Resolution:
- Check Error Type
- Look in controller logs for error classification (retriable vs non-retriable)
- Retriable errors show "Retrying..." messages
-
Non-retriable errors show "Failed without retry"
-
For Retriable Errors
- Review MES system logs for deadlocks/data conflicts
- Check database concurrency issues
-
May retry automatically up to configured max attempts
-
For Non-Retriable Errors
- Check DEE implementation for validation errors
Configuration Not Taking Effect#
Configuration changes made but DEE not invoked
Solutions:
- Restart Controller - Configuration cache refreshed on startup
- Verify configuration saved to IoTMetadataDefinition table
- Check resource name matches exactly (case sensitive)
- Confirm value field is not empty (must contain DEE name)
Need to process another event?
doCommonLogic is a generic dispatcher — the same one described for ItemTransferIn/ItemTransferOut. The driver can also handle additional standard events that aren't wired to an MES workflow yet. See Controller Extensibility to connect any of them to doCommonLogic without further development.