export const simpleDiagram = {
  updateTime: 1646331692036,
  name: "image_convert_resize_jim",
  description: "Image Processing Workflow",
  version: 1,
  tasks: [
    {
      name: "image_convert_resize_jim",
      taskReferenceName: "image_convert_resize_ref",
      inputParameters: {
        fileLocation: "${workflow.input.fileLocation}",
        outputFormat: "${workflow.input.recipeParameters.outputFormat}",
        outputWidth: "${workflow.input.recipeParameters.outputSize.width}",
        outputHeight: "${workflow.input.recipeParameters.outputSize.height}",
      },
      type: "SIMPLE",
      decisionCases: {},
      defaultCase: [],
      forkTasks: [],
      startDelay: 0,
      joinOn: [],
      optional: false,
      defaultExclusiveJoinTask: [],
      asyncComplete: false,
      loopOver: [],
    },
    {
      name: "upload_toS3_jim",
      taskReferenceName: "upload_toS3_ref",
      inputParameters: {
        fileLocation: "${image_convert_resize_ref.output.fileLocation}",
      },
      type: "SIMPLE",
      decisionCases: {},
      defaultCase: [],
      forkTasks: [],
      startDelay: 0,
      joinOn: [],
      optional: false,
      defaultExclusiveJoinTask: [],
      asyncComplete: false,
      loopOver: [],
    },
  ],
  inputParameters: [],
  outputParameters: {
    fileLocation: "${upload_toS3_ref.output.fileLocation}",
  },
  schemaVersion: 2,
  restartable: true,
  workflowStatusListenerEnabled: true,
  ownerEmail: "devrel@orkes.io",
  timeoutPolicy: "ALERT_ONLY",
  timeoutSeconds: 0,
  failureWorkflow: "",
  variables: {},
  inputTemplate: {},
};

export const populationMinMax = {
  updateTime: 1645990260050,
  name: "PopulationMinMax",
  description: "Min Max Population",
  version: 1,
  tasks: [
    {
      name: "get_population_data",
      taskReferenceName: "get_population_data_ref",
      inputParameters: {
        http_request: {
          uri: "https://datausa.io/api/data?drilldowns=State&measures=Population&year=latest",
          method: "GET",
        },
      },
      type: "HTTP",
      decisionCases: {},
      defaultCase: [],
      forkTasks: [],
      startDelay: 0,
      joinOn: [],
      optional: false,
      defaultExclusiveJoinTask: [],
      asyncComplete: false,
      loopOver: [],
    },
    {
      name: "fork_join",
      taskReferenceName: "fork_ref",
      inputParameters: {},
      type: "FORK_JOIN",
      decisionCases: {},
      defaultCase: [],
      forkTasks: [
        [
          {
            name: "process_population_max",
            taskReferenceName: "process_population_max_ref",
            inputParameters: {
              body: "${get_population_data_ref.output.response.body}",
              queryExpression: "[.body.data[]] | max_by(.Population)",
            },
            type: "JSON_JQ_TRANSFORM",
            decisionCases: {},
            defaultCase: [],
            forkTasks: [],
            startDelay: 0,
            joinOn: [],
            optional: false,
            defaultExclusiveJoinTask: [],
            asyncComplete: false,
            loopOver: [],
          },
        ],
        [
          {
            name: "process_population_min",
            taskReferenceName: "process_population_min_ref",
            inputParameters: {
              body: "${get_population_data_ref.output.response.body}",
              queryExpression: "[.body.data[]] | min_by(.Population)",
            },
            type: "JSON_JQ_TRANSFORM",
            decisionCases: {},
            defaultCase: [],
            forkTasks: [],
            startDelay: 0,
            joinOn: [],
            optional: false,
            defaultExclusiveJoinTask: [],
            asyncComplete: false,
            loopOver: [],
          },
        ],
      ],
      startDelay: 0,
      joinOn: [],
      optional: false,
      defaultExclusiveJoinTask: [],
      asyncComplete: false,
      loopOver: [],
    },
    {
      name: "join",
      taskReferenceName: "join_ref",
      inputParameters: {},
      type: "JOIN",
      decisionCases: {},
      defaultCase: [],
      forkTasks: [],
      startDelay: 0,
      joinOn: ["process_population_max_ref", "process_population_min_ref"],
      optional: false,
      defaultExclusiveJoinTask: [],
      asyncComplete: false,
      loopOver: [],
    },
  ],
  inputParameters: [],
  outputParameters: {
    maxPopulation: "${process_population_max_ref.output.result}",
    minPopulation: "${process_population_min_ref.output.result}",
  },
  schemaVersion: 2,
  restartable: true,
  workflowStatusListenerEnabled: false,
  ownerEmail: "developers@orkes.io",
  timeoutPolicy: "ALERT_ONLY",
  timeoutSeconds: 0,
  failureWorkflow: "",
  variables: {},
  inputTemplate: {},
};

export const decisionSample = {
  updateTime: 1636597950018,
  name: "exclusive_join",
  description: "Exclusive Join Example",
  version: 1,
  tasks: [
    {
      type: "TERMINAL",
      name: "start",
      taskReferenceName: "__start",
    },
    {
      name: "api_decision",
      taskReferenceName: "api_decision_ref",
      inputParameters: {
        case_value_param: "${workflow.input.type}",
      },
      type: "DECISION",
      caseValueParam: "case_value_param",
      decisionCases: {
        POST: [
          {
            name: "get_posts",
            taskReferenceName: "get_posts_ref",
            inputParameters: {
              http_request: {
                uri: "https://jsonplaceholder.typicode.com/posts/1",
                method: "GET",
              },
            },
            type: "HTTP",
            decisionCases: {},
            defaultCase: [],
            forkTasks: [],
            startDelay: 0,
            joinOn: [],
            optional: false,
            defaultExclusiveJoinTask: [],
            asyncComplete: false,
            loopOver: [],
          },
        ],
        COMMENT: [
          {
            name: "get_post_comments",
            taskReferenceName: "get_post_comments_ref",
            inputParameters: {
              http_request: {
                uri: "https://jsonplaceholder.typicode.com/comments?postId=1",
                method: "GET",
              },
            },
            type: "HTTP",
            decisionCases: {},
            defaultCase: [],
            forkTasks: [],
            startDelay: 0,
            joinOn: [],
            optional: false,
            defaultExclusiveJoinTask: [],
            asyncComplete: false,
            loopOver: [],
          },
        ],
        USER: [
          {
            name: "get_user_posts",
            taskReferenceName: "get_user_posts_ref",
            inputParameters: {
              http_request: {
                uri: "https://jsonplaceholder.typicode.com/posts?userId=1",
                method: "GET",
              },
            },
            type: "HTTP",
            decisionCases: {},
            defaultCase: [],
            forkTasks: [],
            startDelay: 0,
            joinOn: [],
            optional: false,
            defaultExclusiveJoinTask: [],
            asyncComplete: false,
            loopOver: [],
          },
        ],
      },
      defaultCase: [],
      forkTasks: [],
      startDelay: 0,
      joinOn: [],
      optional: false,
      defaultExclusiveJoinTask: [],
      asyncComplete: false,
      loopOver: [],
    },
    {
      name: "notification_join",
      taskReferenceName: "notification_join_ref",
      inputParameters: {},
      type: "EXCLUSIVE_JOIN",
      decisionCases: {},
      defaultCase: [],
      forkTasks: [],
      startDelay: 0,
      joinOn: ["get_posts_ref", "get_post_comments_ref"],
      optional: false,
      defaultExclusiveJoinTask: [],
      asyncComplete: false,
      loopOver: [],
    },
    {
      type: "TERMINAL",
      name: "final",
      taskReferenceName: "__final",
    },
  ],
  inputParameters: [],
  outputParameters: {},
  schemaVersion: 2,
  restartable: true,
  workflowStatusListenerEnabled: true,
  ownerEmail: "encode_admin@test.com",
  timeoutPolicy: "ALERT_ONLY",
  timeoutSeconds: 0,
  failureWorkflow: "",
  variables: {},
  inputTemplate: {},
};

export const complexDiagram = {
  createTime: 1639691367677,
  updateTime: 1641859692443,
  name: "port_in_wf",
  description: "Port In Workflow",
  version: 1,
  tasks: [
    {
      type: "TERMINAL",
      name: "start",
      taskReferenceName: "__start",
    },
    {
      name: "Submit To ITG with Retry",
      taskReferenceName: "submit_to_itg_with_retry",
      inputParameters: {
        value: "${workflow.input.iterations}",
        terminate: "${workflow.variables.terminate_loop}",
      },
      type: "DO_WHILE",
      decisionCases: {},
      defaultCase: [],
      forkTasks: [],
      startDelay: 0,
      joinOn: [],
      optional: false,
      defaultExclusiveJoinTask: [],
      asyncComplete: false,
      loopCondition:
        "if ( ($.submit_to_itg_with_retry['iteration'] < $.value) && !$.terminate) { true; } else { false; }",
      loopOver: [
        {
          name: "Submit to ITG",
          taskReferenceName: "submit_to_itg",
          inputParameters: {
            http_request: {
              uri: "https://jsonplaceholder.typicode.com/todos/${$.workflow.input.iterations}",
              method: "GET",
            },
          },
          type: "HTTP",
          decisionCases: {},
          defaultCase: [],
          forkTasks: [],
          startDelay: 0,
          joinOn: [],
          optional: true,
          defaultExclusiveJoinTask: [],
          asyncComplete: false,
          loopOver: [],
        },
        {
          name: "Check Status",
          taskReferenceName: "check_status",
          inputParameters: {
            prev_task_result: "${submit_to_itg.output}",
            switchCaseValue: "${submit_to_itg.status}",
          },
          type: "DECISION",
          caseValueParam: "switchCaseValue",
          decisionCases: {
            COMPLETED: [
              {
                name: "Complete Request Loop",
                taskReferenceName: "complete_loop_success",
                inputParameters: {
                  terminate_loop: true,
                  success: true,
                },
                type: "SET_VARIABLE",
                decisionCases: {},
                defaultCase: [],
                forkTasks: [],
                startDelay: 0,
                joinOn: [],
                optional: false,
                defaultExclusiveJoinTask: [],
                asyncComplete: false,
                loopOver: [],
              },
            ],
            COMPLETED_WITH_ERRORS: [
              {
                name: "Retry HTTP Request",
                taskReferenceName: "retry_http_request",
                inputParameters: {
                  terminate_loop: false,
                  success: false,
                },
                type: "SET_VARIABLE",
                decisionCases: {},
                defaultCase: [],
                forkTasks: [],
                startDelay: 0,
                joinOn: [],
                optional: false,
                defaultExclusiveJoinTask: [],
                asyncComplete: false,
                loopOver: [],
              },
              {
                name: "Update Records",
                taskReferenceName: "update_records_on_retry",
                inputParameters: {
                  update_records_on_retry: 1,
                },
                type: "SET_VARIABLE",
                decisionCases: {},
                defaultCase: [],
                forkTasks: [],
                startDelay: 0,
                joinOn: [],
                optional: false,
                defaultExclusiveJoinTask: [],
                asyncComplete: false,
                loopOver: [],
              },
            ],
          },
          defaultCase: [
            {
              name: "Permanent Failure",
              taskReferenceName: "terminate_loop",
              inputParameters: {
                terminate_loop: true,
                success: false,
              },
              type: "SET_VARIABLE",
              decisionCases: {},
              defaultCase: [],
              forkTasks: [],
              startDelay: 0,
              joinOn: [],
              optional: false,
              defaultExclusiveJoinTask: [],
              asyncComplete: false,
              loopOver: [],
            },
            {
              name: "Update Records Terminate",
              taskReferenceName: "update_records_on_failure",
              inputParameters: {
                update_records_on_retry: 1,
              },
              type: "SET_VARIABLE",
              decisionCases: {},
              defaultCase: [],
              forkTasks: [],
              startDelay: 0,
              joinOn: [],
              optional: false,
              defaultExclusiveJoinTask: [],
              asyncComplete: false,
              loopOver: [],
            },
            {
              name: "Terminate Workflow",
              taskReferenceName: "terminate_on_perm_failure",
              inputParameters: {
                terminationStatus: "FAILED",
                workflowOutput:
                  "Failing workflow as retries exhausted and failures are marked as permenant",
              },
              type: "TERMINATE",
              decisionCases: {},
              defaultCase: [],
              forkTasks: [],
              startDelay: 0,
              joinOn: [],
              optional: false,
              defaultExclusiveJoinTask: [],
              asyncComplete: false,
              loopOver: [],
            },
          ],
          forkTasks: [],
          startDelay: 0,
          joinOn: [],
          optional: false,
          defaultExclusiveJoinTask: [],
          asyncComplete: false,
          loopOver: [],
        },
      ],
    },
    {
      name: "Check If Success",
      taskReferenceName: "check_success",
      inputParameters: {
        switchCaseValue: "${workflow.variables.success}",
      },
      type: "DECISION",
      caseValueParam: "switchCaseValue",
      decisionCases: {
        false: [
          {
            name: "Update Records on Failure",
            taskReferenceName: "update_records_on_failure",
            inputParameters: {
              update_records_on_retry: 2,
            },
            type: "SET_VARIABLE",
            decisionCases: {},
            defaultCase: [],
            forkTasks: [],
            startDelay: 0,
            joinOn: [],
            optional: false,
            defaultExclusiveJoinTask: [],
            asyncComplete: false,
            loopOver: [],
          },
          {
            name: "Terminate Workflow",
            taskReferenceName: "terminate_on_perm_failure2",
            inputParameters: {
              terminationStatus: "FAILED",
              workflowOutput:
                "Failing workflow as retries exhausted and failures are marked as permenant",
            },
            type: "TERMINATE",
            decisionCases: {},
            defaultCase: [],
            forkTasks: [],
            startDelay: 0,
            joinOn: [],
            optional: false,
            defaultExclusiveJoinTask: [],
            asyncComplete: false,
            loopOver: [],
          },
        ],
      },
      defaultCase: [],
      forkTasks: [],
      startDelay: 0,
      joinOn: [],
      optional: false,
      defaultExclusiveJoinTask: [],
      asyncComplete: false,
      loopOver: [],
    },
    {
      name: "Wait for the async message response",
      taskReferenceName: "wait_for_response",
      inputParameters: {},
      type: "WAIT",
      decisionCases: {},
      defaultCase: [],
      forkTasks: [],
      startDelay: 0,
      joinOn: [],
      optional: false,
      defaultExclusiveJoinTask: [],
      asyncComplete: false,
      loopOver: [],
    },
    {
      name: "Check Response",
      taskReferenceName: "check_response_succeeded",
      inputParameters: {
        switchCaseValue: "${wait_for_response.output.success}",
      },
      type: "DECISION",
      caseValueParam: "switchCaseValue",
      decisionCases: {
        false: [
          {
            name: "Update Records on ITGH Failure",
            taskReferenceName: "update_records_on_itg_failure",
            inputParameters: {
              response: "${wait_for_response.output}",
            },
            type: "SET_VARIABLE",
            decisionCases: {},
            defaultCase: [],
            forkTasks: [],
            startDelay: 0,
            joinOn: [],
            optional: false,
            defaultExclusiveJoinTask: [],
            asyncComplete: false,
            loopOver: [],
          },
          {
            name: "Terminate Workflow",
            taskReferenceName: "terminate_on_response_failure",
            inputParameters: {
              terminationStatus: "FAILED",
              workflowOutput:
                "Failing workflow as retries exhausted and failures are marked as permenant",
            },
            type: "TERMINATE",
            decisionCases: {},
            defaultCase: [],
            forkTasks: [],
            startDelay: 0,
            joinOn: [],
            optional: false,
            defaultExclusiveJoinTask: [],
            asyncComplete: false,
            loopOver: [],
          },
        ],
      },
      defaultCase: [],
      forkTasks: [],
      startDelay: 0,
      joinOn: [],
      optional: false,
      defaultExclusiveJoinTask: [],
      asyncComplete: false,
      loopOver: [],
    },
    {
      type: "TERMINAL",
      name: "final",
      taskReferenceName: "__final",
    },
  ],
  inputParameters: [],
  outputParameters: {},
  schemaVersion: 2,
  restartable: true,
  workflowStatusListenerEnabled: false,
  ownerEmail: "example@email.com",
  timeoutPolicy: "ALERT_ONLY",
  timeoutSeconds: 0,
  failureWorkflow: "",
  variables: {
    success: false,
  },
  inputTemplate: {},
};

export const simpleLoopSample = {
  updateTime: 1638843682276,
  name: "test_looping_concurrency",
  description: "Test Looping",
  version: 1,
  tasks: [
    {
      type: "TERMINAL",
      name: "start",
      taskReferenceName: "__start",
    },
    {
      name: "fork_join",
      taskReferenceName: "my_fork_join_ref",
      inputParameters: {},
      type: "FORK_JOIN",
      decisionCases: {},
      defaultCase: [],
      forkTasks: [
        [
          {
            name: "loop_1",
            taskReferenceName: "loop_1",
            inputParameters: {},
            type: "DO_WHILE",
            decisionCases: {},
            defaultCase: [],
            forkTasks: [],
            startDelay: 0,
            joinOn: [],
            optional: false,
            defaultExclusiveJoinTask: [],
            asyncComplete: false,
            loopCondition: "(($.loop_1['iteration'] < 10))",
            loopOver: [
              {
                name: "first_task_in_loop",
                taskReferenceName: "loop_1_task_iter",
                inputParameters: {},
                type: "SIMPLE",
                decisionCases: {},
                defaultCase: [],
                forkTasks: [],
                startDelay: 0,
                joinOn: [],
                optional: false,
                defaultExclusiveJoinTask: [],
                asyncComplete: false,
                loopOver: [],
              },
              {
                name: "loop_1_set_var",
                taskReferenceName: "loop_1_sv",
                inputParameters: {
                  name: "Orkes",
                },
                type: "SET_VARIABLE",
                decisionCases: {},
                defaultCase: [],
                forkTasks: [],
                startDelay: 0,
                joinOn: [],
                optional: false,
                defaultExclusiveJoinTask: [],
                asyncComplete: false,
                loopOver: [],
              },
            ],
          },
        ],
        [
          {
            name: "loop_2",
            taskReferenceName: "loop_2",
            inputParameters: {},
            type: "DO_WHILE",
            decisionCases: {},
            defaultCase: [],
            forkTasks: [],
            startDelay: 0,
            joinOn: [],
            optional: false,
            defaultExclusiveJoinTask: [],
            asyncComplete: false,
            loopCondition: "(($.loop_2['iteration'] < 10))",
            loopOver: [
              {
                name: "first_task_in_loop",
                taskReferenceName: "loop_2_task_iter",
                inputParameters: {},
                type: "SIMPLE",
                decisionCases: {},
                defaultCase: [],
                forkTasks: [],
                startDelay: 0,
                joinOn: [],
                optional: false,
                defaultExclusiveJoinTask: [],
                asyncComplete: false,
                loopOver: [],
              },
              {
                name: "loop_2_set_var",
                taskReferenceName: "loop_2_sv",
                inputParameters: {
                  name: "Orkes",
                },
                type: "SET_VARIABLE",
                decisionCases: {},
                defaultCase: [],
                forkTasks: [],
                startDelay: 0,
                joinOn: [],
                optional: false,
                defaultExclusiveJoinTask: [],
                asyncComplete: false,
                loopOver: [],
              },
            ],
          },
        ],
        [
          {
            name: "loop_3",
            taskReferenceName: "loop_3",
            inputParameters: {
              value: "${workflow.input.value}",
            },
            type: "DO_WHILE",
            decisionCases: {},
            defaultCase: [],
            forkTasks: [],
            startDelay: 0,
            joinOn: [],
            optional: false,
            defaultExclusiveJoinTask: [],
            asyncComplete: false,
            loopCondition:
              "(($.loop_3['iteration'] < $.value ) && ( $.loop_3_task_iter['outputVal'] < 10))",
            loopOver: [
              {
                name: "first_task_in_loop",
                taskReferenceName: "loop_3_task_iter",
                inputParameters: {},
                type: "SIMPLE",
                decisionCases: {},
                defaultCase: [],
                forkTasks: [],
                startDelay: 0,
                joinOn: [],
                optional: false,
                defaultExclusiveJoinTask: [],
                asyncComplete: false,
                loopOver: [],
              },
            ],
          },
        ],
      ],
      startDelay: 0,
      joinOn: [],
      optional: false,
      defaultExclusiveJoinTask: [],
      asyncComplete: false,
      loopOver: [],
    },
    {
      name: "fork_join",
      taskReferenceName: "fork_join_ref",
      inputParameters: {},
      type: "JOIN",
      decisionCases: {},
      defaultCase: [],
      forkTasks: [],
      startDelay: 0,
      joinOn: ["loop_1", "loop_2", "loop_3"],
      optional: false,
      defaultExclusiveJoinTask: [],
      asyncComplete: false,
      loopOver: [],
    },
    {
      type: "TERMINAL",
      name: "final",
      taskReferenceName: "__final",
    },
  ],
  inputParameters: [],
  outputParameters: {},
  schemaVersion: 2,
  restartable: true,
  workflowStatusListenerEnabled: false,
  ownerEmail: "builds@orkes.io",
  timeoutPolicy: "ALERT_ONLY",
  timeoutSeconds: 0,
  failureWorkflow: "",
  variables: {},
  inputTemplate: {},
};

export const kitchenSink = {
  createTime: 1647439893125,
  name: "kitchensink",
  description: "kitchensink workflow",
  version: 1,
  tasks: [
    {
      name: "task_1",
      taskReferenceName: "task_1",
      inputParameters: {
        mod: "${workflow.input.mod}",
        oddEven: "${workflow.input.oddEven}",
      },
      type: "SIMPLE",
      decisionCases: {},
      defaultCase: [],
      forkTasks: [],
      startDelay: 0,
      joinOn: [],
      optional: false,
      defaultExclusiveJoinTask: [],
      asyncComplete: false,
      loopOver: [],
    },
    {
      name: "event_task",
      taskReferenceName: "event_0",
      inputParameters: {
        mod: "${workflow.input.mod}",
        oddEven: "${workflow.input.oddEven}",
      },
      type: "EVENT",
      decisionCases: {},
      defaultCase: [],
      forkTasks: [],
      startDelay: 0,
      joinOn: [],
      sink: "conductor",
      optional: false,
      defaultExclusiveJoinTask: [],
      asyncComplete: false,
      loopOver: [],
    },
    {
      name: "dyntask",
      taskReferenceName: "task_2",
      inputParameters: {
        taskToExecute: "${workflow.input.task2Name}",
      },
      type: "DYNAMIC",
      dynamicTaskNameParam: "taskToExecute",
      decisionCases: {},
      defaultCase: [],
      forkTasks: [],
      startDelay: 0,
      joinOn: [],
      optional: false,
      defaultExclusiveJoinTask: [],
      asyncComplete: false,
      loopOver: [],
    },
    {
      name: "oddEvenDecision",
      taskReferenceName: "oddEvenDecision",
      inputParameters: {
        oddEven: "${task_2.output.oddEven}",
      },
      type: "DECISION",
      caseValueParam: "oddEven",
      decisionCases: {
        0: [
          {
            name: "task_4",
            taskReferenceName: "task_4",
            inputParameters: {
              mod: "${task_2.output.mod}",
              oddEven: "${task_2.output.oddEven}",
            },
            type: "SIMPLE",
            decisionCases: {},
            defaultCase: [],
            forkTasks: [],
            startDelay: 0,
            joinOn: [],
            optional: false,
            defaultExclusiveJoinTask: [],
            asyncComplete: false,
            loopOver: [],
          },
          {
            name: "dynamic_fanout",
            taskReferenceName: "fanout1",
            inputParameters: {
              dynamicTasks: "${task_4.output.dynamicTasks}",
              input: "${task_4.output.inputs}",
            },
            type: "FORK_JOIN_DYNAMIC",
            decisionCases: {},
            dynamicForkTasksParam: "dynamicTasks",
            dynamicForkTasksInputParamName: "input",
            defaultCase: [],
            forkTasks: [],
            startDelay: 0,
            joinOn: [],
            optional: false,
            defaultExclusiveJoinTask: [],
            asyncComplete: false,
            loopOver: [],
          },
          {
            name: "dynamic_join",
            taskReferenceName: "join1",
            inputParameters: {},
            type: "JOIN",
            decisionCases: {},
            defaultCase: [],
            forkTasks: [],
            startDelay: 0,
            joinOn: [],
            optional: false,
            defaultExclusiveJoinTask: [],
            asyncComplete: false,
            loopOver: [],
          },
        ],
        1: [
          {
            name: "fork_join",
            taskReferenceName: "forkx",
            inputParameters: {},
            type: "FORK_JOIN",
            decisionCases: {},
            defaultCase: [],
            forkTasks: [
              [
                {
                  name: "task_10",
                  taskReferenceName: "task_10",
                  inputParameters: {},
                  type: "SIMPLE",
                  decisionCases: {},
                  defaultCase: [],
                  forkTasks: [],
                  startDelay: 0,
                  joinOn: [],
                  optional: false,
                  defaultExclusiveJoinTask: [],
                  asyncComplete: false,
                  loopOver: [],
                },
                {
                  name: "sub_workflow_x",
                  taskReferenceName: "wf3",
                  inputParameters: {
                    mod: "${task_1.output.mod}",
                    oddEven: "${task_1.output.oddEven}",
                  },
                  type: "SUB_WORKFLOW",
                  decisionCases: {},
                  defaultCase: [],
                  forkTasks: [],
                  startDelay: 0,
                  subWorkflowParam: {
                    name: "sub_flow_1",
                    version: 1,
                  },
                  joinOn: [],
                  optional: false,
                  defaultExclusiveJoinTask: [],
                  asyncComplete: false,
                  loopOver: [],
                },
              ],
              [
                {
                  name: "task_11",
                  taskReferenceName: "task_11",
                  inputParameters: {},
                  type: "SIMPLE",
                  decisionCases: {},
                  defaultCase: [],
                  forkTasks: [],
                  startDelay: 0,
                  joinOn: [],
                  optional: false,
                  defaultExclusiveJoinTask: [],
                  asyncComplete: false,
                  loopOver: [],
                },
                {
                  name: "sub_workflow_x",
                  taskReferenceName: "wf4",
                  inputParameters: {
                    mod: "${task_1.output.mod}",
                    oddEven: "${task_1.output.oddEven}",
                  },
                  type: "SUB_WORKFLOW",
                  decisionCases: {},
                  defaultCase: [],
                  forkTasks: [],
                  startDelay: 0,
                  subWorkflowParam: {
                    name: "sub_flow_1",
                    version: 1,
                  },
                  joinOn: [],
                  optional: false,
                  defaultExclusiveJoinTask: [],
                  asyncComplete: false,
                  loopOver: [],
                },
              ],
            ],
            startDelay: 0,
            joinOn: [],
            optional: false,
            defaultExclusiveJoinTask: [],
            asyncComplete: false,
            loopOver: [],
          },
          {
            name: "join",
            taskReferenceName: "join2",
            inputParameters: {},
            type: "JOIN",
            decisionCases: {},
            defaultCase: [],
            forkTasks: [],
            startDelay: 0,
            joinOn: ["wf3", "wf4"],
            optional: false,
            defaultExclusiveJoinTask: [],
            asyncComplete: false,
            loopOver: [],
          },
        ],
      },
      defaultCase: [],
      forkTasks: [],
      startDelay: 0,
      joinOn: [],
      optional: false,
      defaultExclusiveJoinTask: [],
      asyncComplete: false,
      loopOver: [],
    },
    {
      name: "search_elasticsearch",
      taskReferenceName: "get_es_1",
      inputParameters: {
        http_request: {
          uri: "http://localhost:9200/conductor/_search?size=10",
          method: "GET",
        },
      },
      type: "HTTP",
      decisionCases: {},
      defaultCase: [],
      forkTasks: [],
      startDelay: 0,
      joinOn: [],
      optional: false,
      defaultExclusiveJoinTask: [],
      asyncComplete: false,
      loopOver: [],
    },
    {
      name: "task_30",
      taskReferenceName: "task_30",
      inputParameters: {
        statuses: "${get_es_1.output..status}",
        workflowIds: "${get_es_1.output..workflowId}",
      },
      type: "SIMPLE",
      decisionCases: {},
      defaultCase: [],
      forkTasks: [],
      startDelay: 0,
      joinOn: [],
      optional: false,
      defaultExclusiveJoinTask: [],
      asyncComplete: false,
      loopOver: [],
    },
  ],
  inputParameters: [],
  outputParameters: {},
  schemaVersion: 2,
  restartable: true,
  workflowStatusListenerEnabled: false,
  ownerEmail: "builds@orkes.io",
  timeoutPolicy: "ALERT_ONLY",
  timeoutSeconds: 0,
  failureWorkflow: "",
  variables: {},
  inputTemplate: {},
};

export const switchExample = {
  updateTime: 1635487924982,
  name: "Switch_TaskExample",
  description: "Switch_TaskExample",
  version: 1,
  tasks: [
    {
      type: "TERMINAL",
      name: "start",
      taskReferenceName: "__start",
    },
    {
      name: "switch_task",
      taskReferenceName: "switch_task",
      inputParameters: {
        case_value_param: "${workflow.input.number}",
      },
      type: "SWITCH",
      decisionCases: {
        0: [
          {
            name: "task_5",
            taskReferenceName: "task_5",
            inputParameters: {},
            type: "SIMPLE",
            decisionCases: {},
            defaultCase: [],
            forkTasks: [],
            startDelay: 0,
            joinOn: [],
            optional: false,
            defaultExclusiveJoinTask: [],
            asyncComplete: false,
            loopOver: [],
          },
          {
            name: "task_6",
            taskReferenceName: "task_6",
            inputParameters: {},
            type: "SIMPLE",
            decisionCases: {},
            defaultCase: [],
            forkTasks: [],
            startDelay: 0,
            joinOn: [],
            optional: false,
            defaultExclusiveJoinTask: [],
            asyncComplete: false,
            loopOver: [],
          },
        ],
        1: [
          {
            name: "task_8",
            taskReferenceName: "task_8",
            inputParameters: {},
            type: "SIMPLE",
            decisionCases: {},
            defaultCase: [],
            forkTasks: [],
            startDelay: 0,
            joinOn: [],
            optional: false,
            defaultExclusiveJoinTask: [],
            asyncComplete: false,
            loopOver: [],
          },
          {
            name: "task_10",
            taskReferenceName: "task_10",
            inputParameters: {},
            type: "SIMPLE",
            decisionCases: {},
            defaultCase: [],
            forkTasks: [],
            startDelay: 0,
            joinOn: [],
            optional: false,
            defaultExclusiveJoinTask: [],
            asyncComplete: false,
            loopOver: [],
          },
        ],
      },
      defaultCase: [
        {
          name: "task_8",
          taskReferenceName: "task_8_default",
          inputParameters: {},
          type: "SIMPLE",
          decisionCases: {},
          defaultCase: [],
          forkTasks: [],
          startDelay: 0,
          joinOn: [],
          optional: false,
          defaultExclusiveJoinTask: [],
          asyncComplete: false,
          loopOver: [],
        },
      ],
      forkTasks: [],
      startDelay: 0,
      joinOn: [],
      optional: false,
      defaultExclusiveJoinTask: [],
      asyncComplete: false,
      loopOver: [],
      evaluatorType: "value-param",
      expression: "case_value_param",
    },
    {
      name: "task_10",
      taskReferenceName: "task_10_last",
      inputParameters: {},
      type: "SIMPLE",
      decisionCases: {},
      defaultCase: [],
      forkTasks: [],
      startDelay: 0,
      joinOn: [],
      optional: false,
      defaultExclusiveJoinTask: [],
      asyncComplete: false,
      loopOver: [],
    },
    {
      type: "TERMINAL",
      name: "final",
      taskReferenceName: "__final",
    },
  ],
  inputParameters: [],
  outputParameters: {},
  schemaVersion: 2,
  restartable: true,
  workflowStatusListenerEnabled: true,
  ownerEmail: "abc@example.com",
  timeoutPolicy: "ALERT_ONLY",
  timeoutSeconds: 0,
  failureWorkflow: "",
  variables: {},
  inputTemplate: {},
};

export const switchTasksWithTerminationNodes = {
  name: "loan_type",
  taskReferenceName: "loan_type",
  inputParameters: {
    loantype: "${customer_details.output.loantype}",
  },
  type: "SWITCH",
  decisionCases: {
    education: [
      {
        name: "education_details",
        taskReferenceName: "education_details",
        inputParameters: {},
        type: "SIMPLE",
        decisionCases: {},
        defaultCase: [],
        forkTasks: [],
        startDelay: 0,
        joinOn: [],
        optional: false,
        defaultExclusiveJoinTask: [],
        asyncComplete: false,
        loopOver: [],
      },
      {
        name: "terminate",
        taskReferenceName: "terminate0",
        inputParameters: {
          terminationStatus: "COMPLETED",
          workflowOutput: { result: "${task0.output}" },
        },
        type: "TERMINATE",
        startDelay: 0,
        optional: false,
      },
    ],
    property: [
      {
        name: "employment_details",
        taskReferenceName: "employment_details",
        inputParameters: {},
        type: "SIMPLE",
        decisionCases: {},
        defaultCase: [],
        forkTasks: [],
        startDelay: 0,
        joinOn: [],
        optional: false,
        defaultExclusiveJoinTask: [],
        asyncComplete: false,
        loopOver: [],
      },
      {
        name: "terminate",
        taskReferenceName: "terminate1",
        inputParameters: {
          terminationStatus: "COMPLETED",
          workflowOutput: { result: "${task0.output}" },
        },
        type: "TERMINATE",
        startDelay: 0,
        optional: false,
      },
    ],
  },
  defaultCase: [
    {
      name: "business_details",
      taskReferenceName: "business_details",
      inputParameters: {},
      type: "SIMPLE",
      decisionCases: {},
      defaultCase: [],
      forkTasks: [],
      startDelay: 0,
      joinOn: [],
      optional: false,
      defaultExclusiveJoinTask: [],
      asyncComplete: false,
      loopOver: [],
    },
    {
      name: "terminate",
      taskReferenceName: "terminate2",
      inputParameters: {
        terminationStatus: "COMPLETED",
        workflowOutput: { result: "${task0.output}" },
      },
      type: "TERMINATE",
      startDelay: 0,
      optional: false,
    },
  ],
  forkTasks: [],
  startDelay: 0,
  joinOn: [],
  optional: false,
  defaultExclusiveJoinTask: [],
  asyncComplete: false,
  loopOver: [],
  evaluatorType: "value-param",
  expression: "loantype",
};

export const lonleySwitchTask = {
  name: "loan_type",
  taskReferenceName: "loan_type",
  inputParameters: {
    loantype: "${customer_details.output.loantype}",
  },
  type: "SWITCH",
  decisionCases: {
    emptyCase: [],
    education: [
      {
        name: "education_details",
        taskReferenceName: "education_details",
        inputParameters: {},
        type: "SIMPLE",
        decisionCases: {},
        defaultCase: [],
        forkTasks: [],
        startDelay: 0,
        joinOn: [],
        optional: false,
        defaultExclusiveJoinTask: [],
        asyncComplete: false,
        loopOver: [],
      },
      {
        name: "education_details_verification",
        taskReferenceName: "education_details_verification",
        inputParameters: {},
        type: "SIMPLE",
        decisionCases: {},
        defaultCase: [],
        forkTasks: [],
        startDelay: 0,
        joinOn: [],
        optional: false,
        defaultExclusiveJoinTask: [],
        asyncComplete: false,
        loopOver: [],
      },
    ],
    property: [
      {
        name: "employment_details",
        taskReferenceName: "employment_details",
        inputParameters: {},
        type: "SIMPLE",
        decisionCases: {},
        defaultCase: [],
        forkTasks: [],
        startDelay: 0,
        joinOn: [],
        optional: false,
        defaultExclusiveJoinTask: [],
        asyncComplete: false,
        loopOver: [],
      },
      {
        name: "employment_details_verification",
        taskReferenceName: "employment_details_verification",
        inputParameters: {},
        type: "SIMPLE",
        decisionCases: {},
        defaultCase: [],
        forkTasks: [],
        startDelay: 0,
        joinOn: [],
        optional: false,
        defaultExclusiveJoinTask: [],
        asyncComplete: false,
        loopOver: [],
      },
    ],
    business: [
      {
        name: "business_details",
        taskReferenceName: "business_details",
        inputParameters: {},
        type: "SIMPLE",
        decisionCases: {},
        defaultCase: [],
        forkTasks: [],
        startDelay: 0,
        joinOn: [],
        optional: false,
        defaultExclusiveJoinTask: [],
        asyncComplete: false,
        loopOver: [],
      },
      {
        name: "business_details_verification",
        taskReferenceName: "business_details_verification",
        inputParameters: {},
        type: "SIMPLE",
        decisionCases: {},
        defaultCase: [],
        forkTasks: [],
        startDelay: 0,
        joinOn: [],
        optional: false,
        defaultExclusiveJoinTask: [],
        asyncComplete: false,
        loopOver: [],
      },
    ],
  },
  defaultCase: [
    {
      name: "business_details",
      taskReferenceName: "business_details",
      inputParameters: {},
      type: "SIMPLE",
      decisionCases: {},
      defaultCase: [],
      forkTasks: [],
      startDelay: 0,
      joinOn: [],
      optional: false,
      defaultExclusiveJoinTask: [],
      asyncComplete: false,
      loopOver: [],
    },
    {
      name: "business_details_verification",
      taskReferenceName: "business_details_verification",
      inputParameters: {},
      type: "SIMPLE",
      decisionCases: {},
      defaultCase: [],
      forkTasks: [],
      startDelay: 0,
      joinOn: [],
      optional: false,
      defaultExclusiveJoinTask: [],
      asyncComplete: false,
      loopOver: [],
    },
  ],
  forkTasks: [],
  startDelay: 0,
  joinOn: [],
  optional: false,
  defaultExclusiveJoinTask: [],
  asyncComplete: false,
  loopOver: [],
  evaluatorType: "value-param",
  expression: "loantype",
};

export const forkJoinTask = {
  name: "fork_join",
  taskReferenceName: "fork_ref",
  inputParameters: {},
  type: "FORK_JOIN",
  decisionCases: {},
  defaultCase: [],
  forkTasks: [
    [
      {
        name: "process_population_max",
        taskReferenceName: "process_population_max_ref",
        inputParameters: {
          body: "${get_population_data_ref.output.response.body}",
          queryExpression: "[.body.data[]] | max_by(.Population)",
        },
        type: "JSON_JQ_TRANSFORM",
        decisionCases: {},
        defaultCase: [],
        forkTasks: [],
        startDelay: 0,
        joinOn: [],
        optional: false,
        defaultExclusiveJoinTask: [],
        asyncComplete: false,
        loopOver: [],
      },
    ],
    [
      {
        name: "process_population_min",
        taskReferenceName: "process_population_min_ref",
        inputParameters: {
          body: "${get_population_data_ref.output.response.body}",
          queryExpression: "[.body.data[]] | min_by(.Population)",
        },
        type: "JSON_JQ_TRANSFORM",
        decisionCases: {},
        defaultCase: [],
        forkTasks: [],
        startDelay: 0,
        joinOn: [],
        optional: false,
        defaultExclusiveJoinTask: [],
        asyncComplete: false,
        loopOver: [],
      },
    ],
  ],
  startDelay: 0,
  joinOn: [],
  optional: false,
  defaultExclusiveJoinTask: [],
  asyncComplete: false,
  loopOver: [],
};

export const loanBanking = {
  createTime: 1658508370400,
  updateTime: 1649266893306,
  name: "loan_banking",
  description: "This workflow is to demo the loan banking process",
  version: 7,
  tasks: [
    {
      name: "customer_details",
      taskReferenceName: "customer_details",
      inputParameters: {},
      type: "SIMPLE",
      decisionCases: {},
      defaultCase: [],
      forkTasks: [],
      startDelay: 0,
      joinOn: [],
      optional: false,
      defaultExclusiveJoinTask: [],
      asyncComplete: false,
      loopOver: [],
    },
    {
      name: "loan_type",
      taskReferenceName: "loan_type",
      inputParameters: {
        loantype: "${customer_details.output.loantype}",
      },
      type: "SWITCH",
      decisionCases: {
        education: [
          {
            name: "education_details",
            taskReferenceName: "education_details",
            inputParameters: {},
            type: "SIMPLE",
            decisionCases: {},
            defaultCase: [],
            forkTasks: [],
            startDelay: 0,
            joinOn: [],
            optional: false,
            defaultExclusiveJoinTask: [],
            asyncComplete: false,
            loopOver: [],
          },
          {
            name: "education_details_verification",
            taskReferenceName: "education_details_verification",
            inputParameters: {},
            type: "SIMPLE",
            decisionCases: {},
            defaultCase: [],
            forkTasks: [],
            startDelay: 0,
            joinOn: [],
            optional: false,
            defaultExclusiveJoinTask: [],
            asyncComplete: false,
            loopOver: [],
          },
        ],
        property: [
          {
            name: "employment_details",
            taskReferenceName: "employment_details",
            inputParameters: {},
            type: "SIMPLE",
            decisionCases: {},
            defaultCase: [],
            forkTasks: [],
            startDelay: 0,
            joinOn: [],
            optional: false,
            defaultExclusiveJoinTask: [],
            asyncComplete: false,
            loopOver: [],
          },
          {
            name: "employment_details_verification",
            taskReferenceName: "employment_details_verification",
            inputParameters: {},
            type: "SIMPLE",
            decisionCases: {},
            defaultCase: [],
            forkTasks: [],
            startDelay: 0,
            joinOn: [],
            optional: false,
            defaultExclusiveJoinTask: [],
            asyncComplete: false,
            loopOver: [],
          },
        ],
      },
      defaultCase: [
        {
          name: "business_details",
          taskReferenceName: "business_details",
          inputParameters: {},
          type: "SIMPLE",
          decisionCases: {},
          defaultCase: [],
          forkTasks: [],
          startDelay: 0,
          joinOn: [],
          optional: false,
          defaultExclusiveJoinTask: [],
          asyncComplete: false,
          loopOver: [],
        },
        {
          name: "business_details_verification",
          taskReferenceName: "business_details_verification",
          inputParameters: {},
          type: "SIMPLE",
          decisionCases: {},
          defaultCase: [],
          forkTasks: [],
          startDelay: 0,
          joinOn: [],
          optional: false,
          defaultExclusiveJoinTask: [],
          asyncComplete: false,
          loopOver: [],
        },
      ],
      forkTasks: [],
      startDelay: 0,
      joinOn: [],
      optional: false,
      defaultExclusiveJoinTask: [],
      asyncComplete: false,
      loopOver: [],
      evaluatorType: "value-param",
      expression: "loantype",
    },
    {
      name: "credit_score_risk",
      taskReferenceName: "credit_score_risk",
      inputParameters: {},
      type: "SIMPLE",
      decisionCases: {},
      defaultCase: [],
      forkTasks: [],
      startDelay: 0,
      joinOn: [],
      optional: false,
      defaultExclusiveJoinTask: [],
      asyncComplete: false,
      loopOver: [],
    },
    {
      name: "credit_result",
      taskReferenceName: "credit_result",
      inputParameters: {
        creditScore: "${credit_score_risk.output.creditScore}",
      },
      type: "SWITCH",
      decisionCases: {
        possible: [
          {
            name: "principal_interest_calculation",
            taskReferenceName: "principal_interest_calculation",
            inputParameters: {},
            type: "SIMPLE",
            decisionCases: {},
            defaultCase: [],
            forkTasks: [],
            startDelay: 0,
            joinOn: [],
            optional: false,
            defaultExclusiveJoinTask: [],
            asyncComplete: false,
            loopOver: [],
          },
          {
            name: "customer_decision",
            taskReferenceName: "customer_decision",
            inputParameters: {
              decision: "${loan_offered_to_customer.output.decision}",
            },
            type: "SWITCH",
            decisionCases: {
              yes: [
                {
                  name: "loan_transfer_to_customer_account",
                  taskReferenceName: "loan_transfer_to_customer_account",
                  inputParameters: {},
                  type: "SIMPLE",
                  decisionCases: {},
                  defaultCase: [],
                  forkTasks: [],
                  startDelay: 0,
                  joinOn: [],
                  optional: false,
                  defaultExclusiveJoinTask: [],
                  asyncComplete: false,
                  loopOver: [],
                },
              ],
            },
            defaultCase: [
              {
                name: "terminate_due_to_customer_rejection",
                taskReferenceName: "terminate_due_to_customer_rejection",
                inputParameters: {
                  terminationStatus: "COMPLETED",
                },
                type: "TERMINATE",
                decisionCases: {},
                defaultCase: [],
                forkTasks: [],
                startDelay: 0,
                joinOn: [],
                optional: false,
                defaultExclusiveJoinTask: [],
                asyncComplete: false,
                loopOver: [],
              },
            ],
            forkTasks: [],
            startDelay: 0,
            joinOn: [],
            optional: false,
            defaultExclusiveJoinTask: [],
            asyncComplete: false,
            loopOver: [],
            evaluatorType: "javascript",
            expression: "$.decision=='yes' ? 'yes' : 'no' ",
          },
        ],
      },
      defaultCase: [
        {
          name: "terminate_due_to_bank_rejection",
          taskReferenceName: "terminate_due_to_bank_rejection",
          inputParameters: {
            terminationStatus: "COMPLETED",
          },
          type: "TERMINATE",
          decisionCases: {},
          defaultCase: [],
          forkTasks: [],
          startDelay: 0,
          joinOn: [],
          optional: false,
          defaultExclusiveJoinTask: [],
          asyncComplete: false,
          loopOver: [],
        },
      ],
      forkTasks: [],
      startDelay: 0,
      joinOn: [],
      optional: false,
      defaultExclusiveJoinTask: [],
      asyncComplete: false,
      loopOver: [],
      evaluatorType: "javascript",
      expression: "$.creditScore > 760 ? 'possible' : 'reject' ",
    },
  ],
  inputParameters: [],
  outputParameters: {},
  schemaVersion: 2,
  restartable: true,
  workflowStatusListenerEnabled: false,
  ownerEmail: "a8615897-dfaf-4d7d-a9ed-f3f78f7ef094@apps.orkes.io",
  timeoutPolicy: "ALERT_ONLY",
  timeoutSeconds: 0,
  failureWorkflow: "",
  variables: {},
  inputTemplate: {},
};

export const switchTaskCorrectlyTerminated = {
  name: "credit_result",
  taskReferenceName: "credit_result",
  inputParameters: {
    creditScore: "${credit_score_risk.output.creditScore}",
  },
  type: "SWITCH",
  decisionCases: {
    possible: [
      {
        name: "principal_interest_calculation",
        taskReferenceName: "principal_interest_calculation",
        inputParameters: {},
        type: "SIMPLE",
        decisionCases: {},
        defaultCase: [],
        forkTasks: [],
        startDelay: 0,
        joinOn: [],
        optional: false,
        defaultExclusiveJoinTask: [],
        asyncComplete: false,
        loopOver: [],
      },
      {
        name: "loan_offered_to_customer",
        taskReferenceName: "loan_offered_to_customer",
        inputParameters: {},
        type: "SIMPLE",
        decisionCases: {},
        defaultCase: [],
        forkTasks: [],
        startDelay: 0,
        joinOn: [],
        optional: false,
        defaultExclusiveJoinTask: [],
        asyncComplete: false,
        loopOver: [],
      },
      {
        name: "terminate_due_to_customer_rejection",
        taskReferenceName: "terminate_due_to_customer_rejection_b",
        inputParameters: {
          terminationStatus: "COMPLETED",
        },
        type: "TERMINATE",
        decisionCases: {},
        defaultCase: [],
        forkTasks: [],
        startDelay: 0,
        joinOn: [],
        optional: false,
        defaultExclusiveJoinTask: [],
        asyncComplete: false,
        loopOver: [],
      },
    ],
  },
  defaultCase: [
    {
      name: "terminate_due_to_customer_rejection",
      taskReferenceName: "terminate_due_to_customer_rejection",
      inputParameters: {
        terminationStatus: "COMPLETED",
      },
      type: "TERMINATE",
      decisionCases: {},
      defaultCase: [],
      forkTasks: [],
      startDelay: 0,
      joinOn: [],
      optional: false,
      defaultExclusiveJoinTask: [],
      asyncComplete: false,
      loopOver: [],
    },
  ],
  forkTasks: [],
  startDelay: 0,
  joinOn: [],
  optional: false,
  defaultExclusiveJoinTask: [],
  asyncComplete: false,
  loopOver: [],
  evaluatorType: "javascript",
  expression: "$.decision=='yes' ? 'yes' : 'no' ",
};

export const switchTaskOneNotTerminated = {
  name: "credit_result",
  taskReferenceName: "credit_result",
  inputParameters: {
    creditScore: "${credit_score_risk.output.creditScore}",
  },
  type: "SWITCH",
  decisionCases: {
    possible: [
      {
        name: "principal_interest_calculation",
        taskReferenceName: "principal_interest_calculation",
        inputParameters: {},
        type: "SIMPLE",
        decisionCases: {},
        defaultCase: [],
        forkTasks: [],
        startDelay: 0,
        joinOn: [],
        optional: false,
        defaultExclusiveJoinTask: [],
        asyncComplete: false,
        loopOver: [],
      },
      {
        name: "loan_offered_to_customer",
        taskReferenceName: "loan_offered_to_customer",
        inputParameters: {},
        type: "SIMPLE",
        decisionCases: {},
        defaultCase: [],
        forkTasks: [],
        startDelay: 0,
        joinOn: [],
        optional: false,
        defaultExclusiveJoinTask: [],
        asyncComplete: false,
        loopOver: [],
      },
    ],
  },
  defaultCase: [
    {
      name: "terminate_due_to_customer_rejection",
      taskReferenceName: "terminate_due_to_customer_rejection",
      inputParameters: {
        terminationStatus: "COMPLETED",
      },
      type: "TERMINATE",
      decisionCases: {},
      defaultCase: [],
      forkTasks: [],
      startDelay: 0,
      joinOn: [],
      optional: false,
      defaultExclusiveJoinTask: [],
      asyncComplete: false,
      loopOver: [],
    },
  ],
  forkTasks: [],
  startDelay: 0,
  joinOn: [],
  optional: false,
  defaultExclusiveJoinTask: [],
  asyncComplete: false,
  loopOver: [],
  evaluatorType: "javascript",
  expression: "$.decision=='yes' ? 'yes' : 'no' ",
};

export const switchWithinSwitchLeafNotTerminated = {
  name: "credit_result",
  taskReferenceName: "credit_result",
  inputParameters: {
    creditScore: "${credit_score_risk.output.creditScore}",
  },
  type: "SWITCH",
  decisionCases: {
    possible: [
      {
        name: "principal_interest_calculation",
        taskReferenceName: "principal_interest_calculation",
        inputParameters: {},
        type: "SIMPLE",
        decisionCases: {},
        defaultCase: [],
        forkTasks: [],
        startDelay: 0,
        joinOn: [],
        optional: false,
        defaultExclusiveJoinTask: [],
        asyncComplete: false,
        loopOver: [],
      },
      {
        name: "loan_offered_to_customer",
        taskReferenceName: "loan_offered_to_customer",
        inputParameters: {},
        type: "SIMPLE",
        decisionCases: {},
        defaultCase: [],
        forkTasks: [],
        startDelay: 0,
        joinOn: [],
        optional: false,
        defaultExclusiveJoinTask: [],
        asyncComplete: false,
        loopOver: [],
      },
      {
        name: "customer_decision",
        taskReferenceName: "customer_decision",
        inputParameters: {
          decision: "${loan_offered_to_customer.output.decision}",
        },
        type: "SWITCH",
        decisionCases: {
          yes: [
            {
              name: "loan_transfer_to_customer_account",
              taskReferenceName: "loan_transfer_to_customer_account",
              inputParameters: {},
              type: "SIMPLE",
              decisionCases: {},
              defaultCase: [],
              forkTasks: [],
              startDelay: 0,
              joinOn: [],
              optional: false,
              defaultExclusiveJoinTask: [],
              asyncComplete: false,
              loopOver: [],
            },
          ],
        },
        defaultCase: [
          {
            name: "terminate_due_to_customer_rejection",
            taskReferenceName: "terminate_due_to_customer_rejection",
            inputParameters: {
              terminationStatus: "COMPLETED",
            },
            type: "TERMINATE",
            decisionCases: {},
            defaultCase: [],
            forkTasks: [],
            startDelay: 0,
            joinOn: [],
            optional: false,
            defaultExclusiveJoinTask: [],
            asyncComplete: false,
            loopOver: [],
          },
        ],
        forkTasks: [],
        startDelay: 0,
        joinOn: [],
        optional: false,
        defaultExclusiveJoinTask: [],
        asyncComplete: false,
        loopOver: [],
        evaluatorType: "javascript",
        expression: "$.decision=='yes' ? 'yes' : 'no' ",
      },
    ],
  },
  defaultCase: [
    {
      name: "terminate_due_to_bank_rejection",
      taskReferenceName: "terminate_due_to_bank_rejection",
      inputParameters: {
        terminationStatus: "COMPLETED",
      },
      type: "TERMINATE",
      decisionCases: {},
      defaultCase: [],
      forkTasks: [],
      startDelay: 0,
      joinOn: [],
      optional: false,
      defaultExclusiveJoinTask: [],
      asyncComplete: false,
      loopOver: [],
    },
  ],
  forkTasks: [],
  startDelay: 0,
  joinOn: [],
  optional: false,
  defaultExclusiveJoinTask: [],
  asyncComplete: false,
  loopOver: [],
  evaluatorType: "javascript",
  expression: "$.creditScore > 760 ? 'possible' : 'reject' ",
};

export const taskStub = {
  id: "Get_repo_details_ref",
  text: "Get_repo_details",
  data: {
    task: {
      name: "Get_repo_details",
      taskReferenceName: "Get_repo_details_ref",
      inputParameters: {
        http_request: {
          uri: "https://api.github.com/repos/${workflow.input.gh_account}/${workflow.input.gh_repo}",
          method: "GET",
          headers: {
            Authorization: "token ${workflow.input.gh_token}",
            Accept: "application/vnd.github.v3.star+json",
          },
          connectionTimeOut: 2000,
          readTimeOut: 2000,
        },
        asyncComplete: false,
      },
      type: "HTTP",
      decisionCases: {},
      defaultCase: [],
      forkTasks: [],
      startDelay: 0,
      joinOn: [],
      optional: false,
      defaultExclusiveJoinTask: [],
      asyncComplete: false,
      loopOver: [],
      executionData: {
        status: "COMPLETED",
        executed: true,
        attempts: 1,
      },
    },
    crumbs: [
      {
        parent: null,
        ref: "calculate_start_cutoff_ref",
        refIdx: 0,
      },
      {
        parent: null,
        ref: "Get_repo_details_ref",
        refIdx: 1,
      },
    ],
    status: "COMPLETED",
    executed: true,
    attempts: 1,
    selected: false,
  },
  width: 350,
  height: 130,
};

export const unConnectedSwitchTask = {
  name: "sample_task_name_switch",
  taskReferenceName: "sample_task_name_h64r7_ref",
  inputParameters: {
    switchCaseValue: "",
  },
  type: "SWITCH",
  decisionCases: {},
  defaultCase: [],
  evaluatorType: "value-param",
  expression: "switchCaseValue",
};

export const unConnectedSwitch = {
  name: "unconnectedWF",
  description:
    "Edit or extend this sample workflow. Set the workflow name to get started",
  version: 1,
  tasks: [
    {
      name: "sample_task_name_event",
      taskReferenceName: "sample_task_name_4a2rf_ref",
      type: "EVENT",
      sink: "conductor:internal_event_name",
    },
    unConnectedSwitchTask,
    {
      name: "get_random_fact",
      taskReferenceName: "get_random_fact",
      inputParameters: {
        http_request: {
          uri: "https://catfact.ninja/fact",
          method: "GET",
          connectionTimeOut: 3000,
          readTimeOut: 3000,
        },
      },
      type: "HTTP",
    },
  ],
  inputParameters: [],
  outputParameters: {
    data: "${get_random_fact.output.response.body.fact}",
  },
  schemaVersion: 2,
  restartable: true,
  workflowStatusListenerEnabled: false,
  ownerEmail: "james.stuart@orkes.io",
  timeoutPolicy: "ALERT_ONLY",
  timeoutSeconds: 0,
};

export const switchTaskWithADecisionButNoTerminateTasks = {
  name: "sample_task_name_switch",
  taskReferenceName: "sample_task_name_h64r7_ref",
  inputParameters: {
    switchCaseValue: "",
  },
  type: "SWITCH",
  decisionCases: {
    some_case: [
      {
        name: "sample_task_name_http",
        taskReferenceName: "sample_task_name_yioskj_ref",
        type: "HTTP",
        inputParameters: {
          http_request: {
            uri: "https://orkes-api-tester.orkesconductor.com/get",
            method: "GET",
          },
        },
      },
    ],
  },
  defaultCase: [],
  evaluatorType: "value-param",
  expression: "switchCaseValue",
};

export const workflowWithASwitchWithoutTermination = {
  name: "unconnectedWF",
  description:
    "Edit or extend this sample workflow. Set the workflow name to get started",
  version: 1,
  tasks: [
    {
      name: "sample_task_name_event",
      taskReferenceName: "sample_task_name_4a2rf_ref",
      type: "EVENT",
      sink: "conductor:internal_event_name",
    },
    switchTaskWithADecisionButNoTerminateTasks,
    {
      name: "last_task",
      taskReferenceName: "last_task",
      inputParameters: {
        http_request: {
          uri: "https://catfact.ninja/fact",
          method: "GET",
          connectionTimeOut: 3000,
          readTimeOut: 3000,
        },
      },
      type: "HTTP",
    },
  ],
  inputParameters: [],
  outputParameters: {
    data: "${get_random_fact.output.response.body.fact}",
  },
  schemaVersion: 2,
  restartable: true,
  workflowStatusListenerEnabled: false,
  ownerEmail: "james.stuart@orkes.io",
  timeoutPolicy: "ALERT_ONLY",
  timeoutSeconds: 0,
};

export const workflowWithSwitchWithinSwitchUnterminated = {
  name: "nestedSwitch",
  description:
    "Edit or extend this sample workflow. Set the workflow name to get started",
  version: 1,
  tasks: [
    {
      name: "sample_task_name_event",
      taskReferenceName: "sample_task_name_4a2rf_ref",
      type: "EVENT",
      sink: "conductor:internal_event_name",
    },
    {
      name: "sample_task_name_switch",
      taskReferenceName: "sample_task_name_h64r7_ref",
      inputParameters: {
        switchCaseValue: "",
      },
      type: "SWITCH",
      decisionCases: {
        new_case_a65un: [
          {
            name: "sample_task_name_http",
            taskReferenceName: "sample_task_name_yioskj_ref",
            type: "HTTP",
            inputParameters: {
              http_request: {
                uri: "https://orkes-api-tester.orkesconductor.com/get",
                method: "GET",
              },
            },
          },
        ],
        case_going_to_switch: [
          {
            name: "sample_task_name_switch",
            taskReferenceName: "sample_task_name_lpskl_ref",
            inputParameters: {
              switchCaseValue: "",
            },
            type: "SWITCH",
            decisionCases: {
              nestedCase: [
                {
                  name: "sample_task_name_dynamic",
                  taskReferenceName: "sample_task_name_8sio6i_ref",
                  inputParameters: {
                    taskToExecute: "",
                  },
                  type: "DYNAMIC",
                  dynamicTaskNameParam: "taskToExecute",
                },
              ],
            },
            defaultCase: [],
            evaluatorType: "value-param",
            expression: "switchCaseValue",
          },
        ],
      },
      defaultCase: [],
      evaluatorType: "value-param",
      expression: "switchCaseValue",
    },
    {
      name: "last_task",
      taskReferenceName: "last_task",
      inputParameters: {
        http_request: {
          uri: "https://catfact.ninja/fact",
          method: "GET",
          connectionTimeOut: 3000,
          readTimeOut: 3000,
        },
      },
      type: "HTTP",
    },
  ],
  inputParameters: [],
  outputParameters: {
    data: "${get_random_fact.output.response.body.fact}",
  },
  schemaVersion: 2,
  restartable: true,
  workflowStatusListenerEnabled: false,
  ownerEmail: "james.stuart@orkes.io",
  timeoutPolicy: "ALERT_ONLY",
  timeoutSeconds: 0,
};

export const wfWithWhileWithSubWorkflow = {
  createTime: 1662500473363,
  updateTime: 1662503566660,
  name: "wf_with_while_with_sub",
  description: "Im changing the name now",
  version: 1,
  tasks: [
    {
      name: "get_random_fact",
      taskReferenceName: "get_random_fact",
      inputParameters: {
        http_request: {
          uri: "https://catfact.ninja/fact",
          method: "GET",
          connectionTimeOut: 3000,
          readTimeOut: 3000,
        },
      },
      type: "HTTP",
      decisionCases: {},
      defaultCase: [],
      forkTasks: [],
      startDelay: 0,
      joinOn: [],
      optional: false,
      defaultExclusiveJoinTask: [],
      asyncComplete: false,
      loopOver: [],
    },
    {
      name: "sample_task_name_do_while",
      taskReferenceName: "sample_task_name_do_while_yy67c_ref",
      inputParameters: {},
      type: "DO_WHILE",
      decisionCases: {},
      defaultCase: [],
      forkTasks: [],
      startDelay: 0,
      joinOn: [],
      optional: false,
      defaultExclusiveJoinTask: [],
      asyncComplete: false,
      loopCondition: "",
      loopOver: [
        {
          name: "sample_task_name_sub_workflow",
          taskReferenceName: "sample_task_name_sub_workflow_ref",
          inputParameters: {},
          type: "SUB_WORKFLOW",
          subWorkflowParam: {
            name: "testing_new_two",
            version: 1,
          },
        },
      ],
    },
  ],
  inputParameters: [],
  outputParameters: {
    data: "${get_random_fact.output.response.body.fact}",
  },
  schemaVersion: 2,
  restartable: true,
  workflowStatusListenerEnabled: false,
  ownerEmail: "james.stuart@orkes.io",
  timeoutPolicy: "ALERT_ONLY",
  timeoutSeconds: 0,
  variables: {},
  inputTemplate: {},
};

export const subWorkflowWithinAFork = {
  createTime: 1662500473363,
  updateTime: 1662503566660,
  name: "sub_workflow_within_a_fork",
  description: "Im changing the name now",
  version: 1,
  tasks: [
    {
      name: "get_random_fact",
      taskReferenceName: "get_random_fact",
      inputParameters: {
        http_request: {
          uri: "https://catfact.ninja/fact",
          method: "GET",
          connectionTimeOut: 3000,
          readTimeOut: 3000,
        },
      },
      type: "HTTP",
      decisionCases: {},
      defaultCase: [],
      forkTasks: [],
      startDelay: 0,
      joinOn: [],
      optional: false,
      defaultExclusiveJoinTask: [],
      asyncComplete: false,
      loopOver: [],
    },
    {
      name: "sample_task_name_fork",
      taskReferenceName: "sample_task_name_fork_8ksay_ref",
      inputParameters: {},
      type: "FORK_JOIN",
      decisionCases: {},
      defaultCase: [],
      forkTasks: [
        [
          {
            name: "sample_task_name_event",
            taskReferenceName: "sample_task_name_event_rws94_ref",
            type: "EVENT",
            sink: "conductor:internal_event_name",
          },
        ],
        [
          {
            name: "sample_task_name_sub_workflow",
            taskReferenceName: "sample_task_name_sub_workflow_ref",
            inputParameters: {},
            type: "SUB_WORKFLOW",
            subWorkflowParam: {
              name: "testing_new_two",
              version: 1,
            },
          },
        ],
      ],
    },
    {
      name: "sample_task_name_join",
      taskReferenceName: "sample_task_name_join_8rx5b_ref",
      inputParameters: {},
      type: "JOIN",
      decisionCases: {},
      defaultCase: [],
      forkTasks: [],
      startDelay: 0,
      joinOn: [],
      optional: false,
      asyncComplete: false,
    },
  ],
  inputParameters: [],
  outputParameters: {
    data: "${get_random_fact.output.response.body.fact}",
  },
  schemaVersion: 2,
  restartable: true,
  workflowStatusListenerEnabled: false,
  ownerEmail: "james.stuart@orkes.io",
  timeoutPolicy: "ALERT_ONLY",
  timeoutSeconds: 0,
  variables: {},
  inputTemplate: {},
};

export const workflowWithUnknownType = {
  updateTime: 1646331692036,
  name: "someWfName",
  description: "Image Processing Workflow",
  version: 1,
  tasks: [
    {
      name: "image_convert_resize_jim",
      taskReferenceName: "image_convert_resize_ref",
      inputParameters: {
        fileLocation: "${workflow.input.fileLocation}",
        outputFormat: "${workflow.input.recipeParameters.outputFormat}",
        outputWidth: "${workflow.input.recipeParameters.outputSize.width}",
        outputHeight: "${workflow.input.recipeParameters.outputSize.height}",
      },
      type: "UNKNOWN_TYPE",
      decisionCases: {},
      defaultCase: [],
      forkTasks: [],
      startDelay: 0,
      joinOn: [],
      optional: false,
      defaultExclusiveJoinTask: [],
      asyncComplete: false,
      loopOver: [],
    },
    {
      name: "upload_toS3_jim",
      taskReferenceName: "upload_toS3_ref",
      inputParameters: {
        fileLocation: "${image_convert_resize_ref.output.fileLocation}",
      },
      type: "SIMPLE",
      decisionCases: {},
      defaultCase: [],
      forkTasks: [],
      startDelay: 0,
      joinOn: [],
      optional: false,
      defaultExclusiveJoinTask: [],
      asyncComplete: false,
      loopOver: [],
    },
  ],
  inputParameters: [],
  outputParameters: {
    fileLocation: "${upload_toS3_ref.output.fileLocation}",
  },
  schemaVersion: 2,
  restartable: true,
  workflowStatusListenerEnabled: true,
  ownerEmail: "devrel@orkes.io",
  timeoutPolicy: "ALERT_ONLY",
  timeoutSeconds: 0,
  variables: {},
  inputTemplate: {},
};

export const nestedForkJoin = {
  name: "NewWorkflow_qcwhb",
  description:
    "Edit or extend this sample workflow. Set the workflow name to get started",
  version: 1,
  tasks: [
    {
      name: "get_random_fact",
      taskReferenceName: "get_random_fact",
      inputParameters: {
        http_request: {
          uri: "https://catfact.ninja/fact",
          method: "GET",
          connectionTimeOut: 3000,
          readTimeOut: 3000,
        },
      },
      type: "HTTP",
    },
    {
      name: "sample_task_name_fork_ytrlak_ref",
      taskReferenceName: "sample_task_name_fork_ytrlak_ref",
      inputParameters: {},
      type: "FORK_JOIN",
      decisionCases: {},
      defaultCase: [],
      forkTasks: [
        [
          {
            name: "sample_task_name_http_u9mzs_ref",
            taskReferenceName: "sample_task_name_http_u9mzs_ref",
            type: "HTTP",
            inputParameters: {
              http_request: {
                uri: "https://orkes-api-tester.orkesconductor.com/get",
                method: "GET",
                connectionTimeOut: 3000,
                readTimeOut: 3000,
              },
            },
          },
        ],
        [
          {
            name: "sample_task_name_event_erts_ref",
            taskReferenceName: "sample_task_name_event_erts_ref",
            type: "EVENT",
            sink: "conductor:internal_event_name",
          },
        ],
      ],
    },
    {
      name: "sample_task_name_join_fd9v1_ref",
      taskReferenceName: "sample_task_name_join_fd9v1_ref",
      inputParameters: {},
      type: "JOIN",
      decisionCases: {},
      defaultCase: [],
      forkTasks: [],
      startDelay: 0,
      joinOn: ["sample_task_name_http_u9mzs_ref"],
      optional: false,
      asyncComplete: false,
    },
    {
      name: "sample_task_name_http_mvwvv_ref",
      taskReferenceName: "sample_task_name_http_mvwvv_ref",
      type: "HTTP",
      inputParameters: {
        http_request: {
          uri: "https://orkes-api-tester.orkesconductor.com/get",
          method: "GET",
          connectionTimeOut: 3000,
          readTimeOut: 3000,
        },
      },
    },
    {
      name: "sample_task_name_join_a75or_ref",
      taskReferenceName: "sample_task_name_join_a75or_ref",
      inputParameters: {},
      type: "JOIN",
      decisionCases: {},
      defaultCase: [],
      forkTasks: [],
      startDelay: 0,
      joinOn: ["sample_task_name_event_erts_ref"],
      optional: false,
      asyncComplete: false,
    },
    {
      name: "sample_task_name_fork_6vg5rj_ref",
      taskReferenceName: "sample_task_name_fork_6vg5rj_ref",
      inputParameters: {},
      type: "FORK_JOIN",
      decisionCases: {},
      defaultCase: [],
      forkTasks: [
        [
          {
            name: "sample_task_name_kafka_publish_h9bubk_ref",
            taskReferenceName: "sample_task_name_kafka_publish_h9bubk_ref",
            type: "KAFKA_PUBLISH",
            inputParameters: {
              kafka_request: {
                topic: "userTopic",
                value: "Message to publish",
                bootStrapServers: "localhost:9092",
                headers: {
                  "X-Auth": "Auth-key",
                },
                key: "123",
                keySerializer:
                  "org.apache.kafka.common.serialization.IntegerSerializer",
              },
            },
          },
        ],
        [
          {
            name: "sample_task_name_http_wh3oz_ref",
            taskReferenceName: "sample_task_name_http_wh3oz_ref",
            type: "HTTP",
            inputParameters: {
              http_request: {
                uri: "https://orkes-api-tester.orkesconductor.com/get",
                method: "GET",
                connectionTimeOut: 3000,
                readTimeOut: 3000,
              },
            },
          },
        ],
      ],
    },
    {
      name: "sample_task_name_join_6fc3tf_ref",
      taskReferenceName: "sample_task_name_join_6fc3tf_ref",
      inputParameters: {},
      type: "JOIN",
      decisionCases: {},
      defaultCase: [],
      forkTasks: [],
      startDelay: 0,
      joinOn: [],
      optional: false,
      asyncComplete: false,
    },
    {
      name: "sample_task_name_switch_pm7wsj_ref",
      taskReferenceName: "sample_task_name_switch_pm7wsj_ref",
      inputParameters: {
        switchCaseValue: "",
      },
      type: "SWITCH",
      decisionCases: {
        new_case_ms0jy: [
          {
            name: "sample_task_name_simple_0xdkv_ref",
            taskReferenceName: "sample_task_name_simple_0xdkv_ref",
            type: "SIMPLE",
          },
          {
            name: "sample_task_name_fork_lx82h_ref",
            taskReferenceName: "sample_task_name_fork_lx82h_ref",
            inputParameters: {},
            type: "FORK_JOIN",
            decisionCases: {},
            defaultCase: [],
            forkTasks: [
              [
                {
                  name: "sample_task_name_inline_knvwp_ref",
                  taskReferenceName: "sample_task_name_inline_knvwp_ref",
                  type: "INLINE",
                  inputParameters: {
                    expression: "(function(){ return $.value1 + $.value2;})();",
                    evaluatorType: "graaljs",
                    value1: 1,
                    value2: 2,
                  },
                },
              ],
            ],
          },
          {
            name: "sample_task_name_join_uqholl_ref",
            taskReferenceName: "sample_task_name_join_uqholl_ref",
            inputParameters: {},
            type: "JOIN",
            decisionCases: {},
            defaultCase: [],
            forkTasks: [],
            startDelay: 0,
            joinOn: [],
            optional: false,
            asyncComplete: false,
          },
        ],
      },
      defaultCase: [],
      evaluatorType: "value-param",
      expression: "switchCaseValue",
    },
  ],
  inputParameters: [],
  outputParameters: {
    data: "${get_random_fact.output.response.body.fact}",
  },
  schemaVersion: 2,
  restartable: true,
  workflowStatusListenerEnabled: false,
  ownerEmail: "james.stuart@orkes.io",
  timeoutPolicy: "ALERT_ONLY",
  timeoutSeconds: 0,
};

export const unknownTaskTypeWf = {
  name: "NewWorkflow_6ns8k",
  description: "",
  version: 1,
  tasks: [
    {
      name: "event_task",
      taskReferenceName: "event_task_ref",
      type: "SOME_RANDOM_WRONG_TYPE",
      sink: "sqs:internal_event_name",
      inputParameters: {},
    },
  ],
  inputParameters: [],
  outputParameters: {},
  schemaVersion: 2,
  restartable: true,
  workflowStatusListenerEnabled: false,
  ownerEmail: "najeeb.thangal@orkes.io",
  timeoutPolicy: "ALERT_ONLY",
  timeoutSeconds: 0,
  failureWorkflow: "",
};

export const switchExecutionDefaultByEvaluationResultNull = {
  name: "pin_validation",
  taskReferenceName: "pin_validation",
  inputParameters: {
    case: "${workflow.input.case}",
  },
  type: "SWITCH",
  decisionCases: {
    "": [],
    "CASE-2": [],
    "CASE-1": [],
  },
  defaultCase: [
    {
      name: "http",
      taskReferenceName: "http_ref",
      inputParameters: {
        method: "GET",
        asyncComplete: false,
        readTimeOut: "3000",
        uri: "https://orkes-api-tester.orkesconductor.com/api",
        connectionTimeOut: 3000,
        contentType: "application/json",
        accept: "application/json",
      },
      type: "HTTP",
      decisionCases: {},
      defaultCase: [],
      forkTasks: [],
      startDelay: 0,
      joinOn: [],
      optional: false,
      rateLimited: false,
      defaultExclusiveJoinTask: [],
      asyncComplete: false,
      loopOver: [],
      onStateChange: {},
      executionData: {
        status: "COMPLETED",
        executed: true,
        attempts: 1,
        outputData: {
          response: {
            headers: {
              "Strict-Transport-Security": [
                "max-age=15724800; includeSubDomains",
              ],
              Connection: ["keep-alive"],
              "Content-Length": ["182"],
              Date: ["Fri, 12 Apr 2024 18:54:54 GMT"],
              "Content-Type": ["application/json"],
            },
            reasonPhrase: "OK",
            body: {
              randomInt: 2850,
              hostName: "orkes-api-sampler-67dfc8cf58-lp2np",
              randomString: "rvewnskyhuakqjctndpd",
              queryParams: {},
              sleepFor: "0 ms",
              apiRandomDelay: "0 ms",
              statusCode: "200",
            },
            statusCode: 200,
          },
        },
      },
    },
  ],
  forkTasks: [],
  startDelay: 0,
  joinOn: [],
  optional: false,
  rateLimited: false,
  defaultExclusiveJoinTask: [],
  asyncComplete: false,
  loopOver: [],
  evaluatorType: "graaljs",
  expression: "((\n  function () {\n    return $.case;\n  }\n))();",
  onStateChange: {},
  executionData: {
    status: "COMPLETED",
    executed: true,
    attempts: 1,
    outputData: {
      evaluationResult: ["null"],
      selectedCase: "null",
    },
  },
};

export const decisionExecutionDataWithValidCase = {
  name: "decision_gateway",
  taskReferenceName: "approval_decision",
  inputParameters: {
    case_value_param: "${inline_ref.output.result}",
  },
  type: "DECISION",
  caseValueParam: "case_value_param",
  decisionCases: {
    LOW: [
      {
        name: "http",
        taskReferenceName: "http_ref",
        inputParameters: {
          uri: "https://orkes-api-tester.orkesconductor.com/api",
          method: "GET",
          accept: "application/json",
          contentType: "application/json",
          encode: true,
        },
        type: "HTTP",
        decisionCases: {},
        defaultCase: [],
        forkTasks: [],
        startDelay: 0,
        joinOn: [],
        optional: false,
        defaultExclusiveJoinTask: [],
        asyncComplete: false,
        loopOver: [],
        onStateChange: {},
        permissive: false,
      },
    ],
    MEDIUM: [
      {
        name: "http_1",
        taskReferenceName: "http_ref_1",
        inputParameters: {
          uri: "https://orkes-api-tester.orkesconductor.com/api",
          method: "GET",
          accept: "application/json",
          contentType: "application/json",
          encode: true,
          asyncComplete: false,
        },
        type: "HTTP",
        decisionCases: {},
        defaultCase: [],
        forkTasks: [],
        startDelay: 0,
        joinOn: [],
        optional: false,
        defaultExclusiveJoinTask: [],
        asyncComplete: false,
        loopOver: [],
        onStateChange: {},
        permissive: false,
      },
    ],
    HIGH: [
      {
        name: "http_2",
        taskReferenceName: "http_ref_2",
        inputParameters: {
          uri: "https://orkes-api-tester.orkesconductor.com/api",
          method: "GET",
          accept: "application/json",
          contentType: "application/json",
          encode: true,
        },
        type: "HTTP",
        decisionCases: {},
        defaultCase: [],
        forkTasks: [],
        startDelay: 0,
        joinOn: [],
        optional: false,
        defaultExclusiveJoinTask: [],
        asyncComplete: false,
        loopOver: [],
        onStateChange: {},
        permissive: false,
      },
    ],
  },
  defaultCase: [
    {
      name: "http_3",
      taskReferenceName: "http_ref_3",
      inputParameters: {
        uri: "https://orkes-api-tester.orkesconductor.com/api",
        method: "GET",
        accept: "application/json",
        contentType: "application/json",
        encode: true,
      },
      type: "HTTP",
      decisionCases: {},
      defaultCase: [],
      forkTasks: [],
      startDelay: 0,
      joinOn: [],
      optional: false,
      defaultExclusiveJoinTask: [],
      asyncComplete: false,
      loopOver: [],
      onStateChange: {},
      permissive: false,
    },
  ],
  forkTasks: [],
  startDelay: 0,
  joinOn: [],
  optional: false,
  defaultExclusiveJoinTask: [],
  asyncComplete: false,
  loopOver: [],
  onStateChange: {},
  permissive: false,
};
