id: AlternativeSubflow
name: Alternative subflow
version: '1.0'
specVersion: '0.8'
description: alternative subflow for parralel-state.sw.yml
functions:
  - name: soutPidFunction
    type: custom
    operation: sysout
events:
  - name: AlternativeEvent
    source: org.parallelstate.test
    type: alternativeEvent 
start: ShowPID
states: 
  - name: ShowPID
    type: operation
    actions:
      - name: showPidAction
        functionRef:
          refName: soutPidFunction
          arguments:
            message: "\"$WORKFLOW.instanceId\""
    transition: WaitForAlternativeEvent
  - name: WaitForAlternativeEvent
    type: event
    onEvents:
      - eventRefs:
          - AlternativeEvent
    end: 
      terminate: true