use of org.camunda.bpm.engine.impl.jobexecutor.RuntimeContainerJobExecutor in project camunda-bpm-platform by camunda.
the class JobAcquisitionAdd method performRuntime.
@Override
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException {
String acquisitionName = PathAddress.pathAddress(operation.get(ModelDescriptionConstants.ADDRESS)).getLastElement().getValue();
MscRuntimeContainerJobExecutor mscRuntimeContainerJobExecutor = new MscRuntimeContainerJobExecutor();
if (model.hasDefined(SubsystemAttributeDefinitons.PROPERTIES.getName())) {
List<Property> properties = SubsystemAttributeDefinitons.PROPERTIES.resolveModelAttribute(context, model).asPropertyList();
for (Property property : properties) {
PropertyHelper.applyProperty(mscRuntimeContainerJobExecutor, property.getName(), property.getValue().asString());
}
}
// start new service for job executor
ServiceController<RuntimeContainerJobExecutor> serviceController = context.getServiceTarget().addService(ServiceNames.forMscRuntimeContainerJobExecutorService(acquisitionName), mscRuntimeContainerJobExecutor).addDependency(ServiceNames.forMscRuntimeContainerDelegate()).addDependency(ServiceNames.forMscExecutorService()).addListener(verificationHandler).setInitialMode(Mode.ACTIVE).install();
newControllers.add(serviceController);
}
Aggregations