Search in sources :

Example 1 with DefaultCmmnElementHandlerRegistry

use of org.camunda.bpm.engine.impl.cmmn.handler.DefaultCmmnElementHandlerRegistry in project camunda-bpm-platform by camunda.

the class ProcessEngineConfigurationImpl method getCmmnDeployer.

protected CmmnDeployer getCmmnDeployer() {
    CmmnDeployer cmmnDeployer = new CmmnDeployer();
    cmmnDeployer.setIdGenerator(idGenerator);
    if (cmmnTransformFactory == null) {
        cmmnTransformFactory = new DefaultCmmnTransformFactory();
    }
    if (cmmnElementHandlerRegistry == null) {
        cmmnElementHandlerRegistry = new DefaultCmmnElementHandlerRegistry();
    }
    CmmnTransformer cmmnTransformer = new CmmnTransformer(expressionManager, cmmnElementHandlerRegistry, cmmnTransformFactory);
    if (customPreCmmnTransformListeners != null) {
        cmmnTransformer.getTransformListeners().addAll(customPreCmmnTransformListeners);
    }
    cmmnTransformer.getTransformListeners().addAll(getDefaultCmmnTransformListeners());
    if (customPostCmmnTransformListeners != null) {
        cmmnTransformer.getTransformListeners().addAll(customPostCmmnTransformListeners);
    }
    cmmnDeployer.setTransformer(cmmnTransformer);
    return cmmnDeployer;
}
Also used : DefaultCmmnTransformFactory(org.camunda.bpm.engine.impl.cmmn.transformer.DefaultCmmnTransformFactory) DefaultCmmnElementHandlerRegistry(org.camunda.bpm.engine.impl.cmmn.handler.DefaultCmmnElementHandlerRegistry) CmmnDeployer(org.camunda.bpm.engine.impl.cmmn.deployer.CmmnDeployer) CmmnTransformer(org.camunda.bpm.engine.impl.cmmn.transformer.CmmnTransformer)

Example 2 with DefaultCmmnElementHandlerRegistry

use of org.camunda.bpm.engine.impl.cmmn.handler.DefaultCmmnElementHandlerRegistry in project camunda-bpm-platform by camunda.

the class CmmnTransformerTest method setup.

@Before
public void setup() {
    CmmnTransformer transformerWrapper = new CmmnTransformer(null, new DefaultCmmnElementHandlerRegistry(), null);
    transformer = new CmmnTransform(transformerWrapper);
    deployment = new DeploymentEntity();
    deployment.setId("aDeploymentId");
    transformer.setDeployment(deployment);
    modelInstance = Cmmn.createEmptyModel();
    definitions = modelInstance.newInstance(Definitions.class);
    definitions.setTargetNamespace("http://camunda.org/examples");
    modelInstance.setDefinitions(definitions);
    caseDefinition = createElement(definitions, "aCaseDefinition", Case.class);
    casePlanModel = createElement(caseDefinition, "aCasePlanModel", CasePlanModel.class);
}
Also used : DeploymentEntity(org.camunda.bpm.engine.impl.persistence.entity.DeploymentEntity) CasePlanModel(org.camunda.bpm.model.cmmn.instance.CasePlanModel) Definitions(org.camunda.bpm.model.cmmn.instance.Definitions) DefaultCmmnElementHandlerRegistry(org.camunda.bpm.engine.impl.cmmn.handler.DefaultCmmnElementHandlerRegistry) CmmnTransformer(org.camunda.bpm.engine.impl.cmmn.transformer.CmmnTransformer) CmmnTransform(org.camunda.bpm.engine.impl.cmmn.transformer.CmmnTransform) Case(org.camunda.bpm.model.cmmn.instance.Case) Before(org.junit.Before)

Aggregations

DefaultCmmnElementHandlerRegistry (org.camunda.bpm.engine.impl.cmmn.handler.DefaultCmmnElementHandlerRegistry)2 CmmnTransformer (org.camunda.bpm.engine.impl.cmmn.transformer.CmmnTransformer)2 CmmnDeployer (org.camunda.bpm.engine.impl.cmmn.deployer.CmmnDeployer)1 CmmnTransform (org.camunda.bpm.engine.impl.cmmn.transformer.CmmnTransform)1 DefaultCmmnTransformFactory (org.camunda.bpm.engine.impl.cmmn.transformer.DefaultCmmnTransformFactory)1 DeploymentEntity (org.camunda.bpm.engine.impl.persistence.entity.DeploymentEntity)1 Case (org.camunda.bpm.model.cmmn.instance.Case)1 CasePlanModel (org.camunda.bpm.model.cmmn.instance.CasePlanModel)1 Definitions (org.camunda.bpm.model.cmmn.instance.Definitions)1 Before (org.junit.Before)1