I’m going to provide the complete solution based on what we’ve uncovered. Your issue stems from a combination of event-to-status mapping misconfiguration and workflow engine trigger evaluation logic.
Root Cause Analysis:
The workflow engine trigger isn’t firing because the batch completion event handling includes attribute conditions that aren’t being met. Specifically, the ‘validationStatus’ attribute in your event payload is preventing the trigger from evaluating to true.
Event-to-Status Mapping Fix:
First, verify your event mapping configuration includes all required attributes:
Event: BatchCompletionEvent
Required Attributes: batchId, completionTime, qualityStatus
Optional Attributes: validationStatus (should not block completion)
Status Transition: In Progress -> Completed
Workflow Engine Trigger Configuration:
- Open Workflow Designer and navigate to your work order workflow definition
- Select the transition from ‘In Progress’ to ‘Completed’ state
- Edit the trigger condition to handle the validationStatus attribute properly
- Modify the trigger expression to:
event.type == 'BatchCompletionEvent' AND
event.batchId == workOrder.currentBatchId AND
event.qualityStatus == 'PASSED' AND
(event.validationStatus IS NULL OR event.validationStatus != 'failed')
The key change is making validationStatus optional in the trigger logic. The condition now allows the transition if validationStatus is null OR if it’s anything except ‘failed’. The ‘pending_review’ value won’t block completion anymore.
Batch Completion Event Handling:
-
Check your batch class configuration: Administration > Production Management > Batch Classes
-
Select your batch class and go to Quality Management tab
-
If ‘Require Manual Validation’ is checked, either:
- Uncheck it if manual validation isn’t needed, OR
- Ensure the validation step has a timeout/auto-approve rule
-
Verify the event publisher configuration:
- Go to System Configuration > Event Publishing
- Find BatchCompletionEvent publisher
- Ensure ‘Publish on Quality Check Pass’ is enabled
- Verify ‘Wait for Validation’ is set to FALSE
Testing the Fix:
- After making these changes, restart the Workflow Engine service
- Create a test work order and batch
- Complete the batch and monitor Event Monitor for the BatchCompletionEvent
- Verify the event payload shows qualityStatus=‘PASSED’
- Confirm work order status transitions to ‘Completed’ within 30 seconds
Additional Considerations:
If you need to maintain the manual validation workflow but still want automatic status updates, create a separate workflow state called ‘Completed - Pending Validation’ that the batch completion event triggers, then have the validation approval event trigger the final ‘Completed’ state.
For FT MES 10.0 specifically, there’s a known issue where workflow trigger conditions don’t properly evaluate NULL attributes. Apply the latest cumulative update (CU 10.0.5 or higher) which includes a fix for this behavior.
The event-to-status mapping is working correctly - the issue is purely in how the workflow engine evaluates the trigger conditions against the event payload. By making the validationStatus attribute optional in your trigger logic, you allow the normal completion flow while still supporting scenarios where validation status is relevant.