本文整理汇总了Java中org.activiti.engine.impl.bpmn.deployer.BpmnDeployer类的典型用法代码示例。如果您正苦于以下问题:Java BpmnDeployer类的具体用法?Java BpmnDeployer怎么用?Java BpmnDeployer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BpmnDeployer类属于org.activiti.engine.impl.bpmn.deployer包,在下文中一共展示了BpmnDeployer类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getDefaultDeployers
import org.activiti.engine.impl.bpmn.deployer.BpmnDeployer; //导入依赖的package包/类
protected Collection< ? extends Deployer> getDefaultDeployers() {
List<Deployer> defaultDeployers = new ArrayList<Deployer>();
BpmnDeployer bpmnDeployer = new BpmnDeployer();
bpmnDeployer.setExpressionManager(expressionManager);
bpmnDeployer.setIdGenerator(idGenerator);
BpmnParser bpmnParser = new BpmnParser(expressionManager);
if(preParseListeners != null) {
bpmnParser.getParseListeners().addAll(preParseListeners);
}
bpmnParser.getParseListeners().addAll(getDefaultBPMNParseListeners());
if(postParseListeners != null) {
bpmnParser.getParseListeners().addAll(postParseListeners);
}
bpmnDeployer.setBpmnParser(bpmnParser);
defaultDeployers.add(bpmnDeployer);
return defaultDeployers;
}
示例2: createDeploymentResourceResponse
import org.activiti.engine.impl.bpmn.deployer.BpmnDeployer; //导入依赖的package包/类
public DeploymentResourceResponse createDeploymentResourceResponse(String deploymentId, String resourceId, String contentType, String baseUri) {
RestUrlBuilder urlBuilder = createUrlBuilder(baseUri);
// Create URL's
String resourceUrl = urlBuilder.buildUrl(RestUrls.URL_DEPLOYMENT_RESOURCE, deploymentId, resourceId);
String resourceContentUrl = urlBuilder.buildUrl(RestUrls.URL_DEPLOYMENT_RESOURCE_CONTENT, deploymentId, resourceId);
// Determine type
String type = "resource";
for (String suffix : BpmnDeployer.BPMN_RESOURCE_SUFFIXES) {
if (resourceId.endsWith(suffix)) {
type = "processDefinition";
break;
}
}
return new DeploymentResourceResponse(resourceId, resourceUrl, resourceContentUrl, contentType, type);
}
示例3: getBpmnProcessDefinitionResource
import org.activiti.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 : BpmnDeployer.BPMN_RESOURCE_SUFFIXES) {
String resource = type.getName().replace('.', '/') + "." + name + "." + suffix;
InputStream inputStream = ReflectUtil.getResourceAsStream(resource);
if (inputStream == null) {
continue;
} else {
return resource;
}
}
return type.getName().replace('.', '/') + "." + name + "." + BpmnDeployer.BPMN_RESOURCE_SUFFIXES[0];
}
示例4: deployDefinition
import org.activiti.engine.impl.bpmn.deployer.BpmnDeployer; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
public WorkflowDeployment deployDefinition(InputStream workflowDefinition, String mimetype, String name)
{
try
{
String resourceName = GUID.generate() + BpmnDeployer.BPMN_RESOURCE_SUFFIXES[0];
Deployment deployment = repoService.createDeployment()
.addInputStream(resourceName, workflowDefinition)
.name(name)
.deploy();
List<ProcessDefinition> definitionList = repoService.createProcessDefinitionQuery().deploymentId(deployment.getId()).list();
if (definitionList != null && definitionList.size() > 0)
{
boolean internalCategory = true;
for (ProcessDefinition processDefinition : definitionList)
{
if (WorkflowDeployer.CATEGORY_ALFRESCO_INTERNAL.equals(processDefinition.getCategory()) == false)
{
internalCategory = false;
break;
}
}
if (internalCategory)
{
repoService.setDeploymentCategory(deployment.getId(), WorkflowDeployer.CATEGORY_ALFRESCO_INTERNAL);
}
}
// No problems can be added to the WorkflowDeployment, warnings are
// not exposed
return typeConverter.convert(deployment);
}
catch(Exception ae)
{
String msg = messageService.getMessage(ERR_DEPLOY_WORKFLOW);
if(logger.isDebugEnabled())
{
logger.debug(msg, ae);
}
throw new WorkflowException(msg, ae);
}
}
示例5: getBpmnDeployer
import org.activiti.engine.impl.bpmn.deployer.BpmnDeployer; //导入依赖的package包/类
public BpmnDeployer getBpmnDeployer() {
return bpmnDeployer;
}
示例6: setBpmnDeployer
import org.activiti.engine.impl.bpmn.deployer.BpmnDeployer; //导入依赖的package包/类
public ProcessEngineConfigurationImpl setBpmnDeployer(BpmnDeployer bpmnDeployer) {
this.bpmnDeployer = bpmnDeployer;
return this;
}
示例7: deployProcessString
import org.activiti.engine.impl.bpmn.deployer.BpmnDeployer; //导入依赖的package包/类
private String deployProcessString(String processString) {
String resourceName = "xmlString." + BpmnDeployer.BPMN_RESOURCE_SUFFIX;
return repositoryService.createDeployment().addString(resourceName, processString).deploy().getId();
}
示例8: getBpmnDeployer
import org.activiti.engine.impl.bpmn.deployer.BpmnDeployer; //导入依赖的package包/类
public BpmnDeployer getBpmnDeployer() {
return bpmnDeployer;
}
示例9: setBpmnDeployer
import org.activiti.engine.impl.bpmn.deployer.BpmnDeployer; //导入依赖的package包/类
public ProcessEngineConfigurationImpl setBpmnDeployer(BpmnDeployer bpmnDeployer) {
this.bpmnDeployer = bpmnDeployer;
return this;
}
示例10: deployProcessString
import org.activiti.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();
}
示例11: getBpmnProcessDefinitionResource
import org.activiti.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>.<name>.bpmn20.xml</code>.
*/
public static String getBpmnProcessDefinitionResource(Class< ? > type, String name) {
return type.getName().replace('.', '/') + "." + name + "." + BpmnDeployer.BPMN_RESOURCE_SUFFIX;
}