WorkflowDefinition class
Beep.Skia.Model — class
Represents the definition of a workflow including its nodes, connections, and metadata. This class provides the blueprint for executing automation workflows.
Members
| Member | Kind | Description |
|---|---|---|
WorkflowDefinition(string id, string name) | Method | Initializes a new instance of the WorkflowDefinition class. The unique identifier for the workflow. The display name of the workflow. |
string Id | Property | Gets the unique identifier for the workflow. |
string Name | Property | Gets or sets the display name of the workflow. |
string Description | Property | Gets or sets the description of what this workflow does. |
string Version | Property | Gets or sets the version of this workflow definition. |
DateTime CreatedDate | Property | Gets the date when this workflow was created. |
DateTime? LastModifiedDate | Property | Gets or sets the date when this workflow was last modified. |
string Author | Property | Gets or sets the author of this workflow. |
List<string> Tags | Property | Gets or sets the category or tags for organizing workflows. |
bool IsEnabled | Property | Gets or sets a value indicating whether this workflow is enabled for execution. |
IList<NodeDefinition> Nodes | Property | Gets the collection of nodes in this workflow. |
IList<ConnectionDefinition> Connections | Property | Gets the collection of connections between nodes in this workflow. |
IList<WorkflowVariable> Variables | Property | Gets the collection of workflow variables. |
IList<TriggerDefinition> Triggers | Property | Gets the collection of triggers that can start this workflow. |
Dictionary<string, object> Configuration | Property | Gets or sets the global configuration for this workflow. |
Dictionary<string, object> Metadata | Property | Gets or sets additional metadata about this workflow. |
TimeSpan? MaxExecutionTime | Property | Gets or sets the maximum execution timeout for this workflow. |
ExecutionPriority Priority | Property | Gets or sets the execution priority for this workflow. |
void AddNode(NodeDefinition node) | Method | Adds a node to the workflow. The node definition to add. |
bool RemoveNode(string nodeId) | Method | Removes a node from the workflow and all its connections. The ID of the node to remove. True if the node was removed, false if it was not found. |
void AddConnection(ConnectionDefinition connection) | Method | Adds a connection between two nodes. The connection definition to add. |
bool RemoveConnection(string connectionId) | Method | Removes a connection from the workflow. The ID of the connection to remove. True if the connection was removed, false if it was not found. |
IEnumerable<NodeDefinition> GetStartingNodes() | Method | Gets all nodes that should execute first (nodes with no incoming connections or trigger nodes). Collection of starting node definitions. |
IEnumerable<NodeDefinition> GetSourceNodes(string nodeId) | Method | Gets all nodes that connect to the specified node as input. The ID of the target node. Collection of source node definitions. |
IEnumerable<NodeDefinition> GetTargetNodes(string nodeId) | Method | Gets all nodes that connect from the specified node as output. The ID of the source node. Collection of target node definitions. |
ValidationResult Validate() | Method | Validates the workflow definition for correctness and completeness. A validation result indicating any issues found. |
WorkflowDefinition Clone(string newId = null, string newName = null) | Method | Creates a deep copy of this workflow definition. Optional new ID for the copied workflow. Optional new name for the copied workflow. A new WorkflowDefinition instance that is a copy of this one. |