id: MainSubflow
name: Main Subflow
version: '1.0'
specVersion: '0.8'
description: Main subflow for ParallelState
functions:
  - name: sout
    type: custom
    operation: sysout
events:
  - name: MainEvent
    source: org.parallelstate.test
    type: mainEvent 
start: SleepForOneSecong
states: 
  - name: SleepForOneSecong
    type: sleep
    duration: PT1S
    transition: ShowFinishedMessage
  - name: ShowFinishedMessage
    type: operation
    stateDataFilter:
      input: "{msg: \"Main Subflow has finished\"}"
    actions:
      - name: showFinishedMessageAction
        functionRef:
          refName: sout
          arguments:
            message: ".msg"
    end: 
      terminate: true