
Hi Clint,
Great!
what about the following?
/histor(y/ic?)/process-instance
/histor(y/ic?)//activity-instance
/histor(y/ic?)//variable-instance
This way we won’t have to think about namespace clashes. This could be ambiguous if your process instance id is “historic”.
@GET
/process-instance/historic
Unlikely, but still J
And we could have something like a “history root resource” which provides all the history resources and which would allow you to add / remove the history resources to your JAX-RS deployment “en bloc”. Ie. If you do not have history or do not want to expose it, it would be very simple to not deploy it.
@Path(HistoryRestService.PATH)
public interface HistoryRestService {
public static final String PATH = "/history(y/ic)?";
@Path(HistoricProcessInstanceRestService.PATH)
HistoricProcessInstanceRestService getProcessInstanceService();
@Path(HistoricActivityInstanceRestService.PATH)
HistoricActivityInstanceRestService getActivityInstanceService();
...
}
WDYT?
Cheers,
Daniel Meyer
--
You received this message because you are subscribed to the Google Groups "camunda BPM platform internal" group.
To unsubscribe from this group and stop receiving emails from it, send an email to camunda-bpm-d...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
/history/process-instance
/history/activity-instance
/history/variable-instance
I will make the adjustments and do a pull request next week.
Hi Clint,
that could certainly be an option.
We are currently also thinking about adding some sort of user interaction audit log, ie. something like
“At 2013-07-25T14:18:20, Jonny has suspended the process instance 4aaebf59-f524-11e2-9cf2-3c970e140ef1”.
Since from a history perspective, the fact that a process instance is suspended or active is probably most interesting in respect to who has suspended / activated it?, when did it happen, etc …?
It could be modeled somewhat like this:
ID_ | USER_ID_ | OPERATION | RESOURCE_TYPE_ | RESOURCE_ID_ | TIMESTAMP_ |
10001 | jonny | suspend | process-instance | 2320001 | 2013-07-25T14:18:20 |
10001 | jonny | activate | process-instance | 2320001 | 2013-08-25T14:18:20 |
The downside from your usecase perspective would probably be that it would not be “queriable” as easily / efficiently.
Cheers,
Daniel Meyer
Hi Clint,
I think that adding the audit table would be nice but we do not have to do that right away. What we could do is add a logical STATE_ column to the HistoricProcessInstance and provide a proper lifecycle for process instances:

(maybe the names are not perfect COMPLETED vs. FINISHED seems to be a little ambiguous)
And then we could include all these states into the query:
createHistoicProcessInstanceQuery().running() // = active + suspended
createHistoicProcessInstanceQuery().suspended()
createHistoicProcessInstanceQuery().active()
createHistoicProcessInstanceQuery().finished() // = completed + cancelled
createHistoicProcessInstanceQuery().completed()
createHistoicProcessInstanceQuery().cancelled()
And the Historic process instance could return the value:
HistoricProcessInstanceLifecycleState state = historicProcessInstance.getLifecycleState();
HistoricProcessInstanceLifecycleState could be an interface with two properties getState() and getSubstate() and there is an enum which implements the interface and provides the built-in constants.
WDYT?
Cheers,
Daniel Meyer
Yes, sounds reasonable.
Update:

Cheers,
Daniel
-----Ursprüngliche Nachricht-----
Von: camunda...@googlegroups.com [mailto:camunda...@googlegroups.com] Im Auftrag von Thorben Lindhauer
Gesendet: Freitag, 26. Juli 2013 13:53
An: Clint Manning
Cc: camunda...@googlegroups.com
Betreff: Re: Rest API Enhancement Proposal - Single query call returns detailed process instance data