can't start a process instance by REST API

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-09-2014 08:46 AM
my operations as the follow:
step 1. in RESTClient, I input
method: GET
url: http://kermit:kermit@192.168.75.199:8080/activiti-rest/service/repository/process-definitions
response is normal:
{"data":[{"id":"createTimersProcess:1:36","url":"http://192.168.75.199:8080/activiti-rest/service/repository/process-definitions/createTimersProcess%... timers process","description":"Test process to create a number of timers.","deploymentId":"20","deploymentUrl":"http://192.168.75.199:8080/activiti-rest/service/repository/deployments/20','resource':'http://192.1...}],"total":1,"start":0,"sort":"name","order":"asc","size":1}
step 2.
method: POST
url: http://kermit:kermit@192.168.75.199:8080/activiti-rest/service/runtime/process-instances
body: {"processDefinitionKey":"createTimersProcess"}
response is:
{"errorMessage":"The server is refusing to service the request because the entity of the request is in a format not supported by the requested resource for the requested method","statusCode":415}
is there anyone meet the same problem ?
- Labels:
-
Archive

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-14-2014 09:53 PM
Accept: application/json
Content-type: application/json
You need these headers for all POST requests.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-16-2014 01:14 PM
HTTP Status 404 - /activiti-rest/runtime/process-instances/
type Status report
message /activiti-rest/runtime/process-instances/
description The requested resource is not available.
Thanks
Sunil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-17-2014 03:51 AM
from user guide:
404 - Not found The operation failed.The requested resource was not found.
does your deployment contain requested resource?
Regards
Martin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-17-2014 10:33 AM
Yes, my deployment has the requested resource. I have verified using process definitions list and I can see all the process in output from rest-api but when I try to start the process, it gives me below message. I have already tried with other in-built process definitions which comes by default with activiti engine like Account maintenance or billing, I am having this issue for every process definitions. Do I need to make any setting change for rest-api application? Activiti-explorer and Activiti-rest both are pointing to same SQL server database. I just ran Client statements process from Activiti-explorer and I was able to see the task from rest-api which means both are pointing to same database.
HTTP Status 404 - /activiti-rest/runtime/process-instances/
type Status report
message /activiti-rest/runtime/process-instances/
description The requested resource is not available.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-17-2014 10:59 AM
I have selected method as "POST"and gave the URL http://localhost:8080/activiti-rest/runtime/process-instances/
In Header section,
I have authorization, Content-type and Accept.
In Body section, I have added below process definitions information, I tried with id and key both.
{
"processDefinitionId":"accountMaintenance:1:204"
}
next I click on SEND button and I get 404 code. I don't see any hit on tomcat server when I call this method but I do see hit when I call other method like getting task list.
Thanks
Sunil

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2014 05:28 AM
I think the URL is not correct. I would expect a URL like http://localhost:8080/activiti-rest/service/runtime/process-instances
Best regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2014 01:04 PM
That's what I thought. I tried it already but I was getting below error and user guide also says to use http://localhost:8080/activiti-rest/runtime/process-instances so I was not sure. Can you please confirm if Request body is correct as I have mentioned above.
Error:
{
"errorMessage": "The server is refusing to service the request because the entity of the request is in a format not supported by the requested resource for the requested method",
"statusCode": 415
}
Thanks
Sunil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-22-2014 12:07 PM
Thanks
Sunil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-28-2016 04:07 AM
