Qdabra Forms - Central Flows Guide Setting up Central Flows and adding workflow to your forms All manuals

Chapter 3 - Workflow steps

First draft. This chapter has not been reviewed yet and may contain mistakes. Please read it with that in mind, and tell us about anything that does not match what you see.

A Central Flows workflow is a list of steps (the statuses a form goes through) and, for each step, the action buttons that move the form to the next step and assign it to the next person. You define them per form template in the Central Flows Config form, without changing the template. This chapter uses a bug-tracking form as the example; Chapter 2 must be done first.

3.1 Open the Config form

  1. Open a form of your template in FormsViewer (for example Open from the FormsDesigner menu, or a new form from the template list).
  2. In the workflow task pane on the right, click the gear icon at the top right.
  3. The Central Flows Config form opens for this template. Its tabs are Approvals (the workflow steps), ProxyList, Admins and Custom Data. This chapter covers Approvals; proxies and admins are in Chapter 6.

The Approvals tab has two layouts: a table, and a card layout that shows each button as a card. Switch with the right-most button at the top of the Config form. Both edit the same steps.

3.2 How steps and buttons work

Setting Meaning
Button Label The text on the button, for example Approve
Step To The step the form moves to when the button is clicked. Enter the same step to stay in it (for example a Save button).
Assignee Who the form is assigned to next (section 3.3)
Condition Optional XPath expression; the button applies only when it is true (section 3.5)
Due Days Optional number of days until the task is due. Leave blank for no due date.

Clicking a button saves the form, moves it to the next step, assigns it, records the action in the history and, by default, e-mails the new assignee.

3.3 Assignee types

Assignee The form is assigned to
current The user who clicked the button. Typical for Save buttons, so the form stays in that user's queue.
previous The user the form was assigned to before. Typical for Approve / Reject, which send the form back to the submitter.
manager The manager of the user who clicked the button, from the user profile.
XPath The user in a form field. Enter the field's XPath, for example /my:myFields/my:AssignedToEmailAddress. In FormsDesigner, select the field in the Data Fields pane and use Copy XPath in its properties.
Static One specific user you enter.
Group A SharePoint group. Needs the Microsoft Graph environment variables (Chapter 1, section 1.6).
Distribution List A distribution list, chosen with a search box. Needs the Microsoft Graph environment variables.

An XPath assignee lets the person filling in the form choose who handles it: the workflow follows whatever the field contains.

3.4 Build the steps

  1. On the Approvals tab, the first step section is Step: New with one empty button row. Fill in the first button.
  2. Click + Action to add another button to the same step.
  3. Click + New Step to add a step, and type its name in the Step box.
  4. Use Delete Step to remove a step.
  5. Click the Save icon at the top right of the Config form.

Example: a bug-tracking workflow with four steps.

Step Button Label Step To Assignee
New Open Active XPath /my:myFields/my:AssignedToEmailAddress
New Save New current
Active Save Active current
Active Assign Active XPath /my:myFields/my:AssignedToEmailAddress
Active Resolve Resolved XPath /my:myFields/my:InitiatorEmailAddress
Resolved Save Resolved current
Resolved Reactivate Active XPath /my:myFields/my:AssignedToEmailAddress
Resolved Close Case Closed XPath /my:myFields/my:InitiatorEmailAddress
Closed Reopen Active XPath /my:myFields/my:AssignedToEmailAddress

A new bug is assigned to the developer named in the form when it is opened, goes back to the person who reported it when it is resolved, and can be reopened at any time.

3.5 Conditional buttons

Give two buttons the same label and different conditions to send the form to different places depending on its data. For example, expense reports up to 100 are approved at once, larger ones go to the manager:

Step Button Label Step To Assignee Condition
New Submit Submitted manager /my:expenseReport/my:items/my:total > 100
New Submit Approved current /my:expenseReport/my:items/my:total <= 100

In the card layout, click + Condition on a card and enter the XPath expression. Make sure that exactly one condition is true for any data, so that the button always has one destination.

3.6 What happens when a button is clicked

The workflow buttons already contain the usual submit checks, so you do not need your own Submit button:

If you are adding Central Flows to a form that already had a Submit button, move the button's own logic and then delete the button:

3.7 Keep form fields in step with the workflow

The workflow status lives in Central Flows. If your form has its own fields that should follow it, such as a Status field, a resolved date or the name of the person who closed the case, set them with rules on the workflow button:

  1. On the canvas, select the workflow button in the task pane and click Rules.
  2. Add an action rule, for example Update Status Field, with the condition Action is not equal to Save, and the action Set a field value: your Status field = WorkflowSteps_CentralFlows > WorkflowSteps > Rows > row > NextStatus.
  3. Add rules for the milestones you track, for example Action is equal to Resolve: set ResolvedDate to now(), and ResolvedBy to the current user's e-mail (v2_XtpLogic_CentralFlows > XtpLogic > Actions > SetCurrentUser > @email).
  4. Move these rules so that they run after Stop if No Workflow Step Applies and before Set Task Values in Main DS.

Action is the label of the clicked button, so the conditions use the labels from the Config form.

3.8 Test the workflow

  1. Save the template and open a new form. The task pane shows Status: New and the buttons of the New step.
  2. Fill in the form and click a button. The assignee receives an e-mail with a link to the form.
  3. Open the form from the link: the status and the buttons are those of the next step.
  4. Click the history icon in the footer to see each transition with its user, time and assignee.
  5. If something does not happen as expected, click the Solution Version text in the footer. A debug panel opens with the qRules commands the workflow ran and their results.

For help, active customers can use the Customer Support Portal. For anything else, use Contact Us or e-mail [email protected].

Next: Chapter 4 - E-mail notifications

© Qdabra Software  |  Questions and corrections: [email protected]  |  Preview copy, not linked from the public site.