Closed Jr0ussy closed 4 years ago
Hi,
The code I have right now is if any conditions fail, it will go to Rollbacked, but I want that is if the first fail to go to Invalid, how can I do that?
Here the code:
self.machine.add_transition(trigger='deployment', source='Valid', dest='Deployed', conditions=['validate_before', 'run_deployment', 'validate_after'], after='audit') self.machine.add_transition(trigger='deployment', source='Valid', dest='Rollbacked', conditions=['run_rollback', 'validate_rollback'], after='audit') self.machine.add_transition(trigger='deployment', source='Valid', dest='Rollback_failed', after='audit')
I found myself how to do it.
Hi,
The code I have right now is if any conditions fail, it will go to Rollbacked, but I want that is if the first fail to go to Invalid, how can I do that?
Here the code:
self.machine.add_transition(trigger='deployment', source='Valid', dest='Deployed', conditions=['validate_before', 'run_deployment', 'validate_after'], after='audit') self.machine.add_transition(trigger='deployment', source='Valid', dest='Rollbacked', conditions=['run_rollback', 'validate_rollback'], after='audit') self.machine.add_transition(trigger='deployment', source='Valid', dest='Rollback_failed', after='audit')