当前位置: 首页>>代码示例>>Java>>正文


Java BpmnDeployer类代码示例

本文整理汇总了Java中org.camunda.bpm.engine.impl.bpmn.deployer.BpmnDeployer的典型用法代码示例。如果您正苦于以下问题:Java BpmnDeployer类的具体用法?Java BpmnDeployer怎么用?Java BpmnDeployer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


BpmnDeployer类属于org.camunda.bpm.engine.impl.bpmn.deployer包,在下文中一共展示了BpmnDeployer类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: findResources

import org.camunda.bpm.engine.impl.bpmn.deployer.BpmnDeployer; //导入依赖的package包/类
@Override
public Map<String, byte[]> findResources(ClassLoader classLoader, String paResourceRootPath, URL metaFileUrl, String[] additionalResourceSuffixes) {
  final Map<String, byte[]> resourceMap = new HashMap<String, byte[]>();
  List<String> suffixes = Arrays.asList(BpmnDeployer.BPMN_RESOURCE_SUFFIXES);
  if (additionalResourceSuffixes != null) {
    suffixes.addAll(Arrays.asList(additionalResourceSuffixes));
  }
  if (paResourceRootPath != null && !paResourceRootPath.startsWith("pa:")) {
    // 1. CASE: paResourceRootPath specified AND it is a "classpath:" resource
    // root
    String strippedPath = paResourceRootPath.replace("classpath:", "");
    scanPathInBundle(suffixes, resourceMap, strippedPath);

  } else if (paResourceRootPath == null) {
    // 3. CASE: paResourceRootPath not specified
    scanPathInBundle(suffixes, resourceMap, "/");
  } else {
    // 2nd. CASE: paResourceRootPath is PA-local
    //FIXME fix this by using BundleWiring.listResources() when moving to OSGi 4.3
    throw new ProcessEngineException("PA-loca resourceRootPaths are not supported in an OSGi-environment");
  }
  return resourceMap;
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform-osgi,代码行数:24,代码来源:OSGiProcessApplicationScanner.java

示例2: getDefaultDeployers

import org.camunda.bpm.engine.impl.bpmn.deployer.BpmnDeployer; //导入依赖的package包/类
protected Collection<? extends Deployer> getDefaultDeployers() {
  List<Deployer> defaultDeployers = new ArrayList<Deployer>();

  BpmnDeployer bpmnDeployer = getBpmnDeployer();
  defaultDeployers.add(bpmnDeployer);

  if (isCmmnEnabled()) {
    CmmnDeployer cmmnDeployer = getCmmnDeployer();
    defaultDeployers.add(cmmnDeployer);
  }

  if (isDmnEnabled()) {
    DecisionRequirementsDefinitionDeployer decisionRequirementsDefinitionDeployer = getDecisionRequirementsDefinitionDeployer();
    DecisionDefinitionDeployer decisionDefinitionDeployer = getDecisionDefinitionDeployer();
    // the DecisionRequirementsDefinition cacheDeployer must be before the DecisionDefinitionDeployer
    defaultDeployers.add(decisionRequirementsDefinitionDeployer);
    defaultDeployers.add(decisionDefinitionDeployer);
  }

  return defaultDeployers;
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:22,代码来源:ProcessEngineConfigurationImpl.java

示例3: getBpmnDeployer

import org.camunda.bpm.engine.impl.bpmn.deployer.BpmnDeployer; //导入依赖的package包/类
protected BpmnDeployer getBpmnDeployer() {
  BpmnDeployer bpmnDeployer = new BpmnDeployer();
  bpmnDeployer.setExpressionManager(expressionManager);
  bpmnDeployer.setIdGenerator(idGenerator);

  if (bpmnParseFactory == null) {
    bpmnParseFactory = new DefaultBpmnParseFactory();
  }

  BpmnParser bpmnParser = new BpmnParser(expressionManager, bpmnParseFactory);

  if (preParseListeners != null) {
    bpmnParser.getParseListeners().addAll(preParseListeners);
  }
  bpmnParser.getParseListeners().addAll(getDefaultBPMNParseListeners());
  if (postParseListeners != null) {
    bpmnParser.getParseListeners().addAll(postParseListeners);
  }

  bpmnDeployer.setBpmnParser(bpmnParser);

  return bpmnDeployer;
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:24,代码来源:ProcessEngineConfigurationImpl.java

示例4: addSubscriptionsFromPreviousVersion

import org.camunda.bpm.engine.impl.bpmn.deployer.BpmnDeployer; //导入依赖的package包/类
protected void addSubscriptionsFromPreviousVersion(ProcessDefinitionEntity processDefinition) {
  //we don't want to take the process definition from deployment cache, as it can have inconsistent value in "deleted" flag
  //instead we take it from DbEntityCache (or the database)
  String previousProcessDefinitionId = processDefinition.getPreviousProcessDefinitionId();
  if (previousProcessDefinitionId != null) {
    ProcessDefinitionEntity previousDefinition = findLatestProcessDefinitionById(previousProcessDefinitionId);

    //if not deleted, than add event subscriptions
    if (previousDefinition != null && !previousDefinition.isDeleted()) {
      ProcessEngineConfigurationImpl configuration = Context.getProcessEngineConfiguration();
      DeploymentCache deploymentCache = configuration.getDeploymentCache();
      previousDefinition = deploymentCache.resolveProcessDefinition(previousDefinition);

      List<Deployer> deployers = configuration.getDeployers();
      for (Deployer deployer : deployers) {
        if (deployer instanceof BpmnDeployer) {
          ((BpmnDeployer) deployer).addEventSubscriptions(previousDefinition);
        }
      }
    }
  }
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:23,代码来源:ProcessDefinitionManager.java

示例5: getBpmnProcessDefinitionResource

import org.camunda.bpm.engine.impl.bpmn.deployer.BpmnDeployer; //导入依赖的package包/类
/**
 * get a resource location by convention based on a class (type) and a
 * relative resource name. The return value will be the full classpath
 * location of the type, plus a suffix built from the name parameter:
 * <code>BpmnDeployer.BPMN_RESOURCE_SUFFIXES</code>.
 * The first resource matching a suffix will be returned.
 */
public static String getBpmnProcessDefinitionResource(Class< ? > type, String name) {
  for (String suffix : RESOURCE_SUFFIXES) {
    String resource = createResourceName(type, name, suffix);
    InputStream inputStream = ReflectUtil.getResourceAsStream(resource);
    if (inputStream == null) {
      continue;
    } else {
      return resource;
    }
  }
  return createResourceName(type, name, BpmnDeployer.BPMN_RESOURCE_SUFFIXES[0]);
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:20,代码来源:TestHelper.java

示例6: isDiagram

import org.camunda.bpm.engine.impl.bpmn.deployer.BpmnDeployer; //导入依赖的package包/类
public static boolean isDiagram(String fileName, String modelFileName) {
  // process resources
  boolean isBpmnDiagram = checkDiagram(fileName, modelFileName, BpmnDeployer.DIAGRAM_SUFFIXES, BpmnDeployer.BPMN_RESOURCE_SUFFIXES);
  // case resources
  boolean isCmmnDiagram = checkDiagram(fileName, modelFileName, CmmnDeployer.DIAGRAM_SUFFIXES, CmmnDeployer.CMMN_RESOURCE_SUFFIXES);
  // decision resources
  boolean isDmnDiagram = checkDiagram(fileName, modelFileName, DecisionDefinitionDeployer.DIAGRAM_SUFFIXES, DecisionDefinitionDeployer.DMN_RESOURCE_SUFFIXES);

  return isBpmnDiagram || isCmmnDiagram || isDmnDiagram;
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:11,代码来源:ProcessApplicationScanningUtil.java

示例7: isBpmnResource

import org.camunda.bpm.engine.impl.bpmn.deployer.BpmnDeployer; //导入依赖的package包/类
protected boolean isBpmnResource(ResourceEntity resourceEntity) {
  return StringUtil.hasAnySuffix(resourceEntity.getName(), BpmnDeployer.BPMN_RESOURCE_SUFFIXES);
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:4,代码来源:DeployCmd.java

示例8: isDeployable

import org.camunda.bpm.engine.impl.bpmn.deployer.BpmnDeployer; //导入依赖的package包/类
public static boolean isDeployable(String filename) {
  return hasSuffix(filename, BpmnDeployer.BPMN_RESOURCE_SUFFIXES)
    || hasSuffix(filename, CmmnDeployer.CMMN_RESOURCE_SUFFIXES)
    || hasSuffix(filename, DecisionDefinitionDeployer.DMN_RESOURCE_SUFFIXES);
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:6,代码来源:ProcessApplicationScanningUtil.java

示例9: deployProcessString

import org.camunda.bpm.engine.impl.bpmn.deployer.BpmnDeployer; //导入依赖的package包/类
private String deployProcessString(String processString) {
  String resourceName = "xmlString." + BpmnDeployer.BPMN_RESOURCE_SUFFIXES[0];
  return repositoryService.createDeployment().addString(resourceName, processString).deploy().getId();
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:5,代码来源:RepositoryServiceTest.java

示例10: addModelInstance

import org.camunda.bpm.engine.impl.bpmn.deployer.BpmnDeployer; //导入依赖的package包/类
public DeploymentBuilder addModelInstance(String resourceName, BpmnModelInstance modelInstance) {
  ensureNotNull("modelInstance", modelInstance);

  validateResouceName(resourceName, BpmnDeployer.BPMN_RESOURCE_SUFFIXES);

  ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
  Bpmn.writeModelToStream(outputStream, modelInstance);

  return addBytes(resourceName, outputStream.toByteArray());
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:11,代码来源:DeploymentBuilderImpl.java


注:本文中的org.camunda.bpm.engine.impl.bpmn.deployer.BpmnDeployer类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。