Workflow for doctype Issue

Hello Community,

Im having trouble with creating workflow for “issue” doctype.

The Szenario is like this:

There are 10 departments each one with headmanager.

An employee from Dpartement “A” want to apply a change to “X” but he needs permission from Headmanager “A” to aprove it, then can “X” be activated.

So each headmanager can approve for only his own department.

I do use webform issue fo this. The workflow i made is like this:

States ---------- Can only edit

Open --------------- —> All
Department A ------> Department A
Department B ------> Department B
Department C -----> Department C
Success A ----> Headmanager A
Success B ----> Headmanager B
Success C ----> Headmanager C

Transition Rules
State ---------- Action------ Nextstate----- Allowed
Department A → Approve → Success A → Headmanager A
Department B → Approve → Success B → Headmanager B
Department C → Approve → Success C → Headmanager C

In the webform i made some fields.
The “workflow-state” field must be changed be the employee:
For example if an employee from “department A” applied a change he must write in the field “workflow-state” the “state” name: Department A.
And thats how the transition rule must know where to start.

But the employee get an error while trying to change the worlflow-state in the webform from “Open” to “Department A”
The error is like: Workflow State transition not allowed from “x” to “y”

I hope you understand me and can help me with it.