lock.beginFlow("flow1", "exec1");
ExecutionLock other = instance2.newInstance("batch1");
try {
// can acquire other flow lock
other.beginFlow("flow2", "exec1");
other.endFlow("flow2", "exec1");
other.beginFlow("flow2", "exec2");
other.endFlow("flow2", "exec2");
// can acquire other execution lock
other.beginFlow("flow1", "exec2");