Labor approval workflow stuck in pending state after supervisor assignment

We’re experiencing an issue where labor entries submitted for approval remain stuck in pending state even after supervisor assignment. This started happening last week across multiple production lines. The workflow shows the supervisor has been notified, but the approval action doesn’t complete. We’ve checked the workflow state mapping in the configuration, and everything appears correct. The supervisor approval event seems to be triggering, but the state transition isn’t happening. I’ve reviewed the workflow engine logs and see entries being created, but no errors are logged. This is causing significant delays in our payroll processing as we can’t close out completed shifts. Has anyone encountered similar behavior with labor approval workflows in HM 2022.2? What should we check next?

Have you verified the workflow event subscriptions? In HM 2022.2, the supervisor approval event needs to be properly subscribed in the workflow configuration. Go to the Labor Management module configuration and check that the ApprovalCompleted event is mapped to the correct workflow transition. Also look at the event handler logs specifically, not just the general workflow logs. The event might be firing but not reaching the workflow engine due to a subscription mismatch.

I’ve seen this before. First thing to check is whether the supervisor user accounts have the correct roles assigned in the security configuration. Even if the workflow appears to assign them correctly, missing approval permissions at the user level will cause this exact symptom. Also verify that the workflow state mapping includes all required transition states between pending and approved.

I can see you’ve checked several areas already. Let me walk you through the complete resolution based on similar cases I’ve handled.

First, let’s address the workflow state mapping systematically. Navigate to Administration > Workflow Configuration > Labor Approval Workflow. Verify that your state transition map includes these exact mappings:

  • Submitted → Pending (automatic on entry creation)
  • Pending → AwaitingApproval (when supervisor assigned)
  • AwaitingApproval → Approved (on supervisor approval action)
  • AwaitingApproval → Rejected (on supervisor rejection)

The issue you’re describing typically occurs when the Pending → AwaitingApproval transition is missing or has an incorrect condition. Check that this transition has the condition ‘SupervisorAssigned = true’ and no additional blocking conditions.

For the supervisor approval event configuration, open the workflow definition XML and locate the approval step element. Ensure the event handler is correctly mapped:

  • Event type: LaborApprovalAction
  • Handler class: com.honeywell.mes.labor.ApprovalHandler
  • Transition trigger: OnApprovalComplete

If the handler class is custom or modified, that’s likely your problem. Revert to the standard handler and test.

Regarding the workflow engine logs, enable DEBUG level logging for the workflow engine specifically. Edit the logging configuration and set:

com.honeywell.mes.workflow.engine = DEBUG

Then reproduce the issue and look for these specific log patterns:

  • ‘State transition requested: Pending → AwaitingApproval’
  • ‘Evaluating transition conditions’
  • ‘Transition conditions met: true/false’
  • ‘State updated successfully’

If you see ‘Transition conditions met: false’, that tells you there’s a condition blocking the transition. Common culprits include:

  1. Custom validation rules that weren’t updated after the HM 2022.2 upgrade
  2. Missing required fields in the labor entry that the workflow expects
  3. Supervisor assignment not properly persisted to the database

Also verify in the database that when a supervisor is assigned, the SUPERVISOR_ID field in the LABOR_ENTRY table is actually populated. I’ve seen cases where the UI shows assignment but the database transaction didn’t commit.

Finally, check for any pending workflow migrations. After upgrading to HM 2022.2, there’s a workflow schema migration that needs to complete. Run this query to verify:

SELECT migration_status FROM workflow_migrations WHERE version = ‘2022.2’;

If it shows ‘PENDING’ or ‘FAILED’, you need to run the migration script manually. The workflow engine won’t process state transitions correctly until the migration completes.

Implement these checks in order and the approval workflow should start functioning correctly. The most common root cause is the missing AwaitingApproval intermediate state in the transition mapping.

Check your workflow engine configuration for timeout settings. In HM 2022.2, there’s a known issue where approval workflows can get stuck if the approval timeout is set too low and the supervisor doesn’t act immediately. The workflow might be timing out and reverting to pending instead of staying in awaiting approval state. Look at the workflow definition XML for the approval step timeout value. It should be at least 24 hours for labor approvals.

This sounds like a workflow engine cache issue. In our environment, we had similar symptoms where state transitions weren’t completing even though events were being processed. The workflow engine was reading stale state mapping from cache. Try restarting the workflow service or clearing the workflow cache. Also check if there are any custom workflow extensions that might be interfering with the standard approval process. Sometimes custom code can block state transitions without throwing errors.