Workflow steps are the sequential set of tasks that your workflow performs. You can add any number of steps to your workflow.

Workflow Step Example

"steps":[
    {
      "stepId":"step1",
      "workflow":"RUN_SSH_COMMAND_IN_GUEST",
      "namespace": "nfv",
      "type":"decision",
      "description": "Step 1 - Run SSH Command",
      "inBinding":[
        {"name": "username", "type": "string", "exportName": "USER"},
        {"name": "password", "type": "password", "exportName": "PWD"},
        {"name": "port", "type": "number", "default": "22"},
        {"name": "cmd", "type": "string", "default": "sh /opt/service-start.sh"},
        {"name": "encoding", "type": "string", "default": ""},
        {"name": "hostNameOrIP", "type": "string", "exportName": "SYSTEM_IP"},
        {"name": "passwordAuthentication", "type": "boolean", "default": "true"}
      ],
      "outBinding": [
        {"name": "outputText", "type": "string", "exportName": "stringVar1"}
      ],
      "nextStep":"END"
    }
  ]

Workflow Step Schema

{
    "$schema": "http://json-schema.org/draft-07/schema",
    "$id": "http://example.com/example.json",
    "type": "object",
    "readOnly": false,
    "writeOnly": false,
    "minProperties": 0,
    "title": "The Root Schema",
    "description": "The root schema comprises the entire JSON document.",
    "additionalProperties": true,
    "required": [
        "stepId",
        "workflow",
        "namespace",
        "type",
        "inBinding",
        "outBinding",
        "nextStep",
        "stepNumber"
    ],
    "properties": {
        "stepId": {
            "$id": "#/properties/stepId",
            "type": "string",
            "readOnly": false,
            "writeOnly": false,
            "minLength": 0,
            "title": "The Stepid Schema",
            "description": "An explanation about the purpose of this instance.",
            "default": "",
            "examples": [
                "step1"
            ]
        },
        "workflow": {
            "$id": "#/properties/workflow",
            "type": "string",
            "readOnly": false,
            "writeOnly": false,
            "minLength": 0,
            "title": "The Workflow Schema",
            "description": "An explanation about the purpose of this instance.",
            "default": "",
            "examples": [
                "VRO_CUSTOM_WORKFLOW"
            ]
        },
        "namespace": {
            "$id": "#/properties/namespace",
            "type": "string",
            "readOnly": false,
            "writeOnly": false,
            "minLength": 0,
            "title": "The Namespace Schema",
            "description": "An explanation about the purpose of this instance.",
            "default": "",
            "examples": [
                "nfv"
            ]
        },
        "type": {
            "$id": "#/properties/type",
            "type": "string",
            "readOnly": false,
            "writeOnly": false,
            "minLength": 0,
            "title": "The Type Schema",
            "description": "An explanation about the purpose of this instance.",
            "default": "",
            "examples": [
                "task"
            ]
        },
        "description": {
            "$id": "#/properties/description",
            "type": "string",
            "readOnly": false,
            "writeOnly": false,
            "minLength": 0,
            "title": "The Description Schema",
            "description": "An explanation about the purpose of this instance.",
            "default": "",
            "examples": [
                "Basic"
            ]
        },
        "inBinding": {
            "$id": "#/properties/inBinding",
            "type": "array",
            "readOnly": false,
            "writeOnly": false,
            "uniqueItems": false,
            "minItems": 0,
            "minContains": 1,
            "title": "The Inbinding Schema",
            "description": "An explanation about the purpose of this instance.",
            "default": [],
            "additionalItems": true,
            "items": {
                "$id": "#/properties/inBinding/items",
                "type": "object",
                "readOnly": false,
                "writeOnly": false,
                "minProperties": 0,
                "title": "The Items Schema",
                "description": "An explanation about the purpose of this instance.",
                "default": {},
                "examples": [
                    {
                        "name": "username",
                        "type": "string",
                        "exportName": "USER"
                    },
                    {
                        "type": "string",
                        "name": "vroWorkflowName",
                        "default": "Run SSH command"
                    },
                    {
                        "type": "password",
                        "exportName": "PWD",
                        "name": "password"
                    },
                    {
                        "type": "number",
                        "name": "port",
                        "default": "22"
                    },
                    {
                        "name": "cmd",
                        "default": "sh /opt/vmware/return-string-pass.sh",
                        "type": "string"
                    },
                    {
                        "type": "string",
                        "name": "encoding",
                        "default": " "
                    },
                    {
                        "name": "hostNameOrIP",
                        "default": "10.144.164.91",
                        "type": "string"
                    },
                    {
                        "type": "boolean",
                        "name": "passwordAuthentication",
                        "default": "true"
                    }
                ],
                "additionalProperties": true,
                "required": [
                    "name",
                    "type",
                    "exportName"
                ],
                "properties": {
                    "name": {
                        "$id": "#/properties/inBinding/items/properties/name",
                        "type": "string",
                        "readOnly": false,
                        "writeOnly": false,
                        "minLength": 0,
                        "title": "The Name Schema",
                        "description": "An explanation about the purpose of this instance.",
                        "default": "",
                        "examples": [
                            "username"
                        ]
                    },
                    "type": {
                        "$id": "#/properties/inBinding/items/properties/type",
                        "type": "string",
                        "readOnly": false,
                        "writeOnly": false,
                        "minLength": 0,
                        "title": "The Type Schema",
                        "description": "An explanation about the purpose of this instance.",
                        "default": "",
                        "examples": [
                            "string"
                        ]
                    },
                    "exportName": {
                        "$id": "#/properties/inBinding/items/properties/exportName",
                        "type": "string",
                        "readOnly": false,
                        "writeOnly": false,
                        "minLength": 0,
                        "title": "The Exportname Schema",
                        "description": "An explanation about the purpose of this instance.",
                        "default": "",
                        "examples": [
                            "USER"
                        ]
                    }
                }
            }
        },
        "outBinding": {
            "$id": "#/properties/outBinding",
            "type": "array",
            "readOnly": false,
            "writeOnly": false,
            "uniqueItems": false,
            "minItems": 0,
            "minContains": 1,
            "title": "The Outbinding Schema",
            "description": "An explanation about the purpose of this instance.",
            "default": [],
            "additionalItems": true,
            "items": {
                "$id": "#/properties/outBinding/items",
                "type": "object",
                "readOnly": false,
                "writeOnly": false,
                "minProperties": 0,
                "title": "The Items Schema",
                "description": "An explanation about the purpose of this instance.",
                "default": {},
                "examples": [
                    {
                        "type": "string",
                        "exportName": "output",
                        "name": "outputText"
                    }
                ],
                "additionalProperties": true,
                "required": [
                    "name",
                    "type",
                    "exportName"
                ],
                "properties": {
                    "name": {
                        "$id": "#/properties/outBinding/items/properties/name",
                        "type": "string",
                        "readOnly": false,
                        "writeOnly": false,
                        "minLength": 0,
                        "title": "The Name Schema",
                        "description": "An explanation about the purpose of this instance.",
                        "default": "",
                        "examples": [
                            "outputText"
                        ]
                    },
                    "type": {
                        "$id": "#/properties/outBinding/items/properties/type",
                        "type": "string",
                        "readOnly": false,
                        "writeOnly": false,
                        "minLength": 0,
                        "title": "The Type Schema",
                        "description": "An explanation about the purpose of this instance.",
                        "default": "",
                        "examples": [
                            "string"
                        ]
                    },
                    "exportName": {
                        "$id": "#/properties/outBinding/items/properties/exportName",
                        "type": "string",
                        "readOnly": false,
                        "writeOnly": false,
                        "minLength": 0,
                        "title": "The Exportname Schema",
                        "description": "An explanation about the purpose of this instance.",
                        "default": "",
                        "examples": [
                            "output"
                        ]
                    }
                }
            }
        },
        "nextStep": {
            "$id": "#/properties/nextStep",
            "type": "string",
            "readOnly": false,
            "writeOnly": false,
            "minLength": 0,
            "title": "The Nextstep Schema",
            "description": "An explanation about the purpose of this instance.",
            "default": "",
            "examples": [
                "step2"
            ]
        },
        "stepNumber": {
            "$id": "#/properties/stepNumber",
            "type": "integer",
            "readOnly": false,
            "writeOnly": false,
            "title": "The Stepnumber Schema",
            "description": "An explanation about the purpose of this instance.",
            "default": 0,
            "examples": [
                1
            ]
        }
    }
}