snaker-core/src/main/java/org/snaker/engine/core/TaskService.java
private String[] getTaskActors(Object actors) {
		if(actors == null) return null;
		String[] results;
		if(actors instanceof String) {
			//如果值为字符串类型，则使用逗号,分隔
			return ((String)actors).split(",");
        } else if(actors instanceof List){
            //jackson会把stirng[]转成arraylist，此处增加arraylist的逻辑判断,by 红豆冰沙2014.11.21
			List<?> list = (List)actors;
			results = new String[list.size()];
			for(int i = 0; i < list.size(); i++) {
				results[i] = (String)list.get(i);
			}
            return results;
		} else if(actors instanceof Long) {
			//如果为Long类型，则返回1个元素的String[]
			results = new String[1];
			results[0] = String.valueOf((Long)actors);
			return results;
		} else if(actors instanceof Integer) {
			//如果为Integer类型，则返回1个元素的String[]
			results = new String[1];
			results[0] = String.valueOf((Integer)actors);
			return results;
		} else if(actors instanceof String[]) {
			//如果为String[]类型，则直接返回
			return (String[])actors;
		} else {
			//其它类型，抛出不支持的类型异常
			throw new SnakerException("任务参与者对象[" + actors + "]类型不支持."
					+ "合法参数示例:Long,Integer,new String[]{},'10000,20000',List<String>");
		}
	}
private String[] getTaskActors(Object actors) {
		if(actors == null) return null;
		String[] results;
		if(actors instanceof String) {
			//如果值为字符串类型，则使用逗号,分隔
			return ((String)actors).split(",");
        } else if(actors instanceof List){
            //jackson会把stirng[]转成arraylist，此处增加arraylist的逻辑判断,by 红豆冰沙2014.11.21
			List<?> list = (List)actors;
			results = new String[list.size()];
			for(int i = 0; i < list.size(); i++) {
				results[i] = (String)list.get(i);
			}
            return results;
		} else if(actors instanceof Long) {
			//如果为Long类型，则返回1个元素的String[]
			results = new String[1];
			results[0] = String.valueOf((Long)actors);
			return results;
		} else if(actors instanceof Integer) {
			//如果为Integer类型，则返回1个元素的String[]
			results = new String[1];
			results[0] = String.valueOf((Integer)actors);
			return results;
		} else if(actors instanceof String[]) {
			//如果为String[]类型，则直接返回
			return (String[])actors;
		} else {
			//其它类型，抛出不支持的类型异常
			throw new SnakerException("任务参与者对象[" + actors + "]类型不支持."
					+ "合法参数示例:Long,Integer,new String[]{},'10000,20000',List<String>");
		}
	}
private String [ ] getTaskActors ( Object actors ) { if ( actors == null ) return null ; String [ ] results ; if ( actors instanceof String ) { //如果值为字符串类型，则使用逗号,分隔 return ( ( String ) actors ) . split ( "," ) ; } else if ( actors instanceof List ) { //jackson会把stirng[]转成arraylist，此处增加arraylist的逻辑判断,by 红豆冰沙2014.11.21 List < ? > list = ( List ) actors ; results = new String [ list . size ( ) ] ; for ( int i = 0 ; i < list . size ( ) ; i ++ ) { results [ i ] = ( String ) list . get ( i ) ; } return results ; } else if ( actors instanceof Long ) { //如果为Long类型，则返回1个元素的String[] results = new String [ 1 ] ; results [ 0 ] = String . valueOf ( ( Long ) actors ) ; return results ; } else if ( actors instanceof Integer ) { //如果为Integer类型，则返回1个元素的String[] results = new String [ 1 ] ; results [ 0 ] = String . valueOf ( ( Integer ) actors ) ; return results ; } else if ( actors instanceof String [ ] ) { //如果为String[]类型，则直接返回 return ( String [ ] ) actors ; } else { //其它类型，抛出不支持的类型异常 throw new SnakerException ( "任务参与者对象[" + actors + "] 型 支持." + "合法参数示例:Long,Integer,new String[]{},'10000,20000',List<String>"); } }
根据taskmodel指定的assignee属性，从args中取值
将取到的值处理为String[]类型。
@param actors 参与者对象
@return 参与者数组
根据taskmodel指定的assignee属性，从args中取值 将取到的值处理为String [] 类型。