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

Chapter 2 - Adding Central Flows to a form

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.

This chapter turns an ordinary form template into a Central Flows form. You add the Central Flows XTP in FormsDesigner, connect it to qRules, choose where the form is submitted, and adjust e-mail, buttons, session timeout and Authy. The server side (Chapter 1) must be in place first.

The XTP also inserts an instruction section at the bottom of the form with these same steps. This chapter follows that section and adds where to click in FormsDesigner; delete the instruction section when you are done (section 2.13).

Most steps change rules in the XTP's own data source, v2_XtpLogic_CentralFlows. To edit one: in the Data Fields pane switch the data source to v2_XtpLogic_CentralFlows (Secondary), expand to the node named in the step, select it and click Rules.

2.1 Add the XTP

  1. Upload your form template to FormsViewer and click Design to open it in FormsDesigner.
  2. Click at the very bottom of the form canvas, outside any section or table.
  3. In the ribbon open Add XTP, choose Central Flows, and click +.
  4. The XTP adds its data sources, rules, view elements and resource files. The template is now Central Flows-enabled.

2.2 Add qRules

Central Flows runs on qRules. If the qRules ribbon tab does not say "This form already has qRules!", add qRules from that tab.

2.3 Set the form title

In the section the XTP inserted, replace the text My FormName with the title users should see.

2.4 Start the XTP when the form opens

  1. Switch the data source to QdabraRules (Secondary), select finishedLoading and click Rules.
  2. Add a rule and move it to the top of the list, so it runs first.
  3. Add the action Set a field value: field XtpLogic/Actions/RunOnLoad in v2_XtpLogic_CentralFlows, value go.

finishedLoading is the first trigger that runs rules when a form opens (see the FormsDesigner User Manual, section 1.6.1).

2.5 Connect the XTP to qRules

The XTP sends its qRules commands through temporary fields, which you point at the real QdabraRules fields once:

  1. In v2_XtpLogic_CentralFlows, select XtpLogic/qRulesTemp/tempCommand and open the rule *Set qRules.
  2. First action: change the field it sets from @stop to QdabraRules > Command.
  3. Second action: change the placeholder value to QdabraRules > Result.
  4. Do the same for the next actions: tempSuccess to QdabraRules > Success and tempError to QdabraRules > Error.

Pick each field with Insert Field or Group and switch the picker to QdabraRules (Secondary); do not type the names. The Dynamic Data Connections XTP uses the same pattern (FormsDesigner User Manual, section 7.4).

2.6 Check the environment variables

The XTP reads the DBXL address, user key mode, database name and optional Microsoft Graph keys from the FormsViewer environment variables set in Chapter 1, section 1.6. Nothing about them is stored in the template.

2.7 Choose where the form is submitted

Central Flows can submit the form to a SharePoint library or to DBXL. Set up one of the two.

2.7.1 SharePoint library

Have the SharePoint library ready before you start.

  1. In v2_XtpLogic_CentralFlows, select XtpLogic/Actions/SetSubmitMode, open the rule * Set Submit Mode, and set SubmitMode to SharePoint.
  2. Add a Submit to SharePoint Library data connection. For FileName, click fx, then Insert Field or Group, and pick v2_XtpLogic_CentralFlows > XtpLogic > Values > FormName.
  3. Select XtpLogic/Actions/SetShPLibraryName, open the rule * Set SharePoint Library Name, and enter the library's name.
  4. Select XtpLogic/Actions/SharePointSubmit and open the rule * Submit SharePoint. Remove the action that sets @stop to an empty value, add a Submit data action, and select the connection from step 2.

Use the library's internal name, not its display name. It is the part of the library's address just before /Forms/, for example ExpenseReports in https://yourtenant.sharepoint.com/sites/YourSite/ExpenseReports/Forms/AllItems.aspx.

2.7.2 DBXL

Select XtpLogic/Actions/DbxlActions/DbxlSubmit, open the rule * Set Values for DBXL Submit, and enter the name of the DBXL document type that stores this form.

2.8 Fix the duplicate-button rule

In the XTP section on the canvas, select the repeating section that shows the workflow buttons and click Rules. Open the formatting rule Hide if Same Button, click its Condition, and replace the expression 1 with:

count(preceding-sibling::*[CurrentStatus = current()/CurrentStatus and Action = current()/Action]) > 0

This hides a button when an earlier row already shows the same action for the same status.

2.9 E-mail notifications

Out of the box, every workflow action sends the Central Flows standard e-mail to the new assignee, through a DBXL e-mail mapping that you set up once. To skip it for some actions or states, or to send your own e-mail instead, see Chapter 4, section 4.4.

The XTP adds a footer section, my_footer, at the bottom of the form. It has three parts:

text concat("Solution Version: ", substring-before(substring-after(/processing-instruction()[local-name(.) = "mso-infoPathSolution"], 'solutionVersion="'), '"'))

2.11 Session timeout

The form warns an inactive user after 10 minutes and then counts down 60 seconds before signing them out and releasing the lock. To change the times, switch the data source to InactivityCheck_CentralFlows, select FormLogic/Actions/CheckInactivity/@triggerCheckInactivity, and edit the rule ** Set Time Durations (10m60s).

2.12 Optional: Authy verification

Skip this section unless you want users to confirm their identity with a smartphone (Authy) when they open the form. To use it, select XtpLogic/Actions/SetCurrentUser in v2_XtpLogic_CentralFlows, open the rule *Run Authy, and set your Twilio API key (see "Create Authy API Key" in the package).

2.13 Finish

  1. Delete the XTP's instruction section from the canvas (it ends with "Delete this entire section if no longer needed").
  2. Save the template.
  3. Open a new form from FormsViewer and check that it loads without errors and shows the task pane.
  4. Define the workflow steps of this template in the Central Flows Config form (Chapter 3).

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

Next: Chapter 3 - Workflow steps

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