本文整理汇总了Java中org.activiti.engine.impl.persistence.entity.TaskEntity.setDescriptionWithoutCascade方法的典型用法代码示例。如果您正苦于以下问题:Java TaskEntity.setDescriptionWithoutCascade方法的具体用法?Java TaskEntity.setDescriptionWithoutCascade怎么用?Java TaskEntity.setDescriptionWithoutCascade使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.activiti.engine.impl.persistence.entity.TaskEntity
的用法示例。
在下文中一共展示了TaskEntity.setDescriptionWithoutCascade方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createSubTask
import org.activiti.engine.impl.persistence.entity.TaskEntity; //导入方法依赖的package包/类
public void createSubTask(TaskEntity parentTask, String assignee) {
TaskEntity task = TaskEntity.create(new Date());
task.setProcessDefinitionId(parentTask.getProcessDefinitionId());
// task.setId(historicTaskInstanceEntity.getId());
task.setAssigneeWithoutCascade(assignee);
task.setParentTaskIdWithoutCascade(parentTask.getId());
task.setNameWithoutCascade(parentTask.getName());
task.setTaskDefinitionKey(parentTask.getTaskDefinitionKey());
task.setExecutionId(parentTask.getExecutionId());
task.setPriority(parentTask.getPriority());
task.setProcessInstanceId(parentTask.getProcessInstanceId());
task.setDescriptionWithoutCascade(parentTask.getDescription());
task.setCategory("subtask");
Context.getCommandContext().getTaskEntityManager().insert(task);
}
示例2: processHistoryTask
import org.activiti.engine.impl.persistence.entity.TaskEntity; //导入方法依赖的package包/类
public void processHistoryTask(
HistoricTaskInstanceEntity historicTaskInstanceEntity,
HistoricActivityInstanceEntity historicActivityInstanceEntity) {
historicTaskInstanceEntity.setEndTime(null);
historicTaskInstanceEntity.setDurationInMillis(null);
historicActivityInstanceEntity.setEndTime(null);
historicActivityInstanceEntity.setDurationInMillis(null);
TaskEntity task = TaskEntity.create(new Date());
task.setProcessDefinitionId(historicTaskInstanceEntity
.getProcessDefinitionId());
task.setId(historicTaskInstanceEntity.getId());
task.setAssigneeWithoutCascade(historicTaskInstanceEntity.getAssignee());
task.setParentTaskIdWithoutCascade(historicTaskInstanceEntity
.getParentTaskId());
task.setNameWithoutCascade(historicTaskInstanceEntity.getName());
task.setTaskDefinitionKey(historicTaskInstanceEntity
.getTaskDefinitionKey());
task.setExecutionId(historicTaskInstanceEntity.getExecutionId());
task.setPriority(historicTaskInstanceEntity.getPriority());
task.setProcessInstanceId(historicTaskInstanceEntity
.getProcessInstanceId());
task.setDescriptionWithoutCascade(historicTaskInstanceEntity
.getDescription());
task.setTenantId(historicTaskInstanceEntity.getTenantId());
Context.getCommandContext().getTaskEntityManager().insert(task);
try {
HumanTaskConnector humanTaskConnector = ApplicationContextHelper
.getBean(HumanTaskConnector.class);
// humantask
humanTaskConnector
.removeHumanTaskByTaskId(historicTaskInstanceEntity.getId());
this.createHumanTask(task, historicTaskInstanceEntity);
} catch (Exception ex) {
logger.error(ex.getMessage(), ex);
}
ExecutionEntity executionEntity = Context.getCommandContext()
.getExecutionEntityManager()
.findExecutionById(historicTaskInstanceEntity.getExecutionId());
executionEntity
.setActivity(getActivity(historicActivityInstanceEntity));
}
示例3: processHistoryTask
import org.activiti.engine.impl.persistence.entity.TaskEntity; //导入方法依赖的package包/类
/**
* 根据任务历史,创建待办任务.
*/
public void processHistoryTask(
HistoricTaskInstanceEntity historicTaskInstanceEntity,
HistoricActivityInstanceEntity historicActivityInstanceEntity) {
/*
* historicTaskInstanceEntity.setEndTime(null); historicTaskInstanceEntity.setDurationInMillis(null);
* historicActivityInstanceEntity.setEndTime(null); historicActivityInstanceEntity.setDurationInMillis(null);
*/
// 创建新任务
TaskEntity task = TaskEntity.create(new Date());
task.setProcessDefinitionId(historicTaskInstanceEntity
.getProcessDefinitionId());
// task.setId(historicTaskInstanceEntity.getId());
// task.setAssigneeWithoutCascade(historicTaskInstanceEntity.getAssignee());
task.setAssigneeWithoutCascade(this.userId);
task.setParentTaskIdWithoutCascade(historicTaskInstanceEntity
.getParentTaskId());
task.setNameWithoutCascade(historicTaskInstanceEntity.getName());
task.setTaskDefinitionKey(historicTaskInstanceEntity
.getTaskDefinitionKey());
task.setExecutionId(historicTaskInstanceEntity.getExecutionId());
task.setPriority(historicTaskInstanceEntity.getPriority());
task.setProcessInstanceId(historicTaskInstanceEntity
.getProcessInstanceId());
task.setExecutionId(historicTaskInstanceEntity.getExecutionId());
task.setDescriptionWithoutCascade(historicTaskInstanceEntity
.getDescription());
task.setTenantId(historicTaskInstanceEntity.getTenantId());
Context.getCommandContext().getTaskEntityManager().insert(task);
// 把流程指向任务对应的节点
ExecutionEntity executionEntity = Context.getCommandContext()
.getExecutionEntityManager()
.findExecutionById(historicTaskInstanceEntity.getExecutionId());
executionEntity
.setActivity(getActivity(historicActivityInstanceEntity));
// 创建HistoricActivityInstance
Context.getCommandContext().getHistoryManager()
.recordActivityStart(executionEntity);
// 创建HistoricTaskInstance
Context.getCommandContext().getHistoryManager()
.recordTaskCreated(task, executionEntity);
Context.getCommandContext().getHistoryManager().recordTaskId(task);
// 更新ACT_HI_ACTIVITY里的assignee字段
Context.getCommandContext().getHistoryManager()
.recordTaskAssignment(task);
try {
// humanTask
this.createHumanTask(task, historicTaskInstanceEntity);
} catch (Exception ex) {
logger.error(ex.getMessage(), ex);
}
}