本文整理了Java中org.activiti.engine.task.Task.getTaskDefinitionKey()
方法的一些代码示例,展示了Task.getTaskDefinitionKey()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Task.getTaskDefinitionKey()
方法的具体详情如下:
包路径:org.activiti.engine.task.Task
类名称:Task
方法名:getTaskDefinitionKey
[英]The id of the activity in the process defining this task or null if this is not related to a process
[中]定义此任务的流程中活动的id,如果与流程无关,则为null
代码示例来源:origin: hs-web/hsweb-framework
protected void acceptTaskFormData(Task task,
Map<String, Object> formData) {
formData.put("processTaskId", task.getId());
formData.put("processTaskDefineKey", task.getTaskDefinitionKey());
formData.put("processTaskName", task.getName());
}
代码示例来源:origin: Activiti/Activiti
protected void localize(Task task) {
task.setLocalizedName(null);
task.setLocalizedDescription(null);
if (locale != null) {
String processDefinitionId = task.getProcessDefinitionId();
if (processDefinitionId != null) {
ObjectNode languageNode = Context.getLocalizationElementProperties(locale, task.getTaskDefinitionKey(), processDefinitionId, withLocalizationFallback);
if (languageNode != null) {
JsonNode languageNameNode = languageNode.get(DynamicBpmnConstants.LOCALIZATION_NAME);
if (languageNameNode != null && !languageNameNode.isNull()) {
task.setLocalizedName(languageNameNode.asText());
}
JsonNode languageDescriptionNode = languageNode.get(DynamicBpmnConstants.LOCALIZATION_DESCRIPTION);
if (languageDescriptionNode != null && !languageDescriptionNode.isNull()) {
task.setLocalizedDescription(languageDescriptionNode.asText());
}
}
}
}
}
代码示例来源:origin: hs-web/hsweb-framework
@Override
public void setCandidate(String doingUserId, Task task) {
if (task == null) {
return;
}
if (task.getTaskDefinitionKey() != null) {
//从配置中获取候选人
List<CandidateInfo> candidateInfoList = processConfigurationService
.getActivityConfiguration(doingUserId, task.getProcessDefinitionId(), task.getTaskDefinitionKey())
.getCandidateInfo(task);
if (CollectionUtils.isEmpty(candidateInfoList)) {
logger.warn("任务:{}未能设置候选人,此任务可能无法办理!", task);
} else {
for (CandidateInfo candidateInfo : candidateInfoList) {
Authentication user = candidateInfo.user();
if (user != null) {
taskService.addCandidateUser(task.getId(), user.getUser().getId());
}
}
}
} else {
logger.warn("未能成功设置环节候选人,task:{}", task);
}
}
代码示例来源:origin: hs-web/hsweb-framework
.activityId(task.getTaskDefinitionKey())
.singleResult();
.getNextActivities(task.getProcessDefinitionId(), task.getTaskDefinitionKey(), (execution));
代码示例来源:origin: hs-web/hsweb-framework
@Override
public void saveTaskForm(ProcessInstance instance, Task task, SaveFormRequest request) {
request.tryValidate();
ActivityConfigEntity entity = activityConfigService.selectByProcessDefineIdAndActivityId(task.getProcessDefinitionId(), task.getTaskDefinitionKey());
if (entity == null || StringUtils.isEmpty(entity.getFormId())) {
return;
}
Map<String, Object> formData = request.getFormData();
acceptStartProcessFormData(instance, formData);
acceptTaskFormData(task, formData);
dynamicFormOperationService.saveOrUpdate(entity.getFormId(), formData);
}
代码示例来源:origin: hs-web/hsweb-framework
.getDeployedProcessDefinition(task.getProcessDefinitionId());
String sourceId = task.getTaskDefinitionKey();
代码示例来源:origin: hs-web/hsweb-framework
.getDeployedProcessDefinition(curTask.getProcessDefinitionId());
ActivityImpl currActivity = entity.findActivity(curTask.getTaskDefinitionKey());
.processInstanceId(processInstance.getProcessInstanceId())
.taskId(taskId)
.taskDefineKey(curTask.getTaskDefinitionKey())
.taskName(curTask.getName())
.data(request.getData())
代码示例来源:origin: hs-web/hsweb-framework
target.put("taskId", t.getId());
target.put("taskName", t.getName());
target.put("activityId", t.getTaskDefinitionKey());
targetTask.add(target);
});
.processInstanceId(processInstance.getProcessInstanceId())
.taskId(task.getId())
.taskDefineKey(task.getTaskDefinitionKey())
.taskName(task.getName())
.data(data)
代码示例来源:origin: hs-web/hsweb-framework
.processInstanceId(instance.getProcessInstanceId())
.taskId(task.getId())
.taskDefineKey(task.getTaskDefinitionKey())
.taskName(task.getName())
.build();
代码示例来源:origin: bill1012/AdminEAP
String formKey = formService.getTaskFormKey(task.getProcessDefinitionId(), task.getTaskDefinitionKey());
if (StrUtil.isEmpty(formUrl) && !StrUtil.isEmpty(formKey) && !formKey.endsWith(".form")) {
formUrl = formKey;
代码示例来源:origin: bill1012/AdminEAP
public Result submitTask(String taskId, Map<String, String> formData) {
Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
String formKey = formService.getTaskFormKey(task.getProcessDefinitionId(), task.getTaskDefinitionKey());
Object renderForm = null;
if (!StrUtil.isEmpty(formKey) && formKey.endsWith(".form"))
代码示例来源:origin: org.flowable/flowable5-compatibility
@Override
public String getTaskDefinitionKey() {
return activiti5Task.getTaskDefinitionKey();
}
代码示例来源:origin: org.flowable/flowable5-compatibility
@Override
public String getTaskDefinitionId() {
return activiti5Task.getTaskDefinitionKey();
}
代码示例来源:origin: org.hswebframework.web/hsweb-system-workflow-local
protected void acceptTaskFormData(Task task,
Map<String, Object> formData) {
formData.put("processTaskId", task.getId());
formData.put("processTaskDefineKey", task.getTaskDefinitionKey());
formData.put("processTaskName", task.getName());
}
代码示例来源:origin: org.activiti/activiti-engine
protected void localize(Task task) {
task.setLocalizedName(null);
task.setLocalizedDescription(null);
if (locale != null) {
String processDefinitionId = task.getProcessDefinitionId();
if (processDefinitionId != null) {
ObjectNode languageNode = Context.getLocalizationElementProperties(locale, task.getTaskDefinitionKey(), processDefinitionId, withLocalizationFallback);
if (languageNode != null) {
JsonNode languageNameNode = languageNode.get(DynamicBpmnConstants.LOCALIZATION_NAME);
if (languageNameNode != null && languageNameNode.isNull() == false) {
task.setLocalizedName(languageNameNode.asText());
}
JsonNode languageDescriptionNode = languageNode.get(DynamicBpmnConstants.LOCALIZATION_DESCRIPTION);
if (languageDescriptionNode != null && languageDescriptionNode.isNull() == false) {
task.setLocalizedDescription(languageDescriptionNode.asText());
}
}
}
}
}
代码示例来源:origin: com.bbossgroups.pdp/pdp-workflow
/**
* 根据任务ID查询任务的待办人
*
* @param taskId
* @return
*/
@SuppressWarnings("unchecked")
public List<String> getUsersByTaskId(String taskId) {
Task task = this.getTaskById(taskId);
return (List<String>) this.getRuntimeService().getVariable(
task.getProcessInstanceId(),
task.getTaskDefinitionKey() + "_users");
}
代码示例来源:origin: org.hswebframework.web/hsweb-system-workflow-local
@Override
public void saveTaskForm(ProcessInstance instance, Task task, SaveFormRequest request) {
request.tryValidate();
ActivityConfigEntity entity = activityConfigService.selectByProcessDefineIdAndActivityId(task.getProcessDefinitionId(), task.getTaskDefinitionKey());
if (entity == null || StringUtils.isEmpty(entity.getFormId())) {
return;
}
Map<String, Object> formData = request.getFormData();
acceptStartProcessFormData(instance, formData);
acceptTaskFormData(task, formData);
dynamicFormOperationService.saveOrUpdate(entity.getFormId(), formData);
}
代码示例来源:origin: org.alfresco/alfresco-repository
public WorkflowTaskDefinition getTaskDefinition(Task task)
{
// Get the task-form used (retrieved from cached process-definition)
TaskFormData taskFormData = formService.getTaskFormData(task.getId());
String taskDefId = null;
if(taskFormData != null)
{
taskDefId = taskFormData.getFormKey();
}
// Fetch node based on cached process-definition
ReadOnlyProcessDefinition procDef = activitiUtil.getDeployedProcessDefinition(task.getProcessDefinitionId());
WorkflowNode node = convert(procDef.findActivity(task.getTaskDefinitionKey()), true);
return factory.createTaskDefinition(taskDefId, node, taskDefId, false);
}
代码示例来源:origin: Alfresco/alfresco-repository
public WorkflowTaskDefinition getTaskDefinition(Task task)
{
// Get the task-form used (retrieved from cached process-definition)
TaskFormData taskFormData = formService.getTaskFormData(task.getId());
String taskDefId = null;
if(taskFormData != null)
{
taskDefId = taskFormData.getFormKey();
}
// Fetch node based on cached process-definition
ReadOnlyProcessDefinition procDef = activitiUtil.getDeployedProcessDefinition(task.getProcessDefinitionId());
WorkflowNode node = convert(procDef.findActivity(task.getTaskDefinitionKey()), true);
return factory.createTaskDefinition(taskDefId, node, taskDefId, false);
}
代码示例来源:origin: lcw2004/one
private TaskInfoBean transToTaskInfoBean(Task task) {
TaskInfoBean taskInfoBean = new TaskInfoBean();
taskInfoBean.setTaskDefinitionKey(task.getTaskDefinitionKey());
taskInfoBean.setFormKey(task.getFormKey());
taskInfoBean.setProcessDefinitionId(task.getProcessDefinitionId());
taskInfoBean.setProcessInstanceId(task.getProcessInstanceId());
taskInfoBean.setTaskName(task.getName());
taskInfoBean.setTaskId(task.getId());
taskInfoBean.setAssigneeId(task.getAssignee());
taskInfoBean.setTaskCreateTime(task.getCreateTime());
taskInfoBean.setTaskOwner(task.getOwner());
taskInfoBean.setIsSuspended(task.isSuspended());
ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery().processDefinitionId(task.getProcessDefinitionId()).singleResult();
taskInfoBean.setItemsName(processDefinition.getName());
Map<String, Object> variables = runtimeService.getVariables(task.getProcessInstanceId());
Map<String, Object> variablesLocal = taskService.getVariablesLocal(task.getId());
variables.putAll(variablesLocal);
taskInfoBean.setVariables(variables);
return taskInfoBean;
}
内容来源于网络,如有侵权,请联系作者删除!