WaitForKey
A simple loop to inspect the context for a specific key. If the key is not found after "iterations" loops, the script exits with a message.
python · xMatters
Details
| ID | WaitForKey |
|---|---|
| Language | python |
| From Version | 5.0.0 |
| Docker Image | demisto/python3:3.12.13.10116658 |
README
Waits for a context value to appear in the incident or 10 loops and exits.
Script Data
| Name | Description |
|---|---|
| Script Type | python |
| Tags | utility |
Dependencies
This script uses the following commands and scripts.
- sleep
Inputs
| Argument Name | Description |
|---|---|
| context_key | The incident context key to check for value |
| iterations | The maximum number of loops (and seconds) to wait before exiting if the context isn’t found. |
Outputs
There are no outputs for this script.
commonfields: id: WaitForKey version: -1 name: WaitForKey script: '' type: python tags: [] comment: 'A simple loop to inspect the context for a specific key. If the key is not found after "iterations" loops, the script exits with a message. ' enabled: true args: - name: context_key required: true description: The context key to wait for. - name: iterations required: true default: true description: The max number of iterations to loop before bailing. defaultValue: "10" scripttarget: 0 subtype: python3 dockerimage: demisto/python3:3.12.13.10116658 runas: DBotWeakRole fromversion: 5.0.0 tests: - No tests (auto formatted)