Comprehensive solution for event subscription, workflow handler config, and event log debugging:
1. Event Subscription Verification
First, identify the correct event type for workflow status changes:
// Pseudocode - Event type discovery:
1. Query TC event registry: SELECT * FROM event_types WHERE name LIKE '%workflow%status%'
2. Identify exact event name (e.g., 'TCComponentWorkflowStatusChangeEvent')
3. Verify your subscription matches this exact name (case-sensitive)
4. Check event payload structure to understand available properties
5. Validate subscription is active: SELECT * FROM subscriptions WHERE handler_class = 'YourHandler'
// See: TC Event Management Guide Section 7.1
2. Workflow Handler Config Corrections
Update your handler configuration XML:
<subscription>
<event-type>TCComponentWorkflowStatusChangeEvent</event-type>
<handler-class>com.company.CustomWorkflowHandler</handler-class>
<priority>100</priority>
<filter-expression>event.newStatus == 'Released'</filter-expression>
</subscription>
Key configuration elements:
- Event Type: Use exact internal name from TC event registry
- Priority: Higher values execute first (system handlers typically use 50)
- Filter Expression: Defines when handler should execute
- Transaction Scope: Specify REQUIRED or REQUIRES_NEW based on your operations
3. Handler Implementation Checklist
Ensure your handler implements the correct interface:
public class CustomWorkflowHandler implements EventHandler {
@Override
public void handleEvent(Event event) throws Exception {
// Log entry point
// Extract event properties
// Execute business logic
}
}
4. Event Log Debugging Strategy
Enable comprehensive logging to diagnose the automation gap:
Server-Side Logging:
- Enable DEBUG level for event framework: `log4j.logger.com.teamcenter.event=DEBUG
- Add handler entry/exit logging
- Log filter evaluation results
- Capture event payload details
Diagnostic Queries:
// Pseudocode - Subscription diagnostics:
1. Verify handler deployment: Check JAR in TC_ROOT/lib or custom_lib
2. Confirm class loading: Review server startup logs for handler registration
3. Check subscription status: Query active_subscriptions view
4. Validate filter syntax: Test filter expression in isolation
5. Review event history: Query event_log for recent workflow status changes
5. Common Issues and Resolutions
Issue: Event Type Mismatch
- Symptom: Event fires but handler never executes
- Solution: Use exact event type from TC registry
- Verification: Enable event framework DEBUG logging
Issue: Filter Expression Failure
- Symptom: Handler registered but skipped
- Solution: Validate filter syntax and property names
- Debug: Log filter evaluation in handler code
Issue: Transaction Conflicts
- Symptom: Handler executes but operations fail silently
- Solution: Configure transaction scope in subscription
- Fix: Use REQUIRES_NEW for independent transactions
Issue: Class Loading Problems
- Symptom: Handler not found despite deployment
- Solution: Verify JAR location and classpath
- Check: Server restart required after deployment
Issue: Priority Conflicts
- Symptom: System handler executes instead of custom handler
- Solution: Set priority > 50 to override system handlers
- Verify: Check handler execution order in event logs
6. Complete Diagnostic Procedure
// Pseudocode - Systematic debugging:
1. Enable verbose event logging (DEBUG level)
2. Trigger status change manually
3. Review server logs for:
- Event publication confirmation
- Subscription matching process
- Filter evaluation results
- Handler invocation attempts
- Any exception stacktraces
4. If handler not invoked:
- Verify event type matches subscription
- Check filter expression syntax
- Confirm handler class is loadable
- Validate subscription is active
5. If handler invoked but fails:
- Add detailed logging to handler code
- Check transaction scope configuration
- Review exception handling
6. Document findings and update configuration
7. Testing and Validation
Create a systematic test approach:
Unit Test Handler:
- Mock event objects with test data
- Verify filter logic independently
- Test business logic with various scenarios
Integration Test:
- Deploy to test environment
- Trigger actual workflow status changes
- Verify handler execution via logs
- Confirm expected side effects (notifications, updates)
Production Deployment:
- Deploy during maintenance window
- Monitor first few executions closely
- Keep rollback plan ready
- Document any unexpected behaviors
8. Handler Registration Script
For TC 12.3, ensure proper registration:
EventSubscriptionService.registerHandler(
"TCComponentWorkflowStatusChangeEvent",
CustomWorkflowHandler.class,
100,
"event.newStatus == 'Released'"
);
This comprehensive approach resolves workflow handler triggering issues in TC 12.3. The systematic event subscription verification, proper workflow handler config, and thorough event log debugging identify the root cause of the automation gap. In most cases, the issue is event type mismatch or filter expression problems, both easily corrected once identified. After applying these fixes, workflow handlers trigger reliably on status changes, enabling automated notifications and updates as designed.
This draft is based on general Teamcenter knowledge. It has not been verified against your specific version and environment. Practitioners: verify the steps and share your experience below.