Stopped returning outputs for registerProcess
This commit is contained in:
@@ -18,37 +18,30 @@ def buildOperation(definition, outputs):
|
|||||||
from core.execution.executioncontract import executeContract
|
from core.execution.executioncontract import executeContract
|
||||||
|
|
||||||
actions = definition.actions
|
actions = definition.actions
|
||||||
outputs = registerProcess(definition, outputs)
|
registerProcess(definition, outputs)
|
||||||
responses = []
|
responses = []
|
||||||
|
|
||||||
if getattr(definition, "track", False):
|
if getattr(definition, "track", False):
|
||||||
actions = track(
|
actions = track(
|
||||||
actions,
|
actions,
|
||||||
#description=definition.name
|
|
||||||
description=f"[green]{definition.name}[/green]",
|
description=f"[green]{definition.name}[/green]",
|
||||||
console=console
|
console=console
|
||||||
)
|
)
|
||||||
|
|
||||||
for action in actions:
|
for action in actions:
|
||||||
|
|
||||||
#Check if dependencies are in stop signal registry
|
|
||||||
stop = checkDependency(action, outputs, definition)
|
stop = checkDependency(action, outputs, definition)
|
||||||
|
|
||||||
if stop:
|
if stop:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
#Register action before its execution
|
|
||||||
if action.kind == "action":
|
if action.kind == "action":
|
||||||
outputs["processes"][definition.name][action.name] = {}
|
outputs["processes"][definition.name][action.name] = {}
|
||||||
|
|
||||||
#Pass the definition through to the action so it can be passed into buildPreRuntimeAttr
|
|
||||||
#Definition should be passed through in order to give access to addStopSignal so it can write directly to the definition during buildPreRuntimeAttr
|
|
||||||
#Stop signal can optionally be engaged by doing addStopSignal inside the action definition
|
|
||||||
outputs, response = executeContract(action, outputs, definition)
|
outputs, response = executeContract(action, outputs, definition)
|
||||||
|
|
||||||
responses.append(response)
|
responses.append(response)
|
||||||
|
|
||||||
#Register responses in process registry
|
|
||||||
if action.kind == "action":
|
if action.kind == "action":
|
||||||
outputs["processes"][definition.name][action.name]["response"] = response
|
outputs["processes"][definition.name][action.name]["response"] = response
|
||||||
|
|
||||||
|
|||||||
@@ -9,4 +9,4 @@ def registerProcess(module, outputs):
|
|||||||
outputs["processes"][module.name]["stopsignals"] = []
|
outputs["processes"][module.name]["stopsignals"] = []
|
||||||
outputs["processes"][module.name]["completed"] = []
|
outputs["processes"][module.name]["completed"] = []
|
||||||
|
|
||||||
return outputs
|
return
|
||||||
@@ -19,7 +19,7 @@ def buildRecursive(definition, outputs):
|
|||||||
logging.debug(f"No items available in {source} for {definition.name}")
|
logging.debug(f"No items available in {source} for {definition.name}")
|
||||||
return outputs, []
|
return outputs, []
|
||||||
|
|
||||||
outputs = registerProcess(definition, outputs)
|
registerProcess(definition, outputs)
|
||||||
|
|
||||||
responses = []
|
responses = []
|
||||||
from core.execution.executioncontract import executeContract
|
from core.execution.executioncontract import executeContract
|
||||||
|
|||||||
Reference in New Issue
Block a user