Expanse Load-Create List Deprecated

Deprecated. No available replacement. Sub-playbook to support Expanse Handle Incident playbook. Loads a list to be used in the Expanse playbook. Creates the list if it does not exist.

Cortex Xpanse by Palo Alto Networks (Deprecated) · 8 tasks · 2 inputs · 1 output

Details

IDExpanse Load-Create List
From Version6.0.0
Tasks8

README

Sub-playbook to support Expanse Handle Incident playbook.
Loads a list to be used in the Expanse playbook.
Creates the list if it does not exist.

Dependencies

This playbook uses the following sub-playbooks, integrations, and scripts.

Sub-playbooks

This playbook does not use any sub-playbooks.

Integrations

This playbook does not use any integrations.

Scripts

  • Set
  • IsListExist

Commands

  • setList
  • createList
  • getList

Playbook Inputs


Name Description Default Value Required
ListName Name of the list to load. List will be created if it does not exist or is empty.   Required
ListValues If the list does not exist or is empty, it will be created with these values. In case this input is empty, the default value would be “{}”.   Optional

Playbook Outputs


Path Description Type
ParsedList Contents of parsed list. unknown

Playbook Image


Expanse Load_Create List

Inputs

  • ListName — Name of the list to load. List will be created if it does not exist or is empty.
  • ListValues — If the list does not exist or is empty, it will be created with these values. In case this input is empty, the default value would be "{}".

Outputs

  • ParsedList — Contents of parsed list.

Commands used

createList getList setList

Flowchart

YES yes Start Start List Exists? - IsListExist List Exists? IsListExist Load List - getList Load List getList Create List - createList Create List createList Set Context - Set Set Context Set Is List Empty? Is List Empty? Done Done Set Empty List - setList Set Empty List setList
id: Expanse Load-Create List
version: -1
contentitemexportablefields:
  contentitemfields: {}
name: Expanse Load-Create List
deprecated: true
description: |
  Deprecated. No available replacement.
  Sub-playbook to support Expanse Handle Incident playbook.
  Loads a list to be used in the Expanse playbook.
  Creates the list if it does not exist.
starttaskid: "0"
tasks:
  "0":
    id: "0"
    taskid: fb25ef07-66ee-4752-857c-fc5357c3d3c0
    type: start
    task:
      id: fb25ef07-66ee-4752-857c-fc5357c3d3c0
      version: -1
      name: ""
      iscommand: false
      brand: ""
      description: ''
    nexttasks:
      '#none#':
      - "1"
    separatecontext: false
    continueonerrortype: ""
    view: |-
      {
        "position": {
          "x": 450,
          "y": 50
        }
      }
    note: false
    timertriggers: []
    ignoreworker: false
    skipunavailable: false
    quietmode: 0
    isoversize: false
    isautoswitchedtoquietmode: false
  "1":
    id: "1"
    taskid: 5d981e49-dca5-49ca-88c1-c81fe74e6b7c
    type: condition
    task:
      id: 5d981e49-dca5-49ca-88c1-c81fe74e6b7c
      version: -1
      name: List Exists?
      description: Check if the list exists in the Cortex XSOAR lists.
      scriptName: IsListExist
      type: condition
      iscommand: false
      brand: ""
    nexttasks:
      '#default#':
      - "3"
      "YES":
      - "2"
    scriptarguments:
      listName:
        simple: ${inputs.ListName}
    separatecontext: false
    continueonerrortype: ""
    view: |-
      {
        "position": {
          "x": 450,
          "y": 190
        }
      }
    note: false
    timertriggers: []
    ignoreworker: false
    skipunavailable: false
    quietmode: 0
    isoversize: false
    isautoswitchedtoquietmode: false
  "2":
    id: "2"
    taskid: a10ccb67-3c4d-4d93-8f8e-347a7fed3ed2
    type: regular
    task:
      id: a10ccb67-3c4d-4d93-8f8e-347a7fed3ed2
      version: -1
      name: Load List
      description: commands.local.cmd.list.get
      script: Builtin|||getList
      type: regular
      iscommand: true
      brand: Builtin
    nexttasks:
      '#none#':
      - "5"
    scriptarguments:
      extend-context:
        simple: ListText=.
      listName:
        simple: ${inputs.ListName}
    separatecontext: false
    continueonerrortype: ""
    view: |-
      {
        "position": {
          "x": 450,
          "y": 610
        }
      }
    note: false
    timertriggers: []
    ignoreworker: false
    skipunavailable: false
    quietmode: 0
    isoversize: false
    isautoswitchedtoquietmode: false
  "3":
    id: "3"
    taskid: f2275753-2d8c-4889-80da-b68f2ffa374c
    type: regular
    task:
      id: f2275753-2d8c-4889-80da-b68f2ffa374c
      version: -1
      name: Create List
      description: commands.local.cmd.list.create
      script: Builtin|||createList
      type: regular
      iscommand: true
      brand: Builtin
    nexttasks:
      '#none#':
      - "2"
    scriptarguments:
      listData:
        complex:
          root: inputs.ListValues
          transformers:
          - operator: If-Then-Else
            args:
              condition: {}
              else:
                value:
                  simple: inputs.ListValues
                iscontext: true
              equals: {}
              lhs:
                value:
                  simple: inputs.ListValues
                iscontext: true
              options: {}
              rhs: {}
              then:
                value:
                  simple: '{}'
      listName:
        simple: ${inputs.ListName}
    separatecontext: false
    continueonerrortype: ""
    view: |-
      {
        "position": {
          "x": 730,
          "y": 410
        }
      }
    note: false
    timertriggers: []
    ignoreworker: false
    skipunavailable: false
    quietmode: 0
    isoversize: false
    isautoswitchedtoquietmode: false
  "4":
    id: "4"
    taskid: fe3567cd-6f29-4922-8f74-b55d77a7bec9
    type: regular
    task:
      id: fe3567cd-6f29-4922-8f74-b55d77a7bec9
      version: -1
      name: Set Context
      description: Set a value in context under the key you entered.
      scriptName: Set
      type: regular
      iscommand: false
      brand: ""
    nexttasks:
      '#none#':
      - "6"
    scriptarguments:
      key:
        simple: ParsedList
      value:
        complex:
          root: ListText
          transformers:
          - operator: SetIfEmpty
            args:
              applyIfEmpty: {}
              defaultValue:
                value:
                  simple: '{}'
          - operator: ParseJSON
    separatecontext: false
    continueonerrortype: ""
    view: |-
      {
        "position": {
          "x": 450,
          "y": 1180
        }
      }
    note: false
    timertriggers: []
    ignoreworker: false
    skipunavailable: false
    quietmode: 0
    isoversize: false
    isautoswitchedtoquietmode: false
  "5":
    id: "5"
    taskid: 7c96c26f-3044-4f59-8aa3-72d2fdecd1eb
    type: condition
    task:
      id: 7c96c26f-3044-4f59-8aa3-72d2fdecd1eb
      version: -1
      name: Is List Empty?
      description: Check if list is empty.
      type: condition
      iscommand: false
      brand: ""
    nexttasks:
      '#default#':
      - "4"
      "yes":
      - "8"
    separatecontext: false
    conditions:
    - label: "yes"
      condition:
      - - operator: isEmpty
          left:
            value:
              complex:
                root: ListText
            iscontext: true
          right:
            value: {}
    continueonerrortype: ""
    view: |-
      {
        "position": {
          "x": 450,
          "y": 800
        }
      }
    note: false
    timertriggers: []
    ignoreworker: false
    skipunavailable: false
    quietmode: 0
    isoversize: false
    isautoswitchedtoquietmode: false
  "6":
    id: "6"
    taskid: 004d92d9-a2fd-42aa-816c-b49d20f0bb24
    type: title
    task:
      id: 004d92d9-a2fd-42aa-816c-b49d20f0bb24
      version: -1
      name: Done
      type: title
      iscommand: false
      brand: ""
      description: ''
    separatecontext: false
    continueonerrortype: ""
    view: |-
      {
        "position": {
          "x": 450,
          "y": 1370
        }
      }
    note: false
    timertriggers: []
    ignoreworker: false
    skipunavailable: false
    quietmode: 0
    isoversize: false
    isautoswitchedtoquietmode: false
  "8":
    id: "8"
    taskid: 9228e6e2-2e0f-493c-8963-397b35f924bc
    type: regular
    task:
      id: 9228e6e2-2e0f-493c-8963-397b35f924bc
      version: -1
      name: Set Empty List
      description: commands.local.cmd.list.set
      script: Builtin|||setList
      type: regular
      iscommand: true
      brand: Builtin
    nexttasks:
      '#none#':
      - "4"
    scriptarguments:
      listData:
        complex:
          root: inputs.ListValues
          transformers:
          - operator: If-Then-Else
            args:
              condition: {}
              else:
                value:
                  simple: inputs.ListValues
                iscontext: true
              equals: {}
              lhs:
                value:
                  simple: inputs.ListValues
                iscontext: true
              options: {}
              rhs: {}
              then:
                value:
                  simple: '{}'
      listName:
        simple: ${inputs.ListName}
    separatecontext: false
    continueonerrortype: ""
    view: |-
      {
        "position": {
          "x": 720,
          "y": 1000
        }
      }
    note: false
    timertriggers: []
    ignoreworker: false
    skipunavailable: false
    quietmode: 0
    isoversize: false
    isautoswitchedtoquietmode: false
system: true
view: |-
  {
    "linkLabelsPosition": {},
    "paper": {
      "dimensions": {
        "height": 1385,
        "width": 660,
        "x": 450,
        "y": 50
      }
    }
  }
inputs:
- key: ListName
  value: {}
  required: true
  description: Name of the list to load. List will be created if it does not exist or is empty.
  playbookInputQuery:
- key: ListValues
  value: {}
  required: false
  description: If the list does not exist or is empty, it will be created with these values. In case this input is empty, the default value would be "{}".
  playbookInputQuery:
outputs:
- contextPath: ParsedList
  description: Contents of parsed list.
  type: unknown
tests:
- No tests (auto formatted)
fromversion: 6.0.0