Here’s the comprehensive solution for your stuck cost management workflow:
1. Workflow Participant Mapping Issue:
The root cause is how your approval step resolves participants. When cost rollup completes, it triggers the workflow in a system context. If your workflow template uses dynamic role resolution like this:
Role: Cost Controller
Context: Organization of Cost Object
This fails because the system service running the rollup doesn’t have organizational context, so the role resolution returns empty.
Solution: Change your approval step participant configuration to use static group reference:
- Open your cost workflow template in Workflow Template Administrator
- Edit the ‘Cost Approval’ activity
- Change participant assignment from ‘Role’ to ‘Group’
- Select the ‘Cost_Controllers’ group directly instead of using role-based resolution
- Save and publish the updated template
2. Approval Step Configuration Fix:
For automated workflows, you need to ensure participant resolution happens correctly:
- Avoid using context-dependent expressions like ‘creator.manager’ or ‘object.organization.role’
- Use absolute group references: cn=Cost_Controllers,ou=Groups,dc=company,dc=com
- Alternatively, use a workflow variable that’s set earlier in the process when user context is available
3. Manual Task Reassignment for Current Stuck Task:
To fix the already-stuck task:
- Log in as Windchill Administrator
- Go to Site > Utilities > Workflow Administrator
- Find your stuck workflow instance
- Select the ‘Cost Approval’ activity
- Click ‘Reassign’ and manually select users from the Cost_Controllers group
- If reassign is still disabled, you may need to use the ‘Complete Activity’ option (requires admin privileges) and then restart the approval step
Alternatively, use the workflow command-line utility:
windchill wt.workflow.engine.WfEngineHelper -reassignActivity \
-workflowId <workflow_oid> -activityId <activity_oid> \
-newParticipant "cn=Cost_Controllers,ou=Groups,dc=company,dc=com"
Prevention for Future Workflows:
The key is understanding that cost rollup is a scheduled background job running as a service account. Any workflow it triggers must use participant assignment methods that don’t depend on user session context. Static group references work reliably, while dynamic role resolution based on organizational hierarchy or object relationships often fails in automated contexts.
Update your workflow template to use static group assignment, republish it, and test by triggering a new cost rollup. The approval task should now be correctly assigned to all members of the Cost_Controllers group.
This draft is based on general Windchill knowledge. It has not been verified against your specific version and environment. Practitioners: verify the steps and share your experience below.