I’ve debugged this exact workflow-not-advancing scenario with simulation data workflows in tc-12.3 multiple times. The issue spans all three areas you’ve identified and requires a comprehensive fix.
Workflow Engine Event Handling:
First, verify that your workflow-engine is properly configured to handle simulation dataset events. Check the event processing configuration:
wt.workflow.eventProcessing.enabled=true
wt.workflow.eventProcessing.simulationEvents=true
Simulation Run Event Detection:
The core issue is usually that simulation-run completion doesn’t generate the event the workflow expects. Verify what event is actually being fired:
// Check audit log for simulation dataset
AuditRecord[] records = AuditHelper.service.getAuditRecords(dataset);
// Look for event type when results uploaded
In tc-12.3, simulation dataset attachment fires a “DatasetModified” event, not a “SimulationComplete” event. Your workflow’s event-mapping might be listening for the wrong event type.
Event Mapping Configuration:
Update your workflow template’s event handler for the Await_Simulation_Results task:
// Pseudocode - Correct event mapping setup:
1. Define event handler for Await_Simulation_Results task
2. Set event type to DatasetModified (not SimulationComplete)
3. Add filter condition: dataset.type equals "SimulationResults"
4. Add validation: dataset.attachments.count > 0
5. Configure transition action to advance to Engineering_Review task
// See TC Workflow Designer Guide Section 5.7
Critical Fix - Event Handler Implementation:
The Await_Simulation_Results task needs a properly configured signal event handler:
<SignalEventHandler>
<EventType>DatasetModified</EventType>
<EventFilter>
<AttributeFilter name="type" value="SimulationResults"/>
</EventFilter>
</SignalEventHandler>
Completion Criteria:
Add explicit completion criteria to your waiting task. The workflow should check:
- Dataset has attached files
- Dataset status is “Complete”
- Required metadata fields are populated
Implement this in your workflow template’s transition condition:
Dataset ds = (Dataset) workItem.getAttachment("simulation_results");
if (ds.getStatus().equals("Complete") && ds.getFileCount() > 0)
return true;
Event Subscription Priority:
Ensure your workflow’s event subscription has appropriate priority:
EventSubscription sub = // get workflow subscription
sub.setPriority(EventSubscription.PRIORITY_HIGH);
PersistenceHelper.manager.modify(sub);
Lower priority subscriptions might be consumed by other handlers before reaching your workflow.
Alternative Approach - Polling:
If event-based triggering remains unreliable, implement a polling mechanism:
<TimerEvent interval="300000"> <!-- 5 minutes -->
<CheckCondition>
// Check if simulation results exist and are complete
</CheckCondition>
</TimerEvent>
This ensures the workflow advances even if events are missed.
Testing Procedure:
- Enable workflow and event debug logging
- Upload simulation results to a test workflow instance
- Monitor MethodServer logs for DatasetModified event
- Verify workflow event handler receives the event
- Check that transition conditions evaluate correctly
- Confirm workflow advances to Engineering_Review task
Additional TC-12.3 Consideration:
There’s a timing issue where dataset events fire before file attachments are fully committed. Add a small delay or validation check:
// In your event handler
Thread.sleep(5000); // Wait for file commit
// Then check dataset.getFileCount()
After implementing these changes, redeploy your workflow template and test with a new simulation run. The workflow should now properly detect simulation-run completion and advance automatically, resolving your blocks-review issue.