Class Action

java.lang.Object
com.scivicslab.pojoactor.workflow.Action

public class Action extends Object
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 managed thread 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@scivicslab.com
  • Constructor Details

    • Action

      public Action()
      Constructs an empty Action.
    • Action

      public Action(String actor, String method, Object arguments)
      Constructs an Action with specified parameters.
      Parameters:
      actor - the name of the actor to invoke
      method - the method to call
      arguments - the arguments to pass (String, List, or Map)
  • Method Details

    • getActor

      public String getActor()
      Gets the actor name.
      Returns:
      the actor name
    • setActor

      public void setActor(String actor)
      Sets the actor name.
      Parameters:
      actor - the actor name
    • getMethod

      public String getMethod()
      Gets the method name.
      Returns:
      the method name
    • setMethod

      public void setMethod(String method)
      Sets the method name.
      Parameters:
      method - the method name
    • getArguments

      public Object getArguments()
      Gets the arguments (String, List, or Map).
      Returns:
      the arguments, or null if not set
    • setArguments

      public void setArguments(Object arguments)
      Sets the arguments (String, List, or Map).
      Parameters:
      arguments - the arguments
    • getExecution

      public ExecutionMode getExecution()
      Gets the execution mode.
      Returns:
      the execution mode
    • setExecution

      public void setExecution(ExecutionMode execution)
      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)