Пример #1
0
        public override void performOperationStep(DeploymentOperation operationContext)
        {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.camunda.bpm.container.impl.spi.PlatformServiceContainer serviceContainer = operationContext.getServiceContainer();
            PlatformServiceContainer serviceContainer = operationContext.ServiceContainer;
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.camunda.bpm.application.AbstractProcessApplication processApplication = operationContext.getAttachment(Attachments.PROCESS_APPLICATION);
            AbstractProcessApplication processApplication = operationContext.getAttachment(Attachments.PROCESS_APPLICATION);
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.camunda.bpm.container.impl.jmx.services.JmxManagedProcessApplication deployedProcessApplication = serviceContainer.getService(org.camunda.bpm.container.impl.spi.ServiceTypes.PROCESS_APPLICATION, processApplication.getName());
            JmxManagedProcessApplication deployedProcessApplication = serviceContainer.getService(ServiceTypes.PROCESS_APPLICATION, processApplication.Name);

            ensureNotNull("Cannot find process application with name " + processApplication.Name, "deployedProcessApplication", deployedProcessApplication);

            IDictionary <string, DeployedProcessArchive> deploymentMap = deployedProcessApplication.ProcessArchiveDeploymentMap;

            if (deploymentMap != null)
            {
                IList <ProcessesXml> processesXmls = deployedProcessApplication.ProcessesXmls;
                foreach (ProcessesXml processesXml in processesXmls)
                {
                    foreach (ProcessArchiveXml parsedProcessArchive in processesXml.ProcessArchives)
                    {
                        DeployedProcessArchive deployedProcessArchive = deploymentMap[parsedProcessArchive.Name];
                        if (deployedProcessArchive != null)
                        {
                            operationContext.addStep(new UndeployProcessArchiveStep(deployedProcessApplication, parsedProcessArchive, deployedProcessArchive.ProcessEngineName));
                        }
                    }
                }
            }
        }
Пример #2
0
        public override void performOperationStep(DeploymentOperation operationContext)
        {
            IList <ProcessEngineXml> processEngines = getProcessEnginesXmls(operationContext);

            foreach (ProcessEngineXml parsedProcessEngine in processEngines)
            {
                // for each process engine add a new deployment step
                operationContext.addStep(createStartProcessEngineStep(parsedProcessEngine));
            }
        }