Advertisement
frenky666

Untitled

Oct 26th, 2021
1,220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.45 KB | None | 0 0
  1. ---
  2. id: 42
  3. name: Test
  4. requestPath: /demo/jdbc
  5. requestMethod: POST
  6. requestType: JSON
  7. requestVariableName: request
  8. steps:
  9.   - _type: adapter
  10.     adapterLanguage: GROOVY
  11.     variableName: parsed
  12.     adapterScript: |
  13.      fromJson request
  14.   - _type: conditional
  15.     conditions:
  16.       - _type: when
  17.         expression: a == 'test'
  18.         steps:
  19.           - _type: jdbc
  20.             type: SELECT
  21.             url: jdbc:postgresql://localhost:5432/test
  22.             username: test
  23.             password: pass
  24.             variableName: rd
  25.             script: |
  26.              SELECT *
  27.               FROM test_table
  28.               <#if id??>
  29.               WHERE id = :id
  30.               </#if>
  31.           - _type: conditional
  32.             conditions:
  33.               - _type: when
  34.                 expression: false
  35.                 steps:
  36.                   - _type: call
  37.                     requestUrl: http://localhost:8888/do
  38.                     requestMethod: POST
  39.                     requestVariableName: test
  40.                     responseVariableName: bla
  41.                   - _type: jdbc
  42.                      type: UPDATE
  43.                      url: jdbc:postgresql://localhost:5432/test
  44.                      username: test
  45.                      password: pass
  46.                      variableName: rd
  47.                      script: |
  48.                       INSERT INTO test_table (value)
  49.                        VALUES(:value)
  50.                        </#if>
  51.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement