{
  "name": "ServiceNow Schedule Automation Catalog Item At Start Date - Schedule Automation Catalog Item",
  "tasks": {
    "1082": {
      "name": "merge",
      "canvasName": "merge",
      "summary": "Automation Catalog workflow ID and data",
      "description": "Automation Catalog workflow ID and data",
      "location": "Application",
      "locationType": null,
      "app": "WorkFlowEngine",
      "type": "operation",
      "displayName": "WorkFlowEngine",
      "variables": {
        "incoming": {
          "data_to_merge": [
            {
              "key": "workflowId",
              "value": {
                "task": "job",
                "variable": "workflowId",
                "editable": true
              }
            },
            {
              "key": "description",
              "value": {
                "task": "job",
                "variable": "description"
              }
            },
            {
              "key": "formData",
              "value": {
                "task": "8535",
                "variable": "object"
              }
            },
            {
              "key": "formId",
              "value": {
                "task": "job",
                "variable": "formId",
                "editable": true
              }
            },
            {
              "key": "gbac",
              "value": {
                "task": "static",
                "variable": {
                  "write": [],
                  "read": []
                }
              }
            },
            {
              "key": "initiator",
              "value": {
                "task": "job",
                "variable": "initiator"
              }
            }
          ]
        },
        "outgoing": {
          "merged_object": null
        }
      },
      "deprecated": false,
      "matched": [
        {
          "key": "canvasName",
          "highlightString": "<span class='highlight-string'>merge</span>"
        },
        {
          "key": "summary",
          "highlightString": "<span class='highlight-string'>Merge</span> Data"
        },
        {
          "key": "description",
          "highlightString": "<span class='highlight-string'>Merge</span> data into a single object"
        }
      ],
      "groups": [],
      "x": 0.6385826771653543,
      "y": 0.5130674002751031
    },
    "6810": {
      "name": "newVariable",
      "canvasName": "newVariable",
      "summary": "Create a Job Variable",
      "description": "Create a new Job variable by Job ID and assign it a value.",
      "location": "Application",
      "locationType": null,
      "app": "WorkFlowEngine",
      "type": "operation",
      "displayName": "WorkFlowEngine",
      "variables": {
        "incoming": {
          "name": "taskError",
          "value": ""
        },
        "outgoing": {
          "value": null
        }
      },
      "deprecated": false,
      "matched": [
        {
          "key": "canvasName",
          "highlightString": "new<span class='highlight-string'>Variable</span>"
        },
        {
          "key": "summary",
          "highlightString": "Create a Job <span class='highlight-string'>Variable</span>"
        },
        {
          "key": "description",
          "highlightString": "Create a new Job <span class='highlight-string'>variable</span> by Job ID and assign it a value."
        }
      ],
      "groups": [],
      "x": 0.09685039370078741,
      "y": 0.49793672627235214
    },
    "8535": {
      "name": "setObjectKey",
      "canvasName": "setObjectKey",
      "summary": "Add automationCatalogId to formData",
      "description": "Add automationCatalogId to formData",
      "location": "Application",
      "locationType": null,
      "app": "WorkFlowEngine",
      "type": "automatic",
      "displayName": "Object",
      "variables": {
        "incoming": {
          "obj": "$var.job.formData",
          "path": [
            "automationCatalogId"
          ],
          "value": "$var.c179.return_data"
        },
        "outgoing": {
          "object": null
        },
        "error": "$var.job.taskError"
      },
      "deprecated": false,
      "matched": [
        {
          "key": "canvasName",
          "highlightString": "<span class='highlight-string'>setObjec</span>tKey"
        }
      ],
      "groups": [],
      "actor": "Pronghorn",
      "x": 0.5362204724409448,
      "y": 0.5048143053645117,
      "scheduled": false
    },
    "9845": {
      "name": "stub",
      "canvasName": "stub",
      "summary": "Failed to query Automation Catalog ID",
      "description": "Failed to query Automation Catalog ID",
      "location": "Application",
      "locationType": null,
      "app": "WorkFlowEngine",
      "type": "automatic",
      "displayName": "Tools",
      "variables": {
        "incoming": {
          "type": "error",
          "delay": "",
          "response": "Failed to query Automation Catalog ID"
        },
        "outgoing": {
          "response": null
        },
        "error": "$var.job.taskError"
      },
      "deprecated": false,
      "matched": [
        {
          "key": "canvasName",
          "highlightString": "<span class='highlight-string'>stub</span>"
        },
        {
          "key": "summary",
          "highlightString": "<span class='highlight-string'>Stub</span>"
        },
        {
          "key": "description",
          "highlightString": "Create a <span class='highlight-string'>stub</span> for an automated task"
        }
      ],
      "groups": [],
      "actor": "Pronghorn",
      "x": 0.42440944881889764,
      "y": 0.6918844566712518,
      "scheduled": false
    },
    "workflow_start": {
      "name": "workflow_start",
      "groups": [],
      "x": 0,
      "y": 0.5
    },
    "workflow_end": {
      "name": "workflow_end",
      "groups": [],
      "x": 1.1212598425196851,
      "y": 0.4594222833562586
    },
    "2e5f": {
      "name": "merge",
      "canvasName": "merge",
      "summary": "Scheduling object (nextRunAt)",
      "description": "Scheduling object (nextRunAt)",
      "location": "Application",
      "locationType": null,
      "app": "WorkFlowEngine",
      "type": "operation",
      "displayName": "WorkFlowEngine",
      "variables": {
        "incoming": {
          "data_to_merge": [
            {
              "key": "nextRunAt",
              "value": {
                "task": "job",
                "variable": "nextRunAt",
                "editable": true
              }
            },
            {
              "key": "disabled",
              "value": {
                "task": "static",
                "variable": false
              }
            }
          ]
        },
        "outgoing": {
          "merged_object": null
        }
      },
      "deprecated": false,
      "matched": [
        {
          "key": "canvasName",
          "highlightString": "<span class='highlight-string'>merge</span>"
        },
        {
          "key": "summary",
          "highlightString": "<span class='highlight-string'>Merge</span> Data"
        },
        {
          "key": "description",
          "highlightString": "<span class='highlight-string'>Merge</span> data into a single object"
        }
      ],
      "groups": [],
      "x": 0.20708661417322835,
      "y": 0.49931224209078406
    },
    "dad8": {
      "name": "createAutomation",
      "canvasName": "createAutomation",
      "summary": "Create an automation catalog item",
      "description": "Create an automation catalog item",
      "location": "Application",
      "locationType": null,
      "app": "AutomationCatalog",
      "type": "automatic",
      "displayName": "AutomationCatalog",
      "variables": {
        "incoming": {
          "name": "$var.job.automationCatalogName",
          "description": "$var.job.description"
        },
        "outgoing": {
          "result": null
        },
        "error": "$var.job.taskError"
      },
      "deprecated": false,
      "matched": [
        {
          "key": "canvasName",
          "highlightString": "<span class='highlight-string'>createA</span>utomation"
        }
      ],
      "groups": [],
      "actor": "Pronghorn",
      "x": 0.3125984251968504,
      "y": 0.5006877579092159,
      "scheduled": false
    },
    "c179": {
      "name": "query",
      "canvasName": "query",
      "summary": "Query Automation Catalog ID and assign it to job variable automationCatalogID",
      "description": "Query Automation Catalog ID and assign it to job variable automationCatalogID",
      "location": "Application",
      "locationType": null,
      "app": "WorkFlowEngine",
      "type": "operation",
      "displayName": "WorkFlowEngine",
      "variables": {
        "incoming": {
          "pass_on_null": false,
          "query": "id",
          "obj": "$var.dad8.result"
        },
        "outgoing": {
          "return_data": null
        },
        "error": ""
      },
      "deprecated": false,
      "matched": [
        {
          "key": "canvasName",
          "highlightString": "<span class='highlight-string'>quer</span>y"
        },
        {
          "key": "summary",
          "highlightString": "<span class='highlight-string'>Quer</span>y Data Using 'json-query' Format"
        },
        {
          "key": "description",
          "highlightString": "<span class='highlight-string'>Quer</span>y data using a dot/bracket notation string and a matching key/value pair."
        }
      ],
      "groups": [],
      "x": 0.4251968503937008,
      "y": 0.5075653370013755,
      "scheduled": false
    },
    "fbb0": {
      "name": "evaluation",
      "canvasName": "evaluation",
      "summary": "Check if nextRunAt is not empty, meaning we need to schedule the AC",
      "description": "Check if nextRunAt is not empty, meaning we need to schedule the AC",
      "location": "Application",
      "locationType": null,
      "app": "WorkFlowEngine",
      "type": "operation",
      "displayName": "WorkFlowEngine",
      "variables": {
        "incoming": {
          "all_true_flag": false,
          "evaluation_groups": [
            {
              "all_true_flag": false,
              "evaluations": [
                {
                  "query": "nextRunAt",
                  "operand_1": {
                    "variable": "merged_object",
                    "task": "2e5f"
                  },
                  "operator": "!=",
                  "operand_2": {
                    "variable": "",
                    "task": "static"
                  }
                }
              ]
            }
          ]
        },
        "outgoing": {
          "return_value": null
        }
      },
      "deprecated": false,
      "matched": [
        {
          "key": "canvasName",
          "highlightString": "<span class='highlight-string'>eva</span>luation"
        },
        {
          "key": "summary",
          "highlightString": "Run <span class='highlight-string'>Eva</span>luation Task"
        },
        {
          "key": "description",
          "highlightString": "Run an <span class='highlight-string'>eva</span>luation"
        }
      ],
      "groups": [],
      "x": 0.84251968503937,
      "y": 0.5061898211829436
    },
    "48f5": {
      "name": "updateAutomation",
      "canvasName": "updateAutomation",
      "summary": "Set workflow ID and data",
      "description": "Set workflow ID and data",
      "location": "Application",
      "locationType": null,
      "app": "AutomationCatalog",
      "type": "automatic",
      "displayName": "AutomationCatalog",
      "variables": {
        "incoming": {
          "id": "$var.c179.return_data",
          "options": "$var.1082.merged_object"
        },
        "outgoing": {
          "document": null
        },
        "error": "$var.job.taskError"
      },
      "deprecated": false,
      "matched": [
        {
          "key": "canvasName",
          "highlightString": "<span class='highlight-string'>updateAut</span>omation"
        }
      ],
      "groups": [],
      "actor": "Pronghorn",
      "x": 0.7448818897637796,
      "y": 0.5103163686382394,
      "scheduled": false
    },
    "dead": {
      "name": "scheduleAutomation",
      "canvasName": "scheduleAutomation",
      "summary": "Updates an automation's schedule",
      "description": "Updates an automation's schedule",
      "location": "Application",
      "locationType": null,
      "app": "AutomationCatalog",
      "type": "automatic",
      "displayName": "AutomationCatalog",
      "variables": {
        "incoming": {
          "id": "$var.c179.return_data",
          "options": "$var.2e5f.merged_object"
        },
        "outgoing": {
          "result": null
        },
        "error": "$var.job.taskError"
      },
      "deprecated": true,
      "matched": [],
      "groups": [],
      "actor": "Pronghorn",
      "x": 0.9559055118110236,
      "y": 0.3425034387895461,
      "scheduled": false
    },
    "cd39": {
      "name": "stub",
      "canvasName": "stub",
      "summary": "Log error",
      "description": "Log error",
      "location": "Application",
      "locationType": null,
      "app": "WorkFlowEngine",
      "type": "automatic",
      "displayName": "Tools",
      "variables": {
        "incoming": {
          "type": "success",
          "delay": "",
          "response": "$var.job.taskError"
        },
        "outgoing": {
          "response": null
        },
        "error": ""
      },
      "deprecated": false,
      "matched": [
        {
          "key": "canvasName",
          "highlightString": "<span class='highlight-string'>stub</span>"
        },
        {
          "key": "summary",
          "highlightString": "<span class='highlight-string'>Stub</span>"
        },
        {
          "key": "description",
          "highlightString": "Create a <span class='highlight-string'>stub</span> for an automated task"
        }
      ],
      "groups": [],
      "actor": "Pronghorn",
      "x": 0.9811023622047244,
      "y": 0.7235213204951857,
      "scheduled": false
    }
  },
  "transitions": {
    "216": {},
    "1082": {
      "48f5": {
        "type": "standard",
        "state": "success"
      }
    },
    "6810": {
      "2e5f": {
        "type": "standard",
        "state": "success"
      }
    },
    "8535": {
      "1082": {
        "type": "standard",
        "state": "success"
      }
    },
    "9845": {
      "cd39": {
        "type": "standard",
        "state": "error"
      }
    },
    "workflow_start": {
      "6810": {
        "type": "standard",
        "state": "success"
      }
    },
    "workflow_end": {},
    "2e5f": {
      "dad8": {
        "type": "standard",
        "state": "success"
      }
    },
    "dad8": {
      "c179": {
        "type": "standard",
        "state": "success"
      },
      "cd39": {
        "type": "standard",
        "state": "error"
      }
    },
    "c179": {
      "8535": {
        "type": "standard",
        "state": "success"
      },
      "9845": {
        "type": "standard",
        "state": "failure"
      }
    },
    "fbb0": {
      "dead": {
        "type": "standard",
        "state": "success"
      },
      "workflow_end": {
        "type": "standard",
        "state": "failure"
      }
    },
    "48f5": {
      "fbb0": {
        "type": "standard",
        "state": "success"
      },
      "cd39": {
        "type": "standard",
        "state": "error"
      }
    },
    "dead": {
      "workflow_end": {
        "type": "standard",
        "state": "success"
      },
      "cd39": {
        "type": "standard",
        "state": "error"
      }
    },
    "cd39": {
      "workflow_end": {
        "type": "standard",
        "state": "success"
      }
    }
  },
  "font_size": 12,
  "created": "2020-05-28T21:15:31.010Z",
  "created_by": {
    "provenance": "Local AAA",
    "username": "admin@pronghorn",
    "firstname": "admin",
    "inactive": false,
    "email": ""
  },
  "createdVersion": "5.10.4-2020.1.3.0",
  "groups": [],
  "last_updated": "2020-05-28T21:15:36.618Z",
  "last_updated_by": {
    "provenance": "Local AAA",
    "username": "admin@pronghorn",
    "firstname": "admin",
    "inactive": false,
    "email": ""
  },
  "lastUpdatedVersion": "5.10.4-2020.1.3.0",
  "type": "automation",
  "description": null,
  "tags": []
}
