Configuring Invoke API Task

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

In relation to the API widget, this post focuses on how to configure an API instance for a task. In the vDesigner module, when you design an application, you impart the function behavior to the app by configuring several events in the app.

When you configure an event, you configure one or more tasks in the event to impart full functional behavior to the app. In the similar fashion, to consume an API, you can configure Invoke API task in an event.

When a user performs a function on a related element, the configured event triggers and then executes the Invoke API task. After the event executes the Invoke API task, it invokes the configured API so that the API performs the intended job.

To configure the Invoke API task:

  1. On the vDesigner app’s dashboard, see the left navigation panel.
  2. In the left navigation panel, see the Task Group icon ().
  3. Click the Task Group icon, and a dialog box opens.
  4. In the dialog box, click Proceed if you have saved changes in the application, the middle panel displays the Task Group Manager page.

Note:- If you have not saved the unsaved changes in the application, click Cancel to close the dialog box and save changes, and then click the Task Group icon to access the Task Group Manager page.

  1. The Task Group Manager page displays the list of earlier created task groups.
  2. Under the Name column, find a task group (for example, Task_GRP_1).
  3. After you find the task group, put the mouse pointer on its name (for example, Task_GRP_1), and an Edit icon () comes into view.
  4. Click the Edit icon (), and the <<Task Group Name>> page opens.
  5. On the <<Task Group Name>> page, see the Task panel.
  6. In the Task panel, in the Search box, enter Invoke API.
  1. After you find the Invoke API task, drag it to the Execution panel.
  2. After you drag the task to the Execution panel, the Invoke API task expands and then displays a group of properties.
  3. Configure these properties as follows:
Reference NameBy default, this box displays the unique reference name of the task. You can also enter a new reference name for the task.

The vDesigner module uses the reference name to manage the task at the app level.
APIThis property allows you to select an API’s instance. After you select an API’s instance, the app invokes this API as a result of the user’s action.

To select an API:
a. In the API box, click the application tree icon (), and the APIs panel comes into view.
b. The APIs panel displays one or more APIs in tile format.
c. In the APIs panel, click to select an API that you want the app to invoke after the user performs the related function in the app.
d. After you select the API, an Info panel comes into view and then displays the details of the selected API.
e. After you make sure that the API’s details are correct, click Select to configure the API.
f. After you configure the API, the API box starts displaying its name.
Business RuleThis property allows you to build a business rule related to the task’s execution. If the user’s action satisfies the condition in the business rule, the Invoke API 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 CreateNew to configure the new business rule.  
  1. After you configure the related properties, click Save to configure the Invoke API task.
Was this article helpful?