Skip to content

DRAFT - AUTO-737 Add API endpoint to load flow execution context by its id #254

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/automations/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@ export default class Automations {
})
}

async loadFlowExecutionContext(executionId) {
if (!executionId || typeof executionId !== 'string') {
throw new Error('The "executionId" argument must be provided and must be a string.')
}

return this.app.request.get({
url : this.app.urls.automationFlowExecutionContext(executionId),
})
}

async activateFlowById(flowId, initialData) {
if (!flowId || typeof flowId !== 'string') {
throw new Error('The "flowId" argument must be provided and must be a string.')
Expand Down
4 changes: 4 additions & 0 deletions src/urls.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ export default class Urls {
return `${this.automation()}/flow`
}

automationFlowExecutionContext(executionId) {
return `${this.automation()}/flow/execution-context/${executionId}`
}

automationFlowTrigger() {
return `${this.automationFlow()}/trigger`
}
Expand Down