finos / symphony-wdk

Symphony Workflow Developer Kit (WDK), a bot capable of running workflows
Apache License 2.0
3 stars 10 forks source link

Condition on a form reply is not working #162

Closed yinan-symphony closed 2 years ago

yinan-symphony commented 2 years ago

Bug Report

given a workflow definition like

id: form-reply-conditional-message
activities:
  - send-message:
      id: testForm
      on:
        message-received:
          content: /test
      content: |
        <messageML>
          <p><b>Test</b></p>
          <form id="testForm">
            Hi, what can I do for you?
            <button name="create" type="action">Create</button>
            <button name="menu" type="action">Menu</button>
          </form>
        </messageML>
  - send-message:
      id: resCreate
      if: ${testForm.action=='create'}
      on:
        form-replied:
          form-id: testForm
          exclusive: true
      content:  Create
  - send-message:
      id: resMenu
      else: {}
      on:
        form-replied:
          form-id: testForm
          exclusive: true
      content: Menu
  - send-message:
      id: finish
      on:
        message-received:
          content: /continue
      content: DONE

the condition if: ${testForm.action=='create'} is not taken into account

Expected Result:

the workflow is running with the condition taken into account

Environment:

...version and build of the project, OS and runtime versions, virtualised environment (if any), etc. ...

Additional Context:

...add any other context about the problem here. If applicable, add screenshots to help explain...

symphony-soufiane commented 2 years ago

Fixed and will released in WDK 1.3.0

152