As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
I looked at the Javadocs, and searched the forum, but did not find an answer.
Is there an API to get the process completion state (success, error, etc,) for processes that are completed and are in the history?
You can retrieve instances that have a job execution error as well as a delete reason, but not by state as far as I know.
Greg
If you want to know the process completion state(the end activity id), you can use HistoricProcessInstance.getEndActivityId().
・HistoricProcessInstancehttps://www.activiti.org/javadocs/org/activiti/engine/history/HistoricProcessInstance.html
If you want to get HistoricProcessInstance, you neet to use HistoricProcessInstanceQuery.
・HistoricProcessInstanceQueryhttps://www.activiti.org/javadocs/org/activiti/engine/history/HistoricProcessInstanceQuery.html
Thanks But what I want to do is find out the reason a process instance ended--is it because it completed, or because an error occurred, or because it got a signal/event etc. I did not find anything in the Activiti API to retrieve that information.
Understood, likely you will need to make a number of calls and merge the results to get the information you want.
Alternatively you could make a native SQL call (or a custom iBatis mapping) using the managementService to retrieve the status details from the jistory tables.