Jump to: navigation, search

Difference between revisions of "TaskFlow/SaveAndRestore"

Line 8: Line 8:
 
3. Task state (executed, failed, etc).<br />
 
3. Task state (executed, failed, etc).<br />
 
4. Executed actions ids.<br />
 
4. Executed actions ids.<br />
5. Flow kwargs.<br />
+
5. Flow type id.<br />
6. Flow state.<br />
+
6. Flow kwargs.<br />
 +
7. Flow state.<br />
  
 
Restoring the flow:<br />
 
Restoring the flow:<br />
'''Flow can be created from the blocks template (as a new flow)'''. Then Flow state, kwargs and tasks data should be restored and set. Executed actions should be added to the proper collections. After the Flow can be resumed.
+
'''Flow can be created from the blocks template (as a new flow)'''. Flow id will help to choose the correct template. Then Flow state, kwargs and tasks data should be restored and set. Executed actions should be added to the proper collections. After the Flow can be resumed.

Revision as of 14:55, 6 August 2013

Save and restore task flow. Brief description.

Flow must be saved each time when 'on_task_finished' and 'on_task_reverted' events are happened.

What should be saved:
1. Task name (or other identifier, unique for each task).
2. Task data required to execute and revert.
3. Task state (executed, failed, etc).
4. Executed actions ids.
5. Flow type id.
6. Flow kwargs.
7. Flow state.

Restoring the flow:
Flow can be created from the blocks template (as a new flow). Flow id will help to choose the correct template. Then Flow state, kwargs and tasks data should be restored and set. Executed actions should be added to the proper collections. After the Flow can be resumed.