Templates are created at the application level.
Templates can be utilized in the following scenarios:
Setting up External URL Data Sources in pages
Configuring Webhooks in workflows
At App Management > Developing Environment, on the side menu, click Template.
2. Click the ‘+ External URL’ button to create a new Template for External URL.
3. Fill in the ‘TEMPLATE NAME’
4. In the 1st step ‘Authentication’, you may select the way of Authorization then click ‘Continue’.
a. No Authorization (Please go to 2nd Step ‘Data Request’ if ‘No Authorization’ is selected.)
b. OAuth
5. For OAuth authorization, click ‘SET UP’ to configure the URL or JWL.
a. For URL, Click ‘+ URL Setting’ to set up the URL of authentication.
There is a preview for the URL after adding a component.
URL Editor supports the following components:
Text
Text inputted by App Designer
Constant
Constant created in Constant List
Variable
System Widgets
b. Set ‘Timeout (s)’ and ‘Token Key’.
Input the name of the returned token key and the key value will be stored to the System Variable ‘$OToken’.
If there are no values returned within the Timeout set, Dragonce will retry to get the value again.
c. Input Key Value Pair for Query, Header and Content, then click ‘Continue’.
Value can be encrypted in design time for data protection. The action of encryption is not reversible, that means it cannot be decrypted and shown in plain text after encrypted.
Constant
Constant created in Constant List
Variable
System Widgets
6. In the 2nd step ‘Data Request’, click ‘Set Up’ to set up the URL or JWL.
2. For the URL, set up the URL in the URL Editor, then click ‘OK’.
URL Editor supports the following components:
Text
Text inputted by App Designer
Constant
Constant created in Constant List
Variable
System Widgets, including Token Key widget
3. Fill in required information such as Timeout, Content Type and Key Value Pair(s) for Query, Header, and Content, then Click ‘Continue’.
Key Value Pair
Value can be encrypted in design time for data protection. The action of encryption is not reversible, that means it cannot be decrypted and shown in plain text after encrypted.
The Key Value Pair supports the following components:
Constant
Constant created in Constant List
Variable
System Widgets, including Token Key widget
4. In the 3rd step ‘Data Format’, input ‘Data Key’. Select the ‘Data Type’ and click ‘Continue’.
Required Checkbox: If there is missing key or wrong data type for any required data key, data key error will be hit and no value will be passed to other data keys.
Data Type: the widget type of DragOnce.
5. In the 4th step ‘Error Handling’, enter the number of Retry Count. You may skip the error checking or customize the error messages for each error type.
Retry Count is applicable to both OAuth and Data Request.
Error handling is available for the following error types:
Network Error
Timeout
HTTP error (400 or 500 series)
Empty Response
No response from the external API for Authentication or Data Request
Missing Token
No access token is returned in Authentication
This error will NOT be hit if the external data source is set as No Authorization
No Value for Constant
Any constant used in the external data source does not have value
Data Key Error
Missing data key from the external API
Wrong data type for any ‘required’ data key
If an empty string is returned for a data key and its data type is string, it will not be regarded as wrong data type. However, if the data type is integer/decimal/user picker, it will be regarded as wrong data type
6. Click ‘Finish’ to complete the settings.
After inputting the necessary information in the 1-4 steps in the External Data setting page, you can click ‘Test’ to perform testing.
2. Click ‘Start’ to try to retrieve data through the API call.
3. You can close the window after successful retrieval of values.