QR Codes ModuleLast Updated: 07/19/2016 Introduced in Verision: 2.0
This tutorial demonstrates how to use QR Codes Module in Decisions. QR Codes Module in Decisions was designed to expand Decisions functionality with QR Codes interaction. With this Module installed we are getting 3 new functions for our Flow Designer: Generate QR Code from Data, Get Data From QR Code, and Check if the Image has a valid QR Code.
In this example we are going to demonstrate simple functionality of the QR Codes Module. Mention that QR Codes may be received by the Workflow in Decisions over any possible way from the environments with which Decisions is designed to communicate.
We start with installing QR Codes Module. In the Portal, navigate to the System > Administration > Modules Folder, locate Decisions.QRCodes Module, right-click it and select Install Module action.
Note: to install Module in Decisions 3.5 or newer, please read the following document.
After QR Codes module installed, we navigate to the Designer Folder and click Create Flow on the Folder Actions Panel.
Next, we Name the Flow and click Create to proceed to the Flow Designer.
In the Flow Designer we add Show Form component from the Favorite Steps category. With this Form we are going to get text data from the User to encode it to the QR Code image.
Next, we Name the Form and click Create to proceed to the Form Designer.
This Form is designed with couple Labels, Text Box for User input and a Button. When finished, we can save the Form and close Form Designer.
Back in the Flow Designer, we add Generate QRCode step from the Integrations > All Integrations > QRCodes category.
Next, with the Generate QRCode step selected on the workspace we click Show Mapping Editor option.
In the Mapping Editor we select constant format for the QR Code and connect the Output from the Form Step to the Value field of the Generate QR Code step. Then, we save and close Mapping Editor.
Back in the Flow Designer we add another Show Form component from the Favorite Steps category. With this Form we are going to present Generated QR Code.
In the next window we Name the Form and click Create to proceed to the Form Designer.
We design this Form as following. We used Image component to display Generated QR Code. We Named Variable that holds Image component. Then, we added a Button component to close the Form. Save and close Form Designer when finished.
Back in the Flow Designer we add Does Image Has QR Code step from Integrations > All Integrations > QR Codes category. With this step we should be able to validate if our QR Code generator created a valid QR Code.
Then, we select Display QR Code step on the workspace and click Show Mapping Editor.
In the Mapping Editor we simply connect GenerateQRCode_Output to the Image Holder Variable on our Form. Save and close Mapping Editor.
Next, we select Does Image Has QR Code step on the workspace and Step Information window displays. In the Inputs section we use Select Value Mapping type for data field, and with Path selector we pick GenerateQRCode_Output which is the QR Code image that we displayed on the previous Form.
Then, we connect False outcome from Does Image Has QR Code step to the End step in our Flow. On the True outcome we add Get QRValue step from the Integrations > All Integrations > QR Codes category. With this step we should be able to Get data that is encoded in the QR Code image.
Next, with Get QRValue step selected on the workspace we use Select Value Mapping type for the data field in the Inputs section. Then, with the Path selector we pick GenerateQRCode_Output. Click Ok to close Path selector. Next, click Add Step.
On the Done outcome from the Get QRValue step we add Show Popup step from the Favorite Steps category. With this step we are going to create a Pop-up Notification with Data generated from the QR Code image.
Then, we configure constant Subject for the Pop-up notification. We Select Value of the GetQRValue_Output for the Message in the Pop-up Notification.
Finally, we connect Done outcome from the Show Popup step to the End Step in the Flow and this completes our Flow Design. We can click Debug Flow link on the top panel of the Flow Designer to test our Flow. Note that in Decisions version 3.5 and above, you’ll need to click Test Flow to access the Debugger.
User Input Form opens in the Debugger. We input some data into the Text Box and click Submit Button.
Flow generates QR Code for our data and displays it on the next Form. We click Get Data From QR Code to proceed.
The Flow validates QR Code Image, then gets data value from the QR Code and displays it on the Pop-up Notification. Debugger Diagram confirms that our Flow ran to the End step with no issues.