Workflow hierarchy assignment has a lot of interdependent data that must be set up. If one of those is missing or is incorrect – the processor will just error out. Sometimes with very little information or confusing errors.
Below is an example of an error that is not very well written. It doesn’t tell you which record failed. Someone went into the effort of creating the labels correctly but did not use it properly.
Here are some common errors you would get while processing the workflow.
- “The hierarchy provider did not return any users.” – Next Position was not found.
- “Worker not found for position ID %1.” – No worker is attached to a position. Go to the worker and make sure they have a primary position. If no primary position exists, then the system will find the oldest position (one with the earliest start date). Also make sure the worker is an employee of the company to submit the workflow.
- “User not found” – User not found for the worker. Check the user relations.
- “User or job not found for position ID %1, worker %2, user %3. Verify that the position is assigned to a job.” – The position found does not have a job related to it.
Now here is a quick solution I put together to help you diagnose or test out your hierarchy. I wrote a job below for Expense lines but to change it to any other table is pretty straight forward. Fill in the missing information and run it. It will give you an infolog with the user id, worker id, position id, the reports to position id, their spending limit and approval limit.
The final result looks like this.