Skip to content

Workflow definition example

jun-he edited this page Jul 24, 2024 · 2 revisions
{
  "properties_snapshot": {
    "workflow_id": "test_maestro_workflow_example",
    "create_time": 1719522178587,
    "author": "[email protected]",
    "owner": {
      "name": "testuser"
    },
    "run_strategy": {
      "rule": "PARALLEL",
      "workflow_concurrency": 10
    }
  },
  "metadata": {
    "workflow_id": "test_maestro_workflow_example",
    "workflow_version_id": 2,
    "create_time": 1719522178587,
    "version_author": "[email protected]"
  },
  "workflow": {
    "id": "test_maestro_workflow_example",
    "name": "Human friendly name",
    "description": "This is a test workflow to show as example",
    "tags": [
      {
        "name": "blog"
      },
      {
        "name": "example_workflow"
      }
    ],
    "timeout": 10000,
    "criticality": "LOW",
    "params": {
      "WorkflowTimeout": {
        "value": 10000,
        "type": "LONG"
      },
      "p1": {
        "value": "test_param",
        "type": "STRING"
      },
      "p2": {
        "value": "${p1}",
        "type": "STRING"
      },
      "p3": {
        "expression": "45 > 42",
        "type": "BOOLEAN"
      }
    },
    "steps": [
      {
        "step": {
          "id": "step_1",
          "transition": {},
          "type": "NoOp",
          "failure_mode": "IGNORE_FAILURE",
          "retry_policy": {
            "error_retry_limit": 3,
            "backoff": {
              "error_retry_backoff_in_secs": 900,
              "type": "EXPONENTIAL_BACKOFF"
            }
          },
          "tags": [],
          "params": {
            "step_param1": {
              "value": "bla",
              "type": "STRING"
            }
          }
        }
      },
      {
        "step": {
          "id": "step_2",
          "transition": {},
          "type": "NoOp",
          "tags": [],
          "params": {}
        }
      },
      {
        "subworkflow": {
          "id": "subworkflow_step",
          "transition": {
            "successors": {
              "foreach_step": "true"
            }
          },
          "tags": [],
          "params": {
            "subworkflow_id": {
              "value": "test_maestro_workflow_example_subworkflow",
              "type": "STRING"
            },
            "subworkflow_version": {
              "value": "active",
              "type": "STRING"
            }
          }
        }
      },
      {
        "foreach": {
          "id": "foreach_step",
          "transition": {},
          "tags": [],
          "params": {
            "loop_params": {
              "value": {
                "num": {
                  "expression": "Util.intsBetween(1, 3, 1);",
                  "type": "LONG_ARRAY"
                }
              },
              "type": "MAP"
            }
          },
          "steps": [
            {
              "step": {
                "id": "foreach_regular_leaf",
                "transition": {},
                "type": "NoOp",
                "tags": [],
                "params": {}
              }
            }
          ]
        }
      }
    ]
  },
  "is_active": true,
  "activate_time": 1719522178587,
  "activated_by": "[email protected]",
  "is_latest": true,
  "is_default": true,
  "internal_id": 524151,
  "modify_time": 1719522178591
}
Clone this wiki locally