MockProcessInstance pi = (MockProcessInstance) processInstance; while (pi.isLocked()) { try { Thread.sleep(100); } catch (InterruptedException e) { throw new LockException("Thread sleep whilst waiting for lock interrupted!"); } } pi.setLocked(true);
    public void acquireLock(IProcessInstance processInstance, IEngine engine) throws LockException {            }