Jonathan S. Fisher
Jonathan S. Fisher

Reputation: 8876

How do you get data out of JBPM/Drools process instance?

So we're exploring using Drools/JBPM, and we're finding it very difficult to get data out of JBPM. I feel like we're missing something obvious.

We're kicking a JBPM process off using the RESTful interface and creating a process instance: POST /server/containers/{containerId}/processes/{processId}/instances

After the process instance is complete however, we need to retrieve the results. How do you do that? Is there something in the JBPM process we need to set (like a variable or what not)?

We've poured through a ton of examples and docs at this point and can't seem to find an answer to what should be simple.

Thank you, -Jonathan

Upvotes: 4

Views: 1421

Answers (1)

ShadyBears
ShadyBears

Reputation: 4185

When you make a POST request to /server/containers/{containerId}/processes/{processId}/instances it will return your process instance id.

Get results from current running process:
GET /server/containers/{containerId}/processes/definitions/{processId}/variables

Get results from past running processes:
GET /server/queries/processes/instances/{processInstanceId}/variables/instances/{varName}

Go to "process instances" in workbench to make sure you are storing data

Kie Workbench

Upvotes: 2

Related Questions