Create process
Description: Creates a process as a logged in user
Path to servlet: api/processes/create
Method: POST
Request Content-Type: application/json
Query Content:
JSON object containing acceptance parameters. The definition should contain the following field:
- packageId - package Id
- processDefId - process definition Id
- variables - A map of variable values in which the key is the id of the variable.
{ "packageId" : "test package", "processDefId" : "test_package", "variables" : { "variable_integer" : 99, "variable_text" : "text", "variable_date" : "2021-10-11", "variable_amount" : 2.23, "variable_float" : 1.90, "variable_bloolean" : true, "variable_textfield" : "text box", "variable_user_system" : "admin", "variable_user_system_table" : "anowak", "variable_date-time" : "2021-12-26 09:15:23" } }
The date type variable must be passed as a string in the format "yyyy-MM-dd" and the date and time type variable in the format "yyyy-MM-dd HH:mm:ss". Custom variables like List of system users, Table of system users, etc. should be passed as text (in this case, it is user login).
//If there is no open task for the logged-in user after the process is created {"processId":"3911_suncode_api_proctest1","activityId":null,"hasOpenActivity":false} //If there is an open task for a logged-in user after the process is created {"processId":"3912_suncode_api_proctest2","activityId":"4512_3912_suncode_api_proctest2_zadanie_1","hasOpenActivity":true}
Get available process types for a user
Description: Get the list of available process types for the logged in user
Path to servlet: api/processes/types
Method: GET
Query Content:
No parameters
Answer:
List of process types
[ { "name":"Proces 1", "description":"", "packageId":"simple", "processDefId":"proces_1" }, { "name":"Change of task user", "description":"Replacing the user assigned to a task", "packageId":"change_user", "processDefId":"zmiana_uzytkownika" } ]
Get task information for a given process definition identifier
Description: Retrieves task information for a given process definition Id
Path to servlet: api/processes/definition/{processDefinitionId}/activities
Method: GET
Parameters (passed in servlet path):
- processDefinitionId - id of the process definition from which to retrieve task information
Answer:
List of tasks (definition and name) from the latest package
[ { "activityDefinitionId": "task_1", "activityName": "Task 1" }, { "activityDefinitionId": "user_change", "activityName": "Change of task user" } ]