AnsweredAssumed Answered

How to get process state

Question asked by sliu on Jul 23, 2012
Latest reply on Jul 24, 2012 by frederikheremans1
Hi,
We're planning to use Activiti API to interact with the engine, bypassing Activiti UI.
I'd like to know what API to use to get the process state. Let's take the monthly financial report example in user guide. I can start it by calling:
@Autowired
private ProcessEngine processEngine;
public someFunc() {
  ProcessInstance newReportProcess =
       processEngine.getRuntimeService().startProcessInstanceByKey("finance_report");
  String financeReportProcessId= newReportProcess .getBusinessKey();
  // keep the financeReportProcessId somewhere
}

Now we know the process is blocking at the first user activity ("write finance report"). What Activiti API should I use to get this state? Looks like ProcessInstance.isSuspended() can be used to check if it's blocked somewhere, but I'm looking a way to tell me it's blocked at "write report".

TIA

Outcomes