Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The JSON Tool enables one to issue a JSON webservice call and to save the returned data into Joget's form data or/and into the process's workflow variable.

Image Added
Figure 1: JSON Tool Properties - Configure JSON Tool

Image Added
Figure 2: JSON Tool Properties - Store to Form

Image Added
Figure 3: JSON Tool Properties - Store to Workflow Variable

In figure 2 and 3, one will need to specify on how to treat the returned data. The returned data may be saved as form data or/add to be saved into process's workflow variable. The example used in this article shows on how one can store multi-row data into a form data table.

Sample JSON API: http://localhost:8080/jw/web/json/workflow/package/list

Sample JSON Result: ?

Code Block
langjavascript
{
    "data": [
        {
            "packageName": "CRM",
            "packageId": "crm"
        },
        {
            "packageName": "Dashboard",
            "packageId": "dashboard"
        },
        {
            "packageName": "HR Expense App",
            "packageId": "hr_expense"
        },
        {
            "packageName": "ISR",
            "packageId": "isr"
        },
        {
            "packageName": "JSON App",
            "packageId": "jsonApp"
        },
        {
            "packageName": "Leave App",
            "packageId": "leaveApp"
        }
    ]
}

Image Added
Figure 4: Sample JSON data saved in Joget form data table