首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

activiti当前任务高亮(解决乱码有关问题)

2013-08-06 
activiti当前任务高亮(解决乱码问题)package com.winse.activiti.util import java.util.ArrayListimpor

activiti当前任务高亮(解决乱码问题)

package com.winse.activiti.util; import java.util.ArrayList;import java.util.List; import org.activiti.engine.RuntimeService;import org.activiti.engine.impl.persistence.entity.ProcessDefinitionEntity;import org.activiti.engine.impl.pvm.process.ActivityImpl; /** *  * @author winse *  */public class ActivityUtil {   public static List<String> getActiveActivityIds(RuntimeService runtimeService, String processInstanceId) {// 会通过id -> parent_id -> parent_id -> ... 循环找出所有的执行中的子流程return runtimeService.getActiveActivityIds(processInstanceId);} public static List<ActivityImpl> getFlatAllActivities(ProcessDefinitionEntity processDefinition) {List<ActivityImpl> result = new ArrayList<ActivityImpl>();flattenActivities(result, processDefinition.getActivities());return result;} private static void flattenActivities(List<ActivityImpl> container, List<ActivityImpl> ancestors) {if (ancestors.size() > 0) {for (ActivityImpl activity : ancestors) {flattenActivities(container, activity.getActivities());}container.addAll(ancestors);}} }


热点排行