Get connectors of a process Instance through REST

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?

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

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

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

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%3D47001 (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.

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=containerId%3D140002

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

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!