本文整理汇总了Java中org.activiti.engine.repository.ProcessDefinitionQuery.processDefinitionKeyLike方法的典型用法代码示例。如果您正苦于以下问题:Java ProcessDefinitionQuery.processDefinitionKeyLike方法的具体用法?Java ProcessDefinitionQuery.processDefinitionKeyLike怎么用?Java ProcessDefinitionQuery.processDefinitionKeyLike使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.activiti.engine.repository.ProcessDefinitionQuery
的用法示例。
在下文中一共展示了ProcessDefinitionQuery.processDefinitionKeyLike方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getAllDefinitions
import org.activiti.engine.repository.ProcessDefinitionQuery; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*/
public List<WorkflowDefinition> getAllDefinitions()
{
try
{
ProcessDefinitionQuery query = repoService.createProcessDefinitionQuery();
if(activitiUtil.isMultiTenantWorkflowDeploymentEnabled() && !TenantUtil.isCurrentDomainDefault())
{
query.processDefinitionKeyLike("@" + TenantUtil.getCurrentDomain() + "%");
}
return getValidWorkflowDefinitions(query.list());
}
catch (ActivitiException ae)
{
String msg = messageService.getMessage(ERR_GET_WORKFLOW_DEF);
if(logger.isDebugEnabled())
{
logger.debug(msg, ae);
}
throw new WorkflowException(msg, ae);
}
}
示例2: getDefinitions
import org.activiti.engine.repository.ProcessDefinitionQuery; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*/
public List<WorkflowDefinition> getDefinitions()
{
try
{
ProcessDefinitionQuery query = repoService.createProcessDefinitionQuery().latestVersion();
if(activitiUtil.isMultiTenantWorkflowDeploymentEnabled() && !TenantUtil.isCurrentDomainDefault())
{
query.processDefinitionKeyLike("@" + TenantUtil.getCurrentDomain() + "%");
}
return getValidWorkflowDefinitions(query.list());
}
catch (ActivitiException ae)
{
String msg = messageService.getMessage(ERR_GET_WORKFLOW_DEF);
if(logger.isDebugEnabled())
{
logger.debug(msg, ae);
}
throw new WorkflowException(msg, ae);
}
}
示例3: getProcessDefinition
import org.activiti.engine.repository.ProcessDefinitionQuery; //导入方法依赖的package包/类
@Override
public ProcessDefinition getProcessDefinition(String definitionId)
{
ProcessDefinitionQuery query = activitiProcessEngine
.getRepositoryService()
.createProcessDefinitionQuery()
.processDefinitionId(definitionId);
if (tenantService.isEnabled() && deployWorkflowsInTenant)
{
query.processDefinitionKeyLike("@" + TenantUtil.getCurrentDomain() + "@%");
}
org.activiti.engine.repository.ProcessDefinition processDefinition = query.singleResult();
if (processDefinition == null)
{
throw new EntityNotFoundException(definitionId);
}
ProcessDefinition deploymentRest = createProcessDefinitionRest((ProcessDefinitionEntity) processDefinition);
return deploymentRest;
}
示例4: getProcessDefinitionImage
import org.activiti.engine.repository.ProcessDefinitionQuery; //导入方法依赖的package包/类
@Override
public BinaryResource getProcessDefinitionImage(String definitionId)
{
ProcessDefinitionQuery query = activitiProcessEngine
.getRepositoryService()
.createProcessDefinitionQuery()
.processDefinitionId(definitionId);
if (tenantService.isEnabled() && deployWorkflowsInTenant)
{
query.processDefinitionKeyLike("@" + TenantUtil.getCurrentDomain() + "@%");
}
org.activiti.engine.repository.ProcessDefinition processDefinition = query.singleResult();
if (processDefinition == null)
{
throw new EntityNotFoundException(definitionId);
}
try
{
InputStream processDiagram = activitiProcessEngine.getRepositoryService().getProcessDiagram(definitionId);
if (processDiagram != null)
{
File file = TempFileProvider.createTempFile(definitionId + UUID.randomUUID(), ".png");
FileOutputStream fos = new FileOutputStream(file);
IOUtils.copy(processDiagram, fos);
fos.close();
return new FileBinaryResource(file);
}
else
{
throw new ApiException("No image available for definitionId " + definitionId);
}
}
catch (IOException error)
{
throw new ApiException("Error while getting process definition image.");
}
}