Activiti/Activiti — pull request #264 by rjnole (2014-05-07 19:50:30+00:00)
Title: Pull Request for REST Endpoint POST runtime/process-instances

I modified the following four files from within the "activiti-rest" module to support the retrieval of process variables that exist within any started process instances when each enters a wait state or is completed:

(1) org/activiti/rest/service/api/RestResponseFactory.java
(2) org/activiti/rest/service/api/runtime/process/ProcessInstanceCollectionResource.java
(3) org/activiti/rest/service/api/runtime/process/ProcessInstanceCreateRequest.java
(4) org/activiti/rest/service/api/runtime/process/ProcessInstanceResponse.java

The flag that should be specified to request variable retrieval within the JSON request is "returnVariables". If that flag is not specified or if it's set to false, the variables will not be returned.

One additional change that is included is the population of a "completed" boolean in the JSON result that indicates whether the process instance ran through to completion without encountering a wait state. This flag is populated whether "returnVariables" is set to true or not.

-Ryan Johnston (@rjfsu)