Download File

This post is referring to Vahana 2 (beta version). To check the document for production, please go to vDesigner-v1.0

When you configure the Download File task, it downloads the file from the configured URL-based location as a result of the user’s action. After the Download File task successfully downloads the file, it stores the file in the default app’s storage location on the device.

Steps to Configure

To configure the Download File task:

  1. On the Event Configuration page, find the Task panel.
  2. In the Task panel, search and find the Download File task.
  3. Drag the Download File task from the Task panel to the Execution block.
  4. Under Download File, a group of boxes appears.
  5. In the group of boxes, enter or select the values as follows:
BoxDescription
Reference NameIn this box, enter the name of the task. Also the system generates a reference name by default that you can change.
URLThis property allows you to configure the URL-based location that the Download File task accesses to download the file. You can configure the URL as follows:

a. Using Static function:-
You can use this option when you want to enter the URL string manually.

To use the Static function:
i. Click in the URL box, and a smart selector expands.
ii. The smart selector displays the list of different in-built functions, entities/objects, and app-level elements.
iii. In the Search box, enter Static, and then find the Static function.
iv. Select the Static function.
v. In the Static function, click the Number parameter, and a list expands.
vi. The list displays different parameters.


vii. In the list, select String.
viii. After you select the String data type, click the value parameter, and then enter the URL string in place of the value parameter.



When the application executes the Download File task, it accesses the URL string that you enter in place of the value parameter.  

b. Selecting an entity:-
You can use this option when you want the application to fetch the URL string from an entity. It means that the entity stores the URL string.

To select an entity:
i. Click in the URL box, and a smart selector expands.
ii. The smart selector displays the list of different in-built functions, entities/objects, and app-level elements.
iii. In the Search box, enter the entity’s name.
iv. After you find the entity’s name in the list, select it.

After you select an entity in the URL box, the Download File task accesses the URL string in the entity to download the file.  

c. Selecting an element:-
You can use this option when you want the application to fetch the URL string from an element.

To select the element:
i. Click in the URL box, and a smart selector expands.
ii. The smart selector displays the list of different in-built functions, entities/objects, and app-level elements.
iii. In the Search box, enter the element’s reference name.
iv. After you find the element’s reference name in the list, select it.
File NameIn this box, enter the name of the file (for example: – myvideo.mp4). After the Download File task downloads the intended file, it saves the file with the file name that you entered in the File Name box.
Instant ShareThis property provides the following options:
a. Yes This tab is selected by default. Selecting this option makes the file sharing feature available.
b. No Selecting this option makes the file sharing feature unavailable.
Business RuleIn this box, you can configure a business rule to determine the execution of the Download File task.  If the user’s action satisfies the condition in the business rule, the Download File task is executed.  

To configure the business rule:
a. In the Business Rule box, click the application tree icon (), and the Business Rule panel opens.
b. In the Business Rule panel, click Create New to configure a new business rule.
  1. After you configure the related properties, click Save to configure the Download File task.
Was this article helpful?
YesNo