Skip to end of metadata
Go to start of metadata

Downloading the task box of a logged-in user

Path to servlet: api/activities/my

Method: GET

Parameters:

  • start - offset in the result set
  • limit - the maximum number of returned results

Answer:

  • The answer contains a list of objects storing information about the user's tasks.
Example answer
{
   "total":4,
   "data":[
      {
         "activityId":"901_901_api_zapisformularza_zadanie_1",
         "activityDefId":"zadanie_1",
         "activityName":"Zadanie 1",
		 "activityDescription":"Opis zadania",
		 "activityState":"RUNNING",
         "processName":"zapisFormularza 3/00002",
         "processId":"901_api_zapisformularza",
         "processDefId":"zapisformularza",
         "processDescription":"Opis procesu",
	     "processState":"RUNNING",
         "comingDate":1384344181635,
		 "finishDate":null
      },
      {
         "activityId":"801_801_api_zapisformularza_zadanie_1",
         "activityDefId":"zadanie_1",
         "activityName":"Zadanie 1",
		 "activityDescription":"Opis zadania",
		 "activityState":"RUNNING",
         "processName":"zapisFormularza 2/00002",
         "processId":"801_api_zapisformularza",
         "processDefId":"zapisformularza",
         "processDescription":"Opis procesu",
		 "processState":"RUNNING",
         "comingDate":1384257742840,
		 "finishDate":null
      },
      {
         "activityId":"701_701_api_zapisformularza_zadanie_1",
         "activityDefId":"zadanie_1",
         "activityName":"Zadanie 1",
		 "activityDescription":"Opis zadania",
		 "activityState":"RUNNING",
         "processName":"zapisFormularza 1/00002",
         "processId":"701_api_zapisformularza",
         "processDefId":"zapisformularza",
         "processDescription":"Opis procesu",
		 "processState":"RUNNING",
         "comingDate":1384241190607,
		 "finishDate":null
      },
      {
         "activityId":"601_601_api_proctest1_zadanie_1",
         "activityDefId":"zadanie_1",
         "activityName":"Zadanie 1",
		 "activityDescription":"Opis zadania",
		 "activityState":"RUNNING",
         "processName":"procTest1 1/00027",
         "processId":"601_api_proctest1",
         "processDefId":"proctest1",
         "processDescription":"Opis procesu",
		 "processState":"RUNNING",
         "comingDate":1383577844232,
		 "finishDate":null
      }
   ]
}

Downloading tasks performed by the user

Path to servlet: api/activities/my/executed

Method: GET

Parameters:

  • start - offset in the result set
  • limit - the maximum number of returned results

Answer:

  • The response contains a list of objects storing information about the user's tasks. The example is the same as "Downloading the task box of the logged-in user". In this case, the "finishDate" field is populated with the end date of the task.

Downloading task (from version 3.1.43)

Path to servlet: api/activities/{processId}/{activityId}

Method: GET

Parameters (transferred in the servlet path):

  • processId - id of the process to which the task belongs
  • activityId - id of the task we are downloading

Answer:

  • Response object storing information about the task.

    Example answer
    {
    	"activityId":"901_901_api_zapisformularza_zadanie_1",
        "activityDefId":"zadanie_1",
        "activityName":"Zadanie 1",
    	"activityDescription":"Opis zadania",
    	"activityState":"RUNNING",
        "processName":"zapisFormularza 3/00002",
        "processId":"901_api_zapisformularza",
        "processDefId":"zapisformularza",
        "processDescription":"Opis procesu",
    	"processState":"RUNNING",
        "comingDate":1384344181635,
    	"finishDate":null
    }

Tast acceptance

Path to servlet: api/activities/accept

Method: POST

Request Content-Typeapplication/json

 Content of the request:

  JSON object containing acceptance parameters. The definition should contain the following field:

    • processId - process Id
    • activityId - task Id
    • contextMap - Map of variable values
    • actionName - Name of the acceptance button action

Answer (JSON):

  • nextActivityId - id of the task if it exists and NEXT_ACTIVITY is defined
  • processId - process id

Getting the values of task variables

Path to servlet: api/activities/context

Method: GET

Parameters:

  • processId - process Id
  • activityId - task Id
  • extended - (Optional) Defaults to false. Returns extended variable values in the form of an object having a value field or an object having value and displayValue fields. For the moment, support for fields with the EXTYPE = USERNAME extended attribute has been introduced, which allows you to return an object containing the value (user login) and displayValue (name) fields.

Answer:

  • An object that stores variable values.

Saving the task variables

Path to servlet: api/activities/save

Method: POST

Request Content-Typeapplication/json

Content of the request:

JSON object containing acceptance parameters. The definition should contain the following field:

    • processId - process Id
    • activityId - task Id
    • contextMap - Map of variable values

Answer:

  • no answer

Task entry

Path to servlet: api/activities/open

Method: GET

Parameters:

  • processId - process Id
  • activityId - task Id

Answer:

  • no answer

Download open tasks

Path to servlet: api/activities/opened

Method: GET

Parameters:

  • processId - process Id

Answer:

  • List of objects storing information about open tasks in the specified process.
Example answer
[{
	"activityId":"32301_13101_pakiet_3871_proces_3871_zadanie_1",
	"activityDefId":"zadanie_1","activityName":"Zadanie 1",
	"activityDescription":"",
	"activityState":"RUNNING",
	"processName":"Proces 3871 13/00005",
	"processId":"13101_pakiet_3871_proces_3871",
	"processDefId":"proces_3871",
	"processDescription":"Proces 3871",
	"processState":"RUNNING",
	"comingDate":1492772683431,
	"finishDate":null
}]



 

  • No labels