Get connectors of a process Instance through REST

1
0
-1

I want to retrieve the connectors attached to a process Instance. I'm trying with this: /bonita/API/bpm/connectorInstance?p=0&f=caseId={caseID}

but the filter does not work. I know the documentation doesn't refer to this filter (http://documentation.bonitasoft.com/?page=bpm-api#toc33), but I can't seem to be able to get the connectors of only that process instance any other way. I have tried /API/bpm/connectorInstance?p=0&c=10&f=id%3d{caseId}, as suggested in the docs, but with no luck.

Am I doing something wrong? Or is this simply impossible ATM?

Comments

Submitted by kiran.neupane on Mon, 12/12/2016 - 22:11

are you getting any http error or anything in the log??

Submitted by tcarmo20 on Tue, 12/13/2016 - 11:34

Nope
if I try
/bonita/API/bpm/connectorInstance?p=0&c=100&f=caseId={caseID}
it gives me every connector of every process instance (along with a 200 OK)..which basically is the same if I do it like this:
/bonita/API/bpm/connectorInstance?p=0&c=100

2 answers

1
0
-1

1
0
-1

Hi,

It works on my side, here is my URL test: http://localhost:8080/bonita/API/bpm/connectorInstance?p=0&c=10&f=id%3d6001

In my test, 6001 is the case ID. Make sure you don't mix Task ID with Case ID.

Cheers

Comments

Submitted by tcarmo20 on Wed, 12/14/2016 - 12:08

Thanks Lionel. But I still can't get it to work..
if I put : http://localhost:8080/bonita/API/bpm/connectorInstance?p=0&c=10&f=id%3d4... (47001 is the case ID)
all the connectors from every process instance appear

if I write http://localhost:8080/bonita/API/bpm/connectorInstance?p=0&c=10 I get the exact same thing..

Just to clarify,
I have 3 process instances of the same process, running. And the connector instances of those 3 process instances appear no matter what URL (of the ones above) I try. I want to obtain only the connectors of one of the process instances.

Submitted by Lionel Palacin on Fri, 12/16/2016 - 23:10

Hi,

I see, there might be an issue in the documentation actually. I tried by using containerId instead of id in the filter part and it worked: http://localhost:8080/bonita/API/bpm/connectorInstance?p=0&c=10&f=contai...

You wanna to take a look? If so, I'll create a PR to update the doc.

Submitted by tcarmo20 on Mon, 12/19/2016 - 11:55

Hi,
Yes, i had tried with the containerId and got it to work, hence why I couldn't understand why wouldn't it work with the id (caseId) when, according to the docs, it should.
I think the docs should indeed be updated!

Notifications