[BONITA 6.2 API] get archived process instance by processInstanceId

Hi there,

I’d like to be able to check on a process instance state to know wether it still need informations or if it’s finished (Archived)

When it’s not closed, i do : processAPI.getProcessInstance(processInstanceId).getState()
but how can i know when it’s closed with the same processInstanceId ?

Thanks for any help.
Paul

Hi Seán, thanks for the help.

I’ve tried ArchivedProcessInstance but i couldn’t make it work with processInstanceId…
and getState has the same problem as I can’t find the processInstanceId of the process once it has been archived.

It’s not a problem of validator. It’s just that I want to check on the progression of my process from an outside application.

I got around my problem by saving a state field in a database…

My first comment -

I’d like to be able to check on a process instance state to know whether it still need information or if it’s finished (Archived)

I would add Validators to all necessary fields so that it is not possible to close a case without information…adding information after the fact could be seen as questionable by auditors…

as for the archived versions…try here:

ArchivedProcessInstance

under

http://documentation.bonitasoft.com/javadoc/api/6.3/index.html

You can still use getState

Hope it helps,

regards
Seán