当前位置: 首页>>代码示例>>Java>>正文


Java UserTaskActivityBehavior.getTaskDefinition方法代码示例

本文整理汇总了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;
}
 
开发者ID:EleTeam,项目名称:Shop-for-JavaWeb,代码行数:56,代码来源:ActTaskService.java

示例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;
 }
 
开发者ID:batizhao,项目名称:microservice,代码行数:60,代码来源:WorkflowTraceService.java

示例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;
}
 
开发者ID:v5developer,项目名称:maven-framework-project,代码行数:59,代码来源:WorkflowTraceService.java


注:本文中的org.activiti.engine.impl.bpmn.behavior.UserTaskActivityBehavior.getTaskDefinition方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。