Get variables of an archived process instance

Hi evereyone,

I want to get the list of variables of an archived process instance using Bonita REST API, I dont found any method that can return the list of variables of archived instances. I can get variables of started instances but I can’t get the list of archived instances variables.

Any help please ?

Hi,

Actually you are right no methods exist to retrieve archived process instance variables.

Currently Business Data feature faced the same kind of limitation. But such limitation should be address in a future release. So when available I would recommend to switch from process variables to business variables.

As a temporary workaround I can suggest to create a REST API extension and use the Java API getArchivedProcessDataInstance to retrieve the process variable from an archived process instance.

Yhank you for your answer @aintoine.mottier.

The method getArchivedProcessDataInstance return variables of a process instance or business variables of an instance ?

I think that API extentions is not avalaible in the version 6.5.X

getArchivedProcessDataInstance returns variables of a process instances.

And you are right REST API extension is only available since Bonita BPM 7.

Thnak you for your answer @antoine.mottier

I have a last question, can I get the list of variable of the current process instance ? I want to put all variables values into a comment, That is possible ?

You can get the list of variables from a current process instance using getProcessDataInstances method (Java client library) or caseVariable resource (REST API). Both solutions provide the process instance variables value. Other methods and resources are available if you need to get the variable declared in process definition.

As far as I know adding a comment on a process is only available using the Java client library addProcessComment method.