MCPcopy Index your code
hub / github.com/StackStorm/st2 / prep_wf_ex

Method prep_wf_ex

st2tests/st2tests/base.py:704–726  ·  view source on GitHub ↗
(self, wf_ex_db)

Source from the content-addressed store, hash-verified

702 return st2_ctx
703
704 def prep_wf_ex(self, wf_ex_db):
705 data = {
706 "spec": wf_ex_db.spec,
707 "graph": wf_ex_db.graph,
708 "input": wf_ex_db.input,
709 "context": wf_ex_db.context,
710 "state": wf_ex_db.state,
711 "output": wf_ex_db.output,
712 "errors": wf_ex_db.errors,
713 }
714
715 conductor = conducting.WorkflowConductor.deserialize(data)
716 conductor.request_workflow_status(wf_statuses.RUNNING)
717
718 for task in conductor.get_next_tasks():
719 ac_ex_event = events.ActionExecutionEvent(wf_statuses.RUNNING)
720 conductor.update_task_state(task["id"], task["route"], ac_ex_event)
721
722 wf_ex_db.status = conductor.get_workflow_status()
723 wf_ex_db.state = conductor.workflow_state.serialize()
724 wf_ex_db = wf_db_access.WorkflowExecution.update(wf_ex_db, publish=False)
725
726 return wf_ex_db
727
728 def get_task_ex(self, task_id, route):
729 task_ex_dbs = wf_db_access.TaskExecution.query(

Calls 3

deserializeMethod · 0.80
serializeMethod · 0.80
updateMethod · 0.45