Class WorkflowRunner
java.lang.Object
com.scivicslab.workfloweditor.service.WorkflowRunner
Converts a matrix of rows into POJO-actor YAML and executes the workflow.
A single ActorSystem is shared across the entire application.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final recordstatic final record -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionParses POJO-actor YAML back into structured steps with description/label/note.Returns actor tree info for the ActorSystem.com.scivicslab.turingworkflow.workflow.IIActorSystembooleanisPaused()booleanvoidresume()static List<WorkflowRunner.StepDto> Converts flat MatrixRow list to structured steps (loses label/note).voidrun(String name, List<WorkflowResource.MatrixRow> rows, int maxIterations, Level logLevel, Consumer<WorkflowResource.WorkflowEvent> emitter) Runs a workflow from matrix rows.voidrunYaml(String yaml, int maxIterations, Level logLevel, Consumer<WorkflowResource.WorkflowEvent> emitter) Runs a workflow from raw YAML string.static List<WorkflowResource.MatrixRow> stepsToRows(List<WorkflowRunner.StepDto> steps) Converts structured steps to flat MatrixRow list for backward compatibility.voidstop()static StringtoYaml(String name, List<WorkflowResource.MatrixRow> rows) Converts matrix rows to POJO-actor YAML format.static StringtoYamlStructured(String name, String description, List<WorkflowRunner.StepDto> steps) Converts structured steps to YAML including description/label/note.
-
Constructor Details
-
WorkflowRunner
public WorkflowRunner()
-
-
Method Details
-
getSystem
public com.scivicslab.turingworkflow.workflow.IIActorSystem getSystem() -
isRunning
public boolean isRunning() -
stop
public void stop() -
resume
public void resume() -
isPaused
public boolean isPaused() -
getActorTree
Returns actor tree info for the ActorSystem. Each entry: { name, type, parent, children, actions } -
run
public void run(String name, List<WorkflowResource.MatrixRow> rows, int maxIterations, Level logLevel, Consumer<WorkflowResource.WorkflowEvent> emitter) Runs a workflow from matrix rows. -
runYaml
public void runYaml(String yaml, int maxIterations, Level logLevel, Consumer<WorkflowResource.WorkflowEvent> emitter) Runs a workflow from raw YAML string. -
toYaml
Converts matrix rows to POJO-actor YAML format. -
fromYaml
Parses POJO-actor YAML back into structured steps with description/label/note. -
toYamlStructured
public static String toYamlStructured(String name, String description, List<WorkflowRunner.StepDto> steps) Converts structured steps to YAML including description/label/note. -
stepsToRows
Converts structured steps to flat MatrixRow list for backward compatibility. -
rowsToSteps
Converts flat MatrixRow list to structured steps (loses label/note).
-