cancel
Showing results for 
Search instead for 
Did you mean: 

Starting process instance via REST

anoopmonish
Champ on-the-rise
Champ on-the-rise
tried sending this as body to POST request /activiti-app/api/enterprise/process-definitions.

{
     "processDefinitionId":"testprocess:1:707196",
     "name":"processapp",
     "values":
     {  
          "name":"",
          "department":"XYZ",
          "year":"2016"
     }
}


response:

{
  "message": "No start form has been found for process definition: testprocess:1:707196",
  "messageKey": "GENERAL.ERROR.NOT-FOUND"
}


how do we send variables as input before starting the process..
runtimeService.startProcessInstanceById(id, variableMap) - tried this it works.

but how do we pass variables via rest call.. is it not possible without a startform.?

Thanks,

4 REPLIES 4

anoopmonish
Champ on-the-rise
Champ on-the-rise
correction in question: *
i used this  -    /activiti-app/api/enterprise/process-instances.
not this      -    /activiti-app/api/enterprise/process-definitions.

trademak
Star Contributor
Star Contributor
Hi,

You can use the /api/runtime/process-instances REST service for this purpose.
This REST service is documented here:

http://activiti.org/userguide/index.html#_start_a_process_instance

Best regards,

sudheerm
Champ in-the-making
Champ in-the-making
Hi Tijs,

will you please let me know the Enterprise equivalent REST API for the above .

thanks In Advance.

jbarrez
Star Contributor
Star Contributor
Check the docs: https://docs.alfresco.com/activiti/docs/dev-guide/1.4.0/#_activiti_engine_rest_api :

"For example: fetching process definitions is described in the Activiti User Guide as an HTTP GET on repository/process-definitions. This maps to <your-server-and-context-root>/api/repository/process-definitions."