本文整理汇总了Java中org.activiti.engine.impl.bpmn.behavior.UserTaskActivityBehavior.getTaskDefinition方法的典型用法代码示例。如果您正苦于以下问题:Java UserTaskActivityBehavior.getTaskDefinition方法的具体用法?Java UserTaskActivityBehavior.getTaskDefinition怎么用?Java UserTaskActivityBehavior.getTaskDefinition使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.activiti.engine.impl.bpmn.behavior.UserTaskActivityBehavior
的用法示例。
在下文中一共展示了UserTaskActivityBehavior.getTaskDefinition方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: packageSingleActivitiInfo
import org.activiti.engine.impl.bpmn.behavior.UserTaskActivityBehavior; //导入方法依赖的package包/类
/**
* 封装输出信息,包括:当前节点的X、Y坐标、变量信息、任务类型、任务描述
* @param activity
* @param processInstance
* @param currentActiviti
* @return
*/
private Map<String, Object> packageSingleActivitiInfo(ActivityImpl activity, ProcessInstance processInstance,
boolean currentActiviti) throws Exception {
Map<String, Object> vars = new HashMap<String, Object>();
Map<String, Object> activityInfo = new HashMap<String, Object>();
activityInfo.put("currentActiviti", currentActiviti);
setPosition(activity, activityInfo);
setWidthAndHeight(activity, activityInfo);
Map<String, Object> properties = activity.getProperties();
vars.put("节点名称", properties.get("name"));
vars.put("任务类型", ActUtils.parseToZhType(properties.get("type").toString()));
ActivityBehavior activityBehavior = activity.getActivityBehavior();
logger.debug("activityBehavior={}", activityBehavior);
if (activityBehavior instanceof UserTaskActivityBehavior) {
Task currentTask = null;
// 当前节点的task
if (currentActiviti) {
currentTask = getCurrentTaskInfo(processInstance);
}
// 当前任务的分配角色
UserTaskActivityBehavior userTaskActivityBehavior = (UserTaskActivityBehavior) activityBehavior;
TaskDefinition taskDefinition = userTaskActivityBehavior.getTaskDefinition();
Set<Expression> candidateGroupIdExpressions = taskDefinition.getCandidateGroupIdExpressions();
if (!candidateGroupIdExpressions.isEmpty()) {
// 任务的处理角色
setTaskGroup(vars, candidateGroupIdExpressions);
// 当前处理人
if (currentTask != null) {
setCurrentTaskAssignee(vars, currentTask);
}
}
}
vars.put("节点说明", properties.get("documentation"));
String description = activity.getProcessDefinition().getDescription();
vars.put("描述", description);
logger.debug("trace variables: {}", vars);
activityInfo.put("vars", vars);
return activityInfo;
}
示例2: packageSingleActivitiInfo
import org.activiti.engine.impl.bpmn.behavior.UserTaskActivityBehavior; //导入方法依赖的package包/类
/**
* 封装输出信息,包括:当前节点的X、Y坐标、变量信息、任务类型、任务描述
*
* @param activity
* @param processInstance
* @param currentActiviti
* @return
*/
private Map<String, Object> packageSingleActivitiInfo(ActivityImpl activity, ProcessInstance processInstance,
boolean currentActiviti) throws Exception {
Map<String, Object> vars = new HashMap<String, Object>();
Map<String, Object> activityInfo = new HashMap<String, Object>();
activityInfo.put("currentActiviti", currentActiviti);
setPosition(activity, activityInfo);
setWidthAndHeight(activity, activityInfo);
Map<String, Object> properties = activity.getProperties();
vars.put("任务类型", WorkflowUtils.parseToZhType(properties.get("type").toString()));
ActivityBehavior activityBehavior = activity.getActivityBehavior();
logger.debug("activityBehavior={}", activityBehavior);
if (activityBehavior instanceof UserTaskActivityBehavior) {
Task currentTask = null;
/*
* 当前节点的task
*/
if (currentActiviti) {
currentTask = getCurrentTaskInfo(processInstance);
}
/*
* 当前任务的分配角色
*/
UserTaskActivityBehavior userTaskActivityBehavior = (UserTaskActivityBehavior) activityBehavior;
TaskDefinition taskDefinition = userTaskActivityBehavior.getTaskDefinition();
Set<Expression> candidateGroupIdExpressions = taskDefinition.getCandidateGroupIdExpressions();
if (!candidateGroupIdExpressions.isEmpty()) {
// 任务的处理角色
setTaskGroup(vars, candidateGroupIdExpressions);
// 当前处理人
if (currentTask != null) {
setCurrentTaskAssignee(vars, currentTask);
}
}
}
vars.put("节点说明", properties.get("documentation"));
String description = activity.getProcessDefinition().getDescription();
vars.put("描述", description);
logger.debug("trace variables: {}", vars);
activityInfo.put("vars", vars);
return activityInfo;
}
示例3: packageSingleActivitiInfo
import org.activiti.engine.impl.bpmn.behavior.UserTaskActivityBehavior; //导入方法依赖的package包/类
/**
* 封装输出信息,包括:当前节点的X、Y坐标、变量信息、任务类型、任务描述
* @param activity
* @param processInstance
* @param currentActiviti
* @return
*/
private Map<String, Object> packageSingleActivitiInfo(ActivityImpl activity, ProcessInstance processInstance,
boolean currentActiviti) throws Exception {
Map<String, Object> vars = new HashMap<String, Object>();
Map<String, Object> activityInfo = new HashMap<String, Object>();
activityInfo.put("currentActiviti", currentActiviti);
setPosition(activity, activityInfo);
setWidthAndHeight(activity, activityInfo);
Map<String, Object> properties = activity.getProperties();
vars.put("任务类型", WorkflowUtils.parseToZhType(properties.get("type").toString()));
ActivityBehavior activityBehavior = activity.getActivityBehavior();
logger.debug("activityBehavior={}", activityBehavior);
if (activityBehavior instanceof UserTaskActivityBehavior) {
Task currentTask = null;
/*
* 当前节点的task
*/
if (currentActiviti) {
currentTask = getCurrentTaskInfo(processInstance);
}
/*
* 当前任务的分配角色
*/
UserTaskActivityBehavior userTaskActivityBehavior = (UserTaskActivityBehavior) activityBehavior;
TaskDefinition taskDefinition = userTaskActivityBehavior.getTaskDefinition();
Set<Expression> candidateGroupIdExpressions = taskDefinition.getCandidateGroupIdExpressions();
if (!candidateGroupIdExpressions.isEmpty()) {
// 任务的处理角色
setTaskGroup(vars, candidateGroupIdExpressions);
// 当前处理人
if (currentTask != null) {
setCurrentTaskAssignee(vars, currentTask);
}
}
}
vars.put("节点说明", properties.get("documentation"));
String description = activity.getProcessDefinition().getDescription();
vars.put("描述", description);
logger.debug("trace variables: {}", vars);
activityInfo.put("vars", vars);
return activityInfo;
}