flowserv.model.parameter.actor module

Declarations for parameters that represent actors (steps) in a workflow. The actual object instances that result from these actors are implementation dependent. For this reason, the values for actor parameters are represented as serialized dictionaries.

class flowserv.model.parameter.actor.Actor(name: str, index: Optional[int] = 0, label: Optional[str] = None, help: Optional[str] = None, default: Optional[str] = None, required: Optional[bool] = False, group: Optional[str] = None)

Bases: flowserv.model.parameter.base.Parameter

Workflow actor parameter type.

cast(value: flowserv.model.parameter.actor.ActorValue) flowserv.model.parameter.actor.ActorValue

Ensure that the given value is an instance of the actor value class flowserv.model.parameter.actor.ActorValue.

Serializations of workflow steps are implementation dependent. For this reason, the function does not further validate the contents of the serialized workglow step.

Raises an InvalidArgumentError if the argument value is not a dictionary.

Parameters

value (flowserv.model.parameter.actor.ActorValue) – Argument value for an actor parameter.

Return type

flowserv.model.parameter.actor.ActorValue

static from_dict(doc: Dict, validate: Optional[bool] = True) flowserv.model.parameter.actor.Actor

Get an actor parameter instance from a given dictionary serialization.

Parameters
  • doc (dict) – Dictionary serialization for string parameter delaration.

  • validate (bool, default=True) – Validate the serialized object if True.

Return type

flowserv.model.parameter.string.String

Raises

flowserv.error.InvalidParameterError

class flowserv.model.parameter.actor.ActorValue(spec: Dict, files: Optional[List[flowserv.model.parameter.files.IOValue]] = None)

Bases: object

Value for an flowserv.model.parameter.actor.Actor parameter. The value contains two main components: (i) the serialization of the workflow step that is used by the workflow engine to create an instance of a workflow step, and (ii) a list of additional input files and directories for the workflow step that will be copied to the workflow run directory.

files: Optional[List[flowserv.model.parameter.files.IOValue]] = None
spec: Dict