WorkUnitManagement development
- improve of the state machine

Signed-off-by: Claudio Bisegni <Claudio.Bisegni@lnf.infn.it>