AnsweredAssumed Answered

rest api starting a process ,getting back 400

Question asked by rascaly2k on Feb 7, 2015
Latest reply on Feb 11, 2015 by mignet
Hi I am trying to start a process , with the key name approvalProcess

I am using Adavance rest client chrome to test the service

To see if its deployed and available

I use

method : get
http://localhost:8081/activiti-rest/service/repository/process-definitions?key=approvalProcess

output: Status 200 OK
{
data: [1]
0:  {
id: "approvalProcess:1:11580"
url: "http://localhost:8081/activiti-rest/service/repository/process-definitions/approvalProcess:1:11580"
key: "approvalProcess"
version: 1
name: "Page Approval Process"
description: null
deploymentId: "11577"
deploymentUrl: "http://localhost:8081/activiti-rest/service/repository/deployments/11577"
resource: "http://localhost:8081/activiti-rest/service/repository/deployments/11577/resources/Page Approval Process.bpmn20.xml"
diagramResource: "http://localhost:8081/activiti-rest/service/repository/deployments/11577/resources/Page Approval Process.approvalProcess.png"
category: "http://activiti.org/bpmn20"
graphicalNotationDefined: false
suspended: false
startFormDefined: false
}-
-
total: 1
start: 0
sort: "name"
order: "asc"
size: 1
}


So I know its deployed , but when I try to start with with parameters its gives a bad requests and i don't know what to do . People else where suggested that the contype might not be set , I did that . But no cigar . Would some kind soul shed some light


method: post
url:http://localhost:8081/activiti-rest/service/runtime/process-instances

header
Authorization:Basic a2VybWl0Omtlcm1pdA==
Accept:application/json
Content-Type:application/json

body
{
   "processDefinitionKey":"approvalProcess",
   "variables": [
      {
       "type":"page",
       "typeId":"123"
      }
   ]}

Status
400 Bad Request


Any suggestions , would greatly be appreciated
Thankx in advance
-

Outcomes