protected static class ControllableDeployCommand extends ControllableCommand<Void> {
public Void execute(CommandContext commandContext) {
DeploymentBuilder deploymentBuilder = new DeploymentBuilderImpl(null)
.name("some-deployment-name")
.enableDuplicateFiltering(false)
.addString("foo.bpmn", processResource);
monitor.sync(); // thread will block here until makeContinue() is called form main thread