final String operationName = "Undeployment of Process Application "+processAppName;
// perform the undeployment
serviceContainer.createUndeploymentOperation(operationName)
.addAttachment(Attachments.PROCESS_APPLICATION, processApplication)
.addStep(new PreUndeployInvocationStep())
.addStep(new UndeployProcessArchivesStep())
.addStep(new ProcessesXmlStopProcessEnginesStep())
.addStep(new StopProcessApplicationServiceStep())
.execute();