long instanceId = -1;
ProcessInstance pi = null;
if (path.getSignalName() != null) {
final List<ProcessInstance> instances = new ArrayList<ProcessInstance>();
session.addEventListener(new DefaultProcessEventListener() {
@Override
public void beforeProcessStarted(ProcessStartedEvent event) {
instances.add(event.getProcessInstance());
}
});