category: Tutorial
name: subScenario
uri: /subScenarios
method: POST
commands:
  - command: script
    kwargs:
      code: context.logger.info("Start Sub")
  - command: sleep
    kwargs:
      seconds: '3'
  - command: script
    kwargs:
      code: context.logger.info("End Sub")
request_timeout: 60
connect_timeout: 60
spec:
  response:
    normal:
      codes:
        - 200
  request:
    body:
      type: object
      properties:
        orderNumber:
          type: string
      required:
        - orderNumber
transaction:
  enable: true
  async: true
  xname_use_counter: true
  auto_begin: true
  auto_response: true
  xname: sequenceNo
  callback_options:
    method: POST
    url: /mainScenarios/callback
    xglobals_only_body: true
  xdomain: Tutorial
  xtype: sub
routing_auto_generation_mode: true
global_variables:
  orderNumber:
    initial: context.request.body.orderNumber
    description: Transaction name of parent scenario
routing_options:
  scope: local