/** Must be called on process execution thread! Gets infos about the current threads. */ protected ProcessThreadInfo[] getThreadInfos() { List ret = null; ThreadContext tc = instance.getThreadContext(); Set threads = tc.getAllThreads(); if (threads != null) { ret = new ArrayList(); for (Iterator it = threads.iterator(); it.hasNext(); ) { ProcessThread pt = (ProcessThread) it.next(); ret.add( new ProcessThreadInfo( pt.getId(), pt.getActivity(), // pt.getLastEdge(), pt.getException(), pt.isWaiting(), pt.getData() == null ? new HashMap() : new HashMap(pt.getData()))); } } return (ProcessThreadInfo[]) ret.toArray(new ProcessThreadInfo[ret.size()]); }