activity (switch)

Parent: activity

Applies whentype = switch

Direct Properties:

PropertyTypeRequiredDefault ValueDetails
namestringYesdata type=string; maxLen=255
Enter a name for the workflow activity.
typeenumYesdata type=string; lov=PLUGINS
Valid values: switch

Property Groups:

  • switch
  • compare
  • condition
  • genAI
  • source
  • additionalData
  • deadline
  • layout
  • parallelFlow
  • advanced
  • comments
switch
PropertyTypeRequiredDefault ValueDetails
typeenumYestrueFalseCheckdata type=string; maxLen=4000; lov=STATIC
Valid values: case trueFalseCheck checkWorkflowVar if
switch {
  type: case
}
compare
PropertyTypeRequiredDefault ValueDetails
dataTypeenumYesvarchar2data type=string; maxLen=4000; lov=STATIC
Valid values: boolean timestampWithTimeZone timestamp timestampWithLocalTimeZone number varchar2
Applies whentype = CASE
compareTypeenumYessqlQuerydata type=string; maxLen=4000; lov=STATIC
Valid values: functionBody sqlQuery expression
Applies whentype = CASE
compareVarstringYesdata type=string; maxLen=4000; textCase=UPPER
Applies whentype = CHECK_WF_VARIABLE
compareSqlQuerystringYesdata type=string; maxLen=4000
Applies whentype = CASE and compare_type = SQL_QUERY
comparePlsqlExpressionstringYesdata type=string; maxLen=4000
Applies whentype = CASE and compare_type = EXPRESSION
comparePlsqlFunctionBodystringYesdata type=string; maxLen=4000
Applies whentype = CASE and compare_type = FUNCTION_BODY
compareLanguageenumYesplsqldata type=string; lov=STATIC
Valid values: plsql js-mle
Applies whentype = CASE and compare_type in (EXPRESSION)type = CASE and compare_type in (FUNCTION_BODY)
compare {
  dataType: boolean
  compareType: functionBody
  compareVar: value
  compareSqlQuery: value
  comparePlsqlExpression: value
  comparePlsqlFunctionBody: value
  compareLanguage: plsql
}
condition
PropertyTypeRequiredDefault ValueDetails
conditionTypeenumYesrowsReturneddata type=string; maxLen=4000; lov=STATIC
Valid values: workflowVarIsNotNull rowsReturned workflowVarNotEqualsValue workflowVarIsNull rowsNotReturned workflowVarEqualsValue expression functionBody
Applies whentype = TRUE_FALSE_CHECK
sqlQuerystringYesdata type=string; maxLen=4000
Applies whentype = TRUE_FALSE_CHECK and condition_type in (ROWS_RETURNED)type = TRUE_FALSE_CHECK and condition_type in (ROWS_NOT_RETURNED)
plsqlExpressionstringYesdata type=string; maxLen=4000
Applies whentype = TRUE_FALSE_CHECK and condition_type = EXPRESSION
languageenumYesplsqldata type=string; lov=STATIC
Valid values: plsql js-mle
Applies whentype = TRUE_FALSE_CHECK and condition_type in (EXPRESSION)type = TRUE_FALSE_CHECK and condition_type in (FUNCTION_BODY)
plsqlFunctionBodystringYesdata type=string; maxLen=4000
Applies whentype = TRUE_FALSE_CHECK and condition_type = FUNCTION_BODY
workflowVarstringYesdata type=string; maxLen=4000; textCase=UPPER
Applies whentype = TRUE_FALSE_CHECK and condition_type in (WF_VARIABLE_NULL)type = TRUE_FALSE_CHECK and condition_type in (WF_VARIABLE_NOT_NULL)type = TRUE_FALSE_CHECK and condition_type in (WF_VARIABLE_EQ_VAL)type = TRUE_FALSE_CHECK and condition_type in (WF_VARIABLE_NEQ_VAL)
valuestringYesdata type=string; maxLen=4000
Applies whentype = TRUE_FALSE_CHECK and condition_type in (WF_VARIABLE_EQ_VAL)type = TRUE_FALSE_CHECK and condition_type in (WF_VARIABLE_NEQ_VAL)
condition {
  conditionType: workflowVarIsNotNull
  sqlQuery: value
  plsqlExpression: value
  language: plsql
  plsqlFunctionBody: value
  workflowVar: value
  value: value
}
genAI
PropertyTypeRequiredDefault ValueDetails
enabledbooleanYesfalsedata type=boolean
agentreferenceNodata type=reference; lov=COMPONENT; references=aiAgent
Applies whenenabled = true
servicereferenceNodata type=reference; lov=COMPONENT; references=genAIService
Applies whenenabled = true
systemPromptmultiline stringNodata type=multiline string; maxLen=32767
Applies whenenabled = true
genAI {
  enabled: false
  agent: @component
  service: @component
  systemPrompt: ```
    value
  ```
}
source
PropertyTypeRequiredDefault ValueDetails
locationenumYeslocalDatabasedata type=string; lov=STATIC
Valid values: localDatabase restEnabledSql
languageenumYesplsqldata type=string; lov=STATIC
Valid values: plsql javaScript-mle
Applies whenlocation = localDatabase
plsqlCodemultiline stringYesdata type=multiline string; maxLen=32767
Applies whenlocation = localDatabase and language = plsql
javaScriptCodemultiline stringYesdata type=multiline string; maxLen=32767
Applies whenlocation = localDatabase and language = javaScript-mle
remoteServerreferenceYesdata type=reference; lov=COMPONENT; references=restEnabledSqlDatabase
Applies whenlocation = restEnabledSql
plsqlCodemultiline stringYesdata type=multiline string; maxLen=32767
Applies whenlocation = restEnabledSql
Enter the PL/SQL code to be executed on the remote database.
source {
  location: localDatabase
  language: plsql
  plsqlCode: ```plsql
    value
  ```
  javaScriptCode: ```javascript-mle
    value
  ```
  remoteServer: @component
}
additionalData
PropertyTypeRequiredDefault ValueDetails
sqlQuerymultiline stringNodata type=multiline string; maxLen=4000

Enter a SQL query to read additional data.

The column names of the query can be used as bind variables and substitution strings to evaluate conditions or activity variables during the execution of the activity.

The result of the query should contain only one row.

If the query returns no result or more than one row then the activity fails during execution.

additionalData {
  sqlQuery: ```sql
    value
  ```
}
deadline
PropertyTypeRequiredDefault ValueDetails
dueOnTypeenumNodata type=string; lov=STATIC
Valid values: interval sqlQuery expression functionBody schedulerExpression
intervalstringYesdata type=string; maxLen=255
Applies whendueOnType = interval
sqlQuerymultiline stringYesdata type=multiline string; maxLen=4000
Applies whendueOnType = sqlQuery
languageenumYesplsqldata type=string; lov=STATIC
Valid values: sql plsql javaScript-mle
Applies whendueOnType = expression
sqlExpressionmultiline stringYesdata type=multiline string; maxLen=4000
Applies whendueOnType = expression and language = sql
plsqlExpressionmultiline stringYesdata type=multiline string; maxLen=4000
Applies whendueOnType = expression and language = plsql
javaScriptExpressionmultiline stringYesdata type=multiline string; maxLen=4000
Applies whendueOnType = expression and language = javaScript-mle
languageenumYesplsqldata type=string; lov=STATIC
Valid values: plsql javaScript-mle
Applies whendueOnType = functionBody
plsqlFunctionBodymultiline stringYesdata type=multiline string; maxLen=4000
Applies whendueOnType = functionBody and language = plsql
javaScriptFunctionBodymultiline stringYesdata type=multiline string; maxLen=4000
Applies whendueOnType = functionBody and language = javaScript-mle
schedulerExpressionmultiline stringYesdata type=multiline string; maxLen=255
Applies whendueOnType = schedulerExpression
deadline {
  dueOnType: interval
  interval: value
  sqlQuery: ```sql
    value
  ```
  language: sql
  sqlExpression: ```sql
    value
  ```
  plsqlExpression: ```plsql
    value
  ```
  javaScriptExpression: ```javascript-mle
    value
  ```
  plsqlFunctionBody: ```plsql
    value
  ```
  javaScriptFunctionBody: ```javascript-mle
    value
  ```
  schedulerExpression: ```
    value
  ```
}
layout
PropertyTypeRequiredDefault ValueDetails
sequencenumberYesdata type=number; maxLen=22
layout {
  sequence: 42
}
parallelFlow
PropertyTypeRequiredDefault ValueDetails
branchreferenceNodata type=reference; lov=COMPONENT; references=branch
parallelFlow {
  branch: @component
}
advanced
PropertyTypeRequiredDefault ValueDetails
staticIdstringYesdata type=string; maxLen=255
labelstringNodata type=string; maxLen=4000
diagramstringNodata type=string; maxLen=32767
advanced {
  staticId: value
  label: value
  diagram: value
}
comments
PropertyTypeRequiredDefault ValueDetails
commentsmultiline stringNodata type=multiline string; maxLen=4000
comments {
  comments: ```
    value
  ```
}

APEXlang Example

activity sample (
    name: value
    type: switch
    switch {
        type: case
    }
    compare {
        dataType: boolean
        compareType: functionBody
        compareVar: value
        compareSqlQuery: value
        comparePlsqlExpression: value
        comparePlsqlFunctionBody: value
        compareLanguage: plsql
    }
    condition {
        conditionType: workflowVarIsNotNull
        sqlQuery: value
        plsqlExpression: value
        language: plsql
        plsqlFunctionBody: value
        workflowVar: value
        value: value
    }
    genAI {
        enabled: false
        agent: @component
        service: @component
        systemPrompt: ```
          value
        ```
    }
    source {
        location: localDatabase
        language: plsql
        plsqlCode: ```plsql
          value
        ```
        javaScriptCode: ```javascript-mle
          value
        ```
        remoteServer: @component
    }
    additionalData {
        sqlQuery: ```sql
          value
        ```
    }
    deadline {
        dueOnType: interval
        interval: value
        sqlQuery: ```sql
          value
        ```
        language: sql
        sqlExpression: ```sql
          value
        ```
        plsqlExpression: ```plsql
          value
        ```
        javaScriptExpression: ```javascript-mle
          value
        ```
        plsqlFunctionBody: ```plsql
          value
        ```
        javaScriptFunctionBody: ```javascript-mle
          value
        ```
        schedulerExpression: ```
          value
        ```
    }
    layout {
        sequence: 42
    }
    parallelFlow {
        branch: @component
    }
    advanced {
        staticId: value
        label: value
        diagram: value
    }
    comments {
        comments: ```
          value
        ```
    }
)