Swimlanes.io is a free webapp for making sequence diagrams. You simply edit the text on the left and the diagram is updated in real time. You can download your sequence diagrams as images or distribute with a link.
Title: Rendering a form with the evaluateFormRules mutation group: Before initial render Your system -> Awell API: Retrieve the form via the `form` query Awell API --> Your system: Returns the form definition Your system -> Awell API: What questions need to be visible (`evaluateFormRules` mutation) Awell API --> Your system: Returns an array of questions that should be visible or hidden based on the display logic note: Example: assuming a form has 4 questions: Q1, Q2, Q3, and Q4 the response can be interpreted as: Q1, Q2, and Q3 are visible and Q4 should be hidden. ``` { "data":{ "evaluateFormRules":{ "results":[ { "question_id":"Q3", "satisfied":true }, { "question_id":"Q4", "satisfied":false } ] } } } ``` end group: Initial render Your system --> Your system: Render form in the front-end with only the visible questions (Q1, Q2, and Q3) end group: On every question being answered Your system -> Awell API: Send intermediary response to know what questions need to be visible (`evaluateFormRules` mutation) Awell API --> Your system: Returns an updated array of questions that should be visible or hidden based on the display logic note: Example: assuming a form has 4 questions: Q1, Q2, Q3, and Q4 the response can be interpreted as: Q1, Q2, Q3, and Q4 are visible. ``` { "data":{ "evaluateFormRules":{ "results":[ { "question_id":"Q3", "satisfied":true }, { "question_id":"Q4", "satisfied":true } ] } } } ``` Your system --> Your system: Update form in the front-end to show all questions that should be visible. end