document:
  dsl: '1.0.0-alpha5'
  namespace: test
  name: listen-to-any-until-consumed
  version: '0.1.0'
do:
  - callDoctor:
      listen:
        to:
          any:
            - with:
                type: com.fake-hospital.vitals.measurements.temperature
                data: ${ .temperature > 38 }
            - with:
                type: com.fake-hospital.vitals.measurements.bpm
                data: ${ .bpm < 60 or .bpm > 100 }
          until:
            one:
              with:
                type: com.fake-hospital.patient.checked-out