Class Action
java.lang.Object
com.scivicslab.pojoactor.workflow.Action
Represents a single action in a workflow transition.
An action specifies which actor to invoke, which method to call, with what arguments, and how to execute it (direct call vs work-stealing pool).
The arguments field supports multiple formats:
- String: Single argument (wrapped in JSON array when passed to actor)
- List: Multiple arguments (converted to JSON array)
- Map: Structured data (converted to JSON object, not wrapped in array)
- Since:
- 2.8.0
- Author:
- devteam@scivics-lab.com
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetActor()Gets the actor name.Gets the arguments (String, List, or Map).Gets the execution mode.Gets the method name.intGets the pool index.voidSets the actor name.voidsetArguments(Object arguments) Sets the arguments (String, List, or Map).voidsetExecution(ExecutionMode execution) Sets the execution mode.voidSets the method name.voidsetPoolIndex(int poolIndex) Sets the pool index.
-
Constructor Details
-
Action
public Action()Constructs an empty Action. -
Action
Constructs an Action with specified parameters.- Parameters:
actor- the name of the actor to invokemethod- the method to callarguments- the arguments to pass (String, List, or Map)
-
-
Method Details
-
getActor
Gets the actor name.- Returns:
- the actor name
-
setActor
Sets the actor name.- Parameters:
actor- the actor name
-
getMethod
Gets the method name.- Returns:
- the method name
-
setMethod
Sets the method name.- Parameters:
method- the method name
-
getArguments
Gets the arguments (String, List, or Map).- Returns:
- the arguments, or null if not set
-
setArguments
Sets the arguments (String, List, or Map).- Parameters:
arguments- the arguments
-
getExecution
Gets the execution mode.- Returns:
- the execution mode
-
setExecution
Sets the execution mode.- Parameters:
execution- the execution mode
-
getPoolIndex
public int getPoolIndex()Gets the pool index.- Returns:
- the pool index
-
setPoolIndex
public void setPoolIndex(int poolIndex) Sets the pool index.- Parameters:
poolIndex- the pool index (0-based)
-