{
  "openruna_format": "flow-graph-v1",
  "title": "Prevent concurrent workflow runs using Redis",
  "slug": "prevent-concurrent-workflow-runs-using-redis",
  "source_filename": "0925_Stopanderror_Wait_Automate_Triggered.json",
  "nodes": [
    {
      "id": "When Executed by Another Workflow",
      "name": "When Executed by Another Workflow",
      "integration": "executeWorkflow",
      "kind": "trigger"
    },
    {
      "id": "Switch",
      "name": "Switch",
      "integration": "switch",
      "kind": "logic"
    },
    {
      "id": "When clicking ‘Test workflow’",
      "name": "When clicking ‘Test workflow’",
      "integration": "manual",
      "kind": "trigger"
    },
    {
      "id": "If2",
      "name": "If2",
      "integration": "if",
      "kind": "logic"
    },
    {
      "id": "Is Workflow Active",
      "name": "Is Workflow Active",
      "integration": "executeWorkflow",
      "kind": "action"
    },
    {
      "id": "Set Workflow Active",
      "name": "Set Workflow Active",
      "integration": "executeWorkflow",
      "kind": "action"
    },
    {
      "id": "Set Workflow Finished",
      "name": "Set Workflow Finished",
      "integration": "executeWorkflow",
      "kind": "action"
    },
    {
      "id": "Get Key",
      "name": "Get Key",
      "integration": "redis",
      "kind": "action"
    },
    {
      "id": "Set Key",
      "name": "Set Key",
      "integration": "redis",
      "kind": "action"
    },
    {
      "id": "UnSet Key",
      "name": "UnSet Key",
      "integration": "redis",
      "kind": "action"
    },
    {
      "id": "Set Timeout",
      "name": "Set Timeout",
      "integration": "set",
      "kind": "logic"
    },
    {
      "id": "set continue",
      "name": "set continue",
      "integration": "set",
      "kind": "logic"
    },
    {
      "id": "If",
      "name": "If",
      "integration": "if",
      "kind": "logic"
    },
    {
      "id": "Is Workflow Active1",
      "name": "Is Workflow Active1",
      "integration": "executeWorkflow",
      "kind": "action"
    },
    {
      "id": "Stop and Error",
      "name": "Stop and Error",
      "integration": "stopAndError",
      "kind": "action"
    },
    {
      "id": "No Operation, do nothing",
      "name": "No Operation, do nothing",
      "integration": "noOp",
      "kind": "logic"
    },
    {
      "id": "Set Workflow Active1",
      "name": "Set Workflow Active1",
      "integration": "executeWorkflow",
      "kind": "action"
    },
    {
      "id": "Set Workflow Finished1",
      "name": "Set Workflow Finished1",
      "integration": "executeWorkflow",
      "kind": "action"
    },
    {
      "id": "Wait",
      "name": "Wait",
      "integration": "wait",
      "kind": "logic"
    },
    {
      "id": "If1",
      "name": "If1",
      "integration": "if",
      "kind": "logic"
    },
    {
      "id": "Is Workflow Active2",
      "name": "Is Workflow Active2",
      "integration": "executeWorkflow",
      "kind": "action"
    },
    {
      "id": "Stop and Error1",
      "name": "Stop and Error1",
      "integration": "stopAndError",
      "kind": "action"
    },
    {
      "id": "Set Workflow Finished2",
      "name": "Set Workflow Finished2",
      "integration": "executeWorkflow",
      "kind": "action"
    },
    {
      "id": "Wait1",
      "name": "Wait1",
      "integration": "wait",
      "kind": "logic"
    },
    {
      "id": "Wait2",
      "name": "Wait2",
      "integration": "wait",
      "kind": "logic"
    },
    {
      "id": "Wait3",
      "name": "Wait3",
      "integration": "wait",
      "kind": "logic"
    },
    {
      "id": "Set Workflow \"started\"",
      "name": "Set Workflow \"started\"",
      "integration": "executeWorkflow",
      "kind": "action"
    },
    {
      "id": "Set Workflow \"finishing\"",
      "name": "Set Workflow \"finishing\"",
      "integration": "executeWorkflow",
      "kind": "action"
    },
    {
      "id": "Set Workflow \"loading\"",
      "name": "Set Workflow \"loading\"",
      "integration": "executeWorkflow",
      "kind": "action"
    },
    {
      "id": "Is Workflow Active3",
      "name": "Is Workflow Active3",
      "integration": "executeWorkflow",
      "kind": "action"
    },
    {
      "id": "Switch1",
      "name": "Switch1",
      "integration": "switch",
      "kind": "logic"
    }
  ],
  "edges": [
    {
      "from": "If",
      "to": "Set Workflow Active1"
    },
    {
      "from": "If",
      "to": "Stop and Error"
    },
    {
      "from": "If1",
      "to": "Set Workflow \"started\""
    },
    {
      "from": "If1",
      "to": "Stop and Error1"
    },
    {
      "from": "Wait",
      "to": "Set Workflow Finished1"
    },
    {
      "from": "Wait1",
      "to": "Set Workflow \"loading\""
    },
    {
      "from": "Wait2",
      "to": "Set Workflow \"finishing\""
    },
    {
      "from": "Wait3",
      "to": "Set Workflow Finished2"
    },
    {
      "from": "Switch",
      "to": "Get Key"
    },
    {
      "from": "Switch",
      "to": "Set Key"
    },
    {
      "from": "Switch",
      "to": "UnSet Key"
    },
    {
      "from": "Set Key",
      "to": "set continue"
    },
    {
      "from": "UnSet Key",
      "to": "set continue"
    },
    {
      "from": "Set Timeout",
      "to": "Switch"
    },
    {
      "from": "Is Workflow Active",
      "to": "If2"
    },
    {
      "from": "Is Workflow Active1",
      "to": "If"
    },
    {
      "from": "Is Workflow Active2",
      "to": "If1"
    },
    {
      "from": "Is Workflow Active3",
      "to": "Switch1"
    },
    {
      "from": "Set Workflow Active1",
      "to": "No Operation, do nothing"
    },
    {
      "from": "Set Workflow \"loading\"",
      "to": "Wait2"
    },
    {
      "from": "Set Workflow \"started\"",
      "to": "Wait1"
    },
    {
      "from": "No Operation, do nothing",
      "to": "Wait"
    },
    {
      "from": "Set Workflow \"finishing\"",
      "to": "Wait3"
    },
    {
      "from": "When Executed by Another Workflow",
      "to": "Set Timeout"
    }
  ]
}