Activities from Work portal completion data

<< Click to Display Table of Contents >>

Navigation:  Bizagi Studio > Bizagi from external applications > Bizagi API > OData services > Services index > Data services > Cases from Work portal > Activities from Work portal cases >

Activities from Work portal completion data

Overview

Bizagi features an OData service which handles aspects of the Experience design.

Through the Cases/Workitems URI, you can handle case data related to the pending activities of a user (not stakeholder), as described at Activities from Work portal cases.

This section describes how to query the list of activities of a given case.

 

Resource URL

Start with the following URL:

[your_bizagi_project_url]/odata/data/cases([ID_case])/workitems([ID_workitem])/next

 

Customizations:

[ID_case]: The GUID of a case as returned when invoking Cases from Work portal.

[ID_workitem]: The GUID of a workitem as returned when invoking Activities from Work portal cases.

[your_bizagi_project_url]: The URL where end users access the Bizagi Work portal.

For an on-premises Bizagi project, the URL would be:

https://[your_server]/[your_project]/odata/data/cases([ID_case])/workitems([ID_workitem])/next

For Automation Service projects, the URL would be:

https://[project_environment]-[your_project]-[your_company].bizagi.com/odata/data/cases([ID_case])/workitems([ID_workitem])/next

 

Example

To complete a workitem, invoke the URL described above using an HTTP POST.

Consider including the following JSON structure in the body to send parameters:

{

      "startParameters": [

       {

           "xpath": "[xpath_name]",

           "type": "[xpath_datatype]",

           "value": "[value_for_xpath]"

       }

   ]

}

 

Customizations:

[xpath_name]: The exact Xpath  expected by parameters of the workitem.

[xpath_datatype]: The data type for the Xpath expected by each parameter..

[value_for_xpath]: The value you want to set to the Xpath parameter.

 

If you have more than one parameter, use:

{

      "startParameters": [

       {

           "xpath": "[xpath1_name]",

           "type": "[xpath1_datatype]",

           "value": "[value_for_xpath1]"

       },

       {

           "xpath": "[xpath2_name]",

           "type": "[xpath2_datatype]",

           "value": "[value_for_xpath2]"

       }

   ]

}

 

If no parameters are expected (not explicitly required), use:

{

 "startParameters": [

 ]

}

 

To filter the search with parameters, consider the notes for the different data types, as described at Values and formats for data types.

To dynamically obtain business values that you may need as an input parameter to start a new process, refer to Related entities services.

 

The following image illustrates data in the body you can send in an HTTP POST.

 

OData_Next2

 

The response you obtain confirming the completion of the activity or event contains the current workitems of the case.

 

The next image shows a previous invocation regarding parameters that the process expects (as you would need to send the exact data type and matching Xpath information):

 

OData_Workitems_types