1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-06-08 18:20:20 +00:00

feat(viya): add runAsTask config feature for execution tasks

This commit is contained in:
mulahasanovic
2026-05-12 19:47:13 +02:00
parent 2db1b9fc4b
commit 3136e98477
2 changed files with 13 additions and 2 deletions
+5 -2
View File
@@ -102,6 +102,10 @@ export class WebJobExecutor extends BaseJobExecutor {
apiUrl += config.contextName?.trim()
? `&_contextname=${encodeURIComponent(config.contextName)}`
: ''
if (config.runAsTask === true) {
apiUrl += '&_executionTasks=true'
}
}
let requestParams = {
@@ -116,8 +120,7 @@ export class WebJobExecutor extends BaseJobExecutor {
// FIXME(viya - SAS Track CS0409737): remove when Viya stops rejecting empty multipart on
// _executionTasks=true. Dummy file keeps the body non-empty
const hasExecutionTasksFlag =
sasJob.includes('_executionTasks=true') || config.runAsTask === true
const hasExecutionTasksFlag = config.runAsTask === true
if (data) {
const stringifiedData = JSON.stringify(data)
+8
View File
@@ -79,6 +79,14 @@ export class SASjsConfig {
* may affect browser performance, especially with debug (logs) enabled.
*/
requestHistoryLimit?: number = 10
/**
* Optional setting. When `true`, the request runs as a Viya execution task —
* appends `_executionTasks=true` to the request URL. Only applies to the Viya
* web jobs path, i.e. when `serverType === SASVIYA` AND
* `useComputeApi` is `null`/`undefined`. Has no effect when `useComputeApi`
* is explicitly set to `true` or `false`.
*/
runAsTask?: boolean = false
}
export enum LoginMechanism {