private void createTasksByVars(ProcessContext context) {
		ProcessNodeTask taskConfig = this.getTask();
		Serializable[] actors = (Serializable[]) context.getUserVariables()
				.get(taskConfig.getActorVar());
		String[] actorTypes = (String[]) context.getUserVariables().get(
				taskConfig.getActorTypeVar());
		if (actors == null)
			throw new RuntimeException(
					"actors should not be null for this task:" + taskConfig
							+ " context:" + context);
		if (actorTypes == null)
			throw new RuntimeException(
					"actorTypes should not be null for this task:" + taskConfig
							+ " context:" + context);
		if (actors.length != actorTypes.length)
			throw new RuntimeException(
					"actors.length should  be equal with actorTypes.length for this task:"
							+ taskConfig + " context:" + context);
		for (int i = 0; i < actors.length; i++) {
			context.getUserVariables().put(taskConfig.getActorVar(), actors[i]);
			context.getUserVariables().put(taskConfig.getActorTypeVar(),
					actorTypes[i]);
			context.getProcessEngine().createTask(context, taskConfig);
		}

		context.getUserVariables().put(taskConfig.getActorVar(), actors);
		context.getUserVariables()
				.put(taskConfig.getActorTypeVar(), actorTypes);

	}