true, outerActivity.getFlow().getPosMap(), assignment.getFactory(),
m_metadata.getGlobalEnvironment()));
assignment.setSemaphore(true);
outerActivity.addStep(assignment);
Block block = new Block();
block.setActivity(outerActivity);
assignment.setNext(block);
Activity blockActivity = block.getContainedActivity();
Semaphore semaphore = new Semaphore(sStepName, assignment);
semaphore.setActivity(blockActivity);
blockActivity.addStep(semaphore);
loader.loadActivity(element, blockActivity);
block.setCleanupCode(semaphore.getExitCode());
return block;
}