workflows.services.wizard¶

Utilities to transform wizard input into a workflow definition schema.

This module exposes a single helper to convert simple wizard-provided lists of events and steps into the internal workflow-definition JSON structure.

Functions¶

transform_to_definition_schema(events, steps)

Convert wizard input into an internal workflow-definition schema.

Module Contents¶

workflows.services.wizard.transform_to_definition_schema(events, steps)[source]¶

Convert wizard input into an internal workflow-definition schema.

Parameters:
  • events (list[dict[str, str]]) – List of event descriptors, each containing protocol and operation.

  • steps (list[dict[str, Any]]) – Ordered list of step descriptors, each with type and parameters.

Returns:

Workflow definition containing:
  • ”events”: the input events.

  • ”steps”: steps with generated IDs (“step-1”, “step-2”, …).

  • ”transitions”: linear transitions linking steps on the “next” signal.

Return type:

dict[str, Any]