As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
public class DeployProcessUtil implements JavaDelegate { @Override public void execute(DelegateExecution execution) throws Exception { RepositoryService repo = ActivitiUtil.getRepositoryService(); DeploymentBuilder deploymentBuilder = repo.createDeployment(); try { // getBarFile() loads the .bar-file as byte[] deploymentBuilder.addZipInputStream(new ZipInputStream(new ByteArrayInputStream(getBarFile())); } catch (Exception e) { throw new RuntimeException(e.getMessage()); } org.activiti.engine.repository.Deployment deployment = deploymentBuilder.deploy(); // There is only one deployed process, but there should be two System.out.println("Process: " + ActivitiUtil.getRepositoryService().createProcessDefinitionQuery().list()); } }