You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

65 lines
2.7 KiB

framework:
workflows:
task_lifecycle:
type: state_machine
audit_trail:
enabled: true
marking_store:
type: 'method'
property: 'status'
supports:
- App\Entity\Task
initial_marking: !php/const App\Entity\Task::STATUS_TODO
places:
!php/const App\Entity\Task::STATUS_TODO:
metadata:
title: 'À faire'
color: danger
locking: false
!php/const App\Entity\Task::STATUS_DOING:
metadata:
title: 'En cours'
color: warning
locking: true
!php/const App\Entity\Task::STATUS_DONE:
metadata:
title: 'Terminé'
color: success
locking: false
transitions:
!php/const App\Entity\Task::TRANSITION_START:
from: !php/const App\Entity\Task::STATUS_TODO
to: !php/const App\Entity\Task::STATUS_DOING
metadata:
title: 'Commencer la tâche'
short: 'Commencer'
route: 'app_task_start'
lock: true
unlock: false
!php/const App\Entity\Task::TRANSITION_FINISH:
from: !php/const App\Entity\Task::STATUS_DOING
to: !php/const App\Entity\Task::STATUS_DONE
metadata:
title: 'Terminer la tâche'
short: 'Terminer'
route: 'app_task_finish'
lock: false
unlock: true
!php/const App\Entity\Task::TRANSITION_CANCEL:
from: !php/const App\Entity\Task::STATUS_DOING
to: !php/const App\Entity\Task::STATUS_TODO
metadata:
title: 'Abandonner la tâche'
short: 'Abandonner'
route: 'app_task_cancel'
lock: false
unlock: true
!php/const App\Entity\Task::TRANSITION_RESET:
from: !php/const App\Entity\Task::STATUS_DONE
to: !php/const App\Entity\Task::STATUS_TODO
metadata:
title: 'Recommencer la tâche'
short: 'Recommencer'
route: 'app_task_reset'
lock: false
unlock: false