Skip to main content

A library for executing workflow nodes based on Actfile configuration

Project description

I. Control Flow Nodes (Controlling the execution path)

If: (As implemented) Conditionally executes different paths based on a boolean comparison.

Switch: Multi-way branching based on the value of an input (like a case statement). Takes an input value and routes to different outputs based on matching cases, plus a default path.

ForEach (Item): Iterates over a list input, executing a sub-path for each item in the list. Outputs the results from each iteration.

ForEach (Index): Similar to ForEach (Item), but also provides the current index to the sub-path.

While Loop: Executes a sub-path repeatedly while a specified condition (checked at the start) remains true. Requires careful design to avoid infinite loops.

Do While Loop: Executes a sub-path once, and then repeatedly while a specified condition (checked at the end) remains true.

Merge: Waits for one of multiple incoming paths to complete and then continues the flow. Useful after an If/Switch.

Join (Wait All): Waits for all of multiple incoming paths (e.g., from a parallel execution) to complete before continuing. Often outputs combined results.

Fork (Parallel): Executes multiple downstream paths concurrently. Often paired with a Join node later.

Delay: Pauses the workflow execution for a specified duration (e.g., seconds, milliseconds).

Terminate Workflow: Explicitly stops the workflow execution, optionally setting a final status (success/failure) and message/output.

Sub-Workflow / Call Workflow: Executes another defined Actfile workflow, potentially passing inputs and receiving outputs.

Try/Catch: Defines a block of nodes to execute. If an error occurs within the 'try' path, execution jumps to a 'catch' path, providing error details. A 'finally' path could also be added.

Rate Limit: Limits the execution frequency of a downstream path (e.g., max 5 times per second).

II. Data Manipulation Nodes (Transforming and managing data)

Set Variable: (As implemented) Explicitly stores a value (static or from input/placeholders) under a specific key name in its result, making it easily accessible later.

Get Variable: (Could be implicit via placeholders, but explicit might be useful) Retrieves a value previously stored by a Set Variable node or from the initial input. Often redundant if placeholder resolution is robust.

Delete Variable: Removes a variable from the context (less common, might complicate state).

Transform (JSONata): Transforms input data (usually JSON/dict) using the powerful JSONata query and transformation language.

Template: Renders a string using a templating engine (like Jinja2) and input data, useful for creating dynamic messages, code snippets, or configurations.

Merge Dictionaries: Combines two or more input dictionaries into one. Needs options for handling duplicate keys (overwrite, error, ignore).

Merge Lists: Concatenates two or more input lists into one.

Append To List: Adds one or more items to an existing list.

Get List Item: Retrieves an item from a list by its index (e.g., 0, -1).

Get List Slice: Extracts a sub-section of a list based on start/end indices.

List Length: Returns the number of items in a list.

Split String: Splits a string into a list based on a delimiter.

Join List: Joins items of a list into a single string using a specified separator.

Select Path (JSONPath): Extracts specific data from a JSON object/dict using a JSONPath expression.

Parse JSON: Converts a JSON string input into a structured object/dictionary or list.

Stringify JSON: Converts a structured object/dictionary or list into a JSON string representation.

Format Date/Time: Formats a date/time input (e.g., ISO string, timestamp) into a specified string format.

Format Number: Formats a number input (e.g., adding commas, setting decimal places).

Convert Type: Explicitly converts a value from one basic type to another (e.g., string to integer, integer to boolean). Needs error handling for invalid conversions.

Regex Extract: Extracts parts of a string that match a regular expression pattern (using capture groups).

Regex Match: Checks if an input string fully matches a regular expression pattern (returns boolean).

Create Dictionary: Creates a new dictionary object from specified key-value pairs.

Get Dictionary Value: Retrieves the value associated with a specific key in a dictionary. Handles missing keys gracefully (e.g., return null or default).

Set Dictionary Value: Adds or updates a key-value pair within an existing dictionary.

III. Utility Nodes (General purpose helpers)

Log Message: (As implemented) Logs a message to the system logs at a specified level.

Comment / No-Op: Does nothing functionally but allows adding documentation or breakpoints directly within the workflow graph.

Generate Error: Intentionally throws an error with a specified message. Useful for testing error handling paths (Try/Catch).

Timestamp: Outputs the current date/time in a specified format (e.g., ISO 8601, Unix timestamp).

Basic Math: Performs simple arithmetic operations (+, -, *, /, %, power) on numeric inputs.

String Operation: Performs common string manipulations (upper, lower, trim, length, substring, replace).

Random Number: Generates a random number within a specified range.

Random String: Generates a random string of a specified length and character set.

Generate UUID: Generates a universally unique identifier (UUID).

Hash Data: Computes a hash (e.g., MD5, SHA-256) of an input string or data.

Validate Schema: Validates input data against a provided JSON Schema definition. Returns boolean or throws error on failure.

Get Data Type: Returns the data type of an input value as a string (e.g., "string", "number", "list", "object", "boolean", "null").

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

act_workflow-4.8.363.tar.gz (166.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

act_workflow-4.8.363-py3-none-any.whl (181.6 kB view details)

Uploaded Python 3

File details

Details for the file act_workflow-4.8.363.tar.gz.

File metadata

  • Download URL: act_workflow-4.8.363.tar.gz
  • Upload date:
  • Size: 166.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for act_workflow-4.8.363.tar.gz
Algorithm Hash digest
SHA256 a7c48b9adcd8ed1a714c81107d1f36bb3d85ba643aa4be544256244005402597
MD5 632c8b75192fefaacbc5afea88074186
BLAKE2b-256 95d1db0e66067a0f6b3868b6a3445610815ca36158a05c55ddede5442e171602

See more details on using hashes here.

File details

Details for the file act_workflow-4.8.363-py3-none-any.whl.

File metadata

  • Download URL: act_workflow-4.8.363-py3-none-any.whl
  • Upload date:
  • Size: 181.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for act_workflow-4.8.363-py3-none-any.whl
Algorithm Hash digest
SHA256 b503f13ecff4bc5cd49a84cd1655c2c869732d6192dfc57413a26f52c8abba86
MD5 1fcd5af5a6fcea83225567dab218cd5a
BLAKE2b-256 7a52dc6c81dde7abd9fd8942a42356601b2e6a03372f8bf1f9349b4946ba5bb1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page