Class MatrixCode
java.lang.Object
com.scivicslab.pojoactor.workflow.MatrixCode
Represents a matrix-based workflow definition.
A MatrixCode contains a name and a list of Transition objects that define
the workflow's state transitions and actions. Each transition in the matrix represents
a state change with associated actions to execute.
This class is designed to be populated from YAML or JSON workflow definitions using deserialization frameworks like SnakeYAML or Jackson.
- Author:
- devteam@scivicslab.com
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the description of this workflow.getName()Returns the name of this workflow.getSteps()Returns the workflow transitions (alias for YAML 'steps' key).Returns the workflow transitions.voidsetDescription(String description) Sets the description of this workflow.voidSets the name of this workflow.voidsetSteps(List<Transition> steps) Sets the workflow transitions (alias for YAML 'steps' key).voidsetTransitions(List<Transition> transitions) Sets the workflow transitions.
-
Constructor Details
-
MatrixCode
public MatrixCode()Constructs an empty MatrixCode.This no-argument constructor is required for deserialization.
-
-
Method Details
-
getName
Returns the name of this workflow.- Returns:
- the workflow name
-
setName
Sets the name of this workflow.- Parameters:
name- the workflow name
-
getDescription
Returns the description of this workflow.The description provides human-readable documentation about what the workflow does. It is optional and not used at runtime.
- Returns:
- the workflow description, or null if not set
-
setDescription
Sets the description of this workflow.- Parameters:
description- the workflow description
-
getTransitions
Returns the workflow transitions.- Returns:
- a list of
Transitionobjects representing the workflow transitions - Since:
- 2.12.0
-
setTransitions
Sets the workflow transitions.- Parameters:
transitions- a list ofTransitionobjects representing the workflow transitions- Since:
- 2.12.0
-
getSteps
Returns the workflow transitions (alias for YAML 'steps' key).- Returns:
- a list of
Transitionobjects - Since:
- 2.12.0
-
setSteps
Sets the workflow transitions (alias for YAML 'steps' key).- Parameters:
steps- a list ofTransitionobjects- Since:
- 2.12.0
-