Skip to content

Commit 5ec947e

Browse files
authored
- AUTO-737 Add API endpoint to load flow execution context by its id (#254)
* - AUTO-737 Add API endpoint to load flow execution context by its id * - fix
1 parent 00d058e commit 5ec947e

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/automations/index.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,16 @@ export default class Automations {
2323
})
2424
}
2525

26+
async loadFlowExecutionContext(executionId) {
27+
if (!executionId || typeof executionId !== 'string') {
28+
throw new Error('The "executionId" argument must be provided and must be a string.')
29+
}
30+
31+
return this.app.request.get({
32+
url : this.app.urls.automationFlowExecutionContext(executionId),
33+
})
34+
}
35+
2636
async activateFlowById(flowId, initialData) {
2737
if (!flowId || typeof flowId !== 'string') {
2838
throw new Error('The "flowId" argument must be provided and must be a string.')

src/urls.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ export default class Urls {
2323
return `${this.automation()}/flow`
2424
}
2525

26+
automationFlowExecutionContext(executionId) {
27+
return `${this.automation()}/flow/execution-context/${executionId}`
28+
}
29+
2630
automationFlowTrigger() {
2731
return `${this.automationFlow()}/trigger`
2832
}

0 commit comments

Comments
 (0)