public void triggerCompleted(WorkItem workItem) { String swimlaneName = getHumanTaskNode().getSwimlane(); SwimlaneContextInstance swimlaneContextInstance = getSwimlaneContextInstance(swimlaneName); if (swimlaneContextInstance != null) { String newActorId = (String) workItem.getResult("ActorId"); if (newActorId != null) { swimlaneContextInstance.setActorId(swimlaneName, newActorId); } } super.triggerCompleted(workItem); } }
protected String assignWorkItem(WorkItem workItem) { String actorId = null; // if this human task node is part of a swimlane, check whether an actor // has already been assigned to this swimlane String swimlaneName = getHumanTaskNode().getSwimlane(); SwimlaneContextInstance swimlaneContextInstance = getSwimlaneContextInstance(swimlaneName); if (swimlaneContextInstance != null) { actorId = swimlaneContextInstance.getActorId(swimlaneName); workItem.setParameter("SwimlaneActorId", actorId); } // if no actor can be assigned based on the swimlane, check whether an // actor is specified for this human task if (actorId == null) { actorId = (String) workItem.getParameter("ActorId"); if (actorId != null && swimlaneContextInstance != null && actorId.split(separator).length == 1) { swimlaneContextInstance.setActorId(swimlaneName, actorId); workItem.setParameter("SwimlaneActorId", actorId); } } // always return ActorId from workitem as SwimlaneActorId is kept as separate parameter return (String) workItem.getParameter("ActorId"); }
public void triggerCompleted(WorkItem workItem) { String swimlaneName = getHumanTaskNode().getSwimlane(); SwimlaneContextInstance swimlaneContextInstance = getSwimlaneContextInstance(swimlaneName); if (swimlaneContextInstance != null) { String newActorId = (String) workItem.getResult("ActorId"); if (newActorId != null) { swimlaneContextInstance.setActorId(swimlaneName, newActorId); } } super.triggerCompleted(workItem); } }
protected String assignWorkItem(WorkItem workItem) { String actorId = null; // if this human task node is part of a swimlane, check whether an actor // has already been assigned to this swimlane String swimlaneName = getHumanTaskNode().getSwimlane(); SwimlaneContextInstance swimlaneContextInstance = getSwimlaneContextInstance(swimlaneName); if (swimlaneContextInstance != null) { actorId = swimlaneContextInstance.getActorId(swimlaneName); workItem.setParameter("SwimlaneActorId", actorId); } // if no actor can be assigned based on the swimlane, check whether an // actor is specified for this human task if (actorId == null) { actorId = (String) workItem.getParameter("ActorId"); if (actorId != null && swimlaneContextInstance != null && actorId.split(separator).length == 1) { swimlaneContextInstance.setActorId(swimlaneName, actorId); workItem.setParameter("SwimlaneActorId", actorId); } } // always return ActorId from workitem as SwimlaneActorId is kept as separate parameter return (String) workItem.getParameter("ActorId"); }