stream.writeLong(((HumanTaskNodeInstance) nodeInstance).getWorkItemId()); List<Long> timerInstances = ((HumanTaskNodeInstance) nodeInstance).getTimerInstances(); if (timerInstances != null) { stream.writeInt(timerInstances.size());
nodeInstance = new HumanTaskNodeInstance(); ((HumanTaskNodeInstance) nodeInstance).internalSetWorkItemId(stream.readLong()); nbTimerInstances = stream.readInt(); if (nbTimerInstances > 0) { timerInstances.add(stream.readLong()); ((HumanTaskNodeInstance) nodeInstance).internalSetTimerInstances(timerInstances);
protected WorkItem createWorkItem(WorkItemNode workItemNode) { WorkItem workItem = super.createWorkItem(workItemNode); String actorId = assignWorkItem(workItem); if (actorId != null) { ((org.drools.core.process.instance.WorkItem) workItem).setParameter("ActorId", actorId); } return workItem; }
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); } }
.setWorkItemId( ((HumanTaskNodeInstance) nodeInstance).getWorkItemId() ); List<Long> timerInstances = ((HumanTaskNodeInstance) nodeInstance).getTimerInstances(); if ( timerInstances != null ) { for ( Long id : timerInstances ) { _task.setErrorHandlingProcessInstanceId(((HumanTaskNodeInstance) nodeInstance).getExceptionHandlingProcessInstanceId()); _content = JBPMMessages.ProcessInstance.NodeInstanceContent.newBuilder() .setType( NodeInstanceType.HUMAN_TASK_NODE )
.setParameter("workItemId", ((HumanTaskNodeInstance) nodeInstance).getWorkItemId()) .getSingleResult(); String name = ((HumanTaskNode) upgradedNode).getName();
public HumanTaskNode getHumanTaskNode() { return (HumanTaskNode) getNode(); }
.setWorkItemId( ((HumanTaskNodeInstance) nodeInstance).getWorkItemId() ); List<Long> timerInstances = ((HumanTaskNodeInstance) nodeInstance).getTimerInstances(); if ( timerInstances != null ) { for ( Long id : timerInstances ) { _task.setErrorHandlingProcessInstanceId(((HumanTaskNodeInstance) nodeInstance).getExceptionHandlingProcessInstanceId()); _content = JBPMMessages.ProcessInstance.NodeInstanceContent.newBuilder() .setType( NodeInstanceType.HUMAN_TASK_NODE )
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"); }
.setParameter("workItemId", ((HumanTaskNodeInstance) nodeInstance).getWorkItemId()) .getSingleResult(); String name = ((HumanTaskNode) upgradedNode).getName();
public HumanTaskNode getHumanTaskNode() { return (HumanTaskNode) getNode(); }
nodeInstance = new HumanTaskNodeInstance(); ((HumanTaskNodeInstance) nodeInstance).internalSetWorkItemId( _content.getHumanTask().getWorkItemId() ); if ( _content.getHumanTask().getTimerInstanceIdCount() > 0 ) { List<Long> timerInstances = new ArrayList<Long>(); timerInstances.add( _timerId ); ((HumanTaskNodeInstance) nodeInstance).internalSetTimerInstances( timerInstances );
stream.writeLong(((HumanTaskNodeInstance) nodeInstance).getWorkItemId()); List<Long> timerInstances = ((HumanTaskNodeInstance) nodeInstance).getTimerInstances(); if (timerInstances != null) { stream.writeInt(timerInstances.size());
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 WorkItem createWorkItem(WorkItemNode workItemNode) { WorkItem workItem = super.createWorkItem(workItemNode); String actorId = assignWorkItem(workItem); if (actorId != null) { ((org.drools.core.process.instance.WorkItem) workItem).setParameter("ActorId", actorId); } return workItem; }
nodeInstance = new HumanTaskNodeInstance(); ((HumanTaskNodeInstance) nodeInstance).internalSetWorkItemId(stream.readLong()); nbTimerInstances = stream.readInt(); if (nbTimerInstances > 0) { timerInstances.add(stream.readLong()); ((HumanTaskNodeInstance) nodeInstance).internalSetTimerInstances(timerInstances);
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"); }
nodeInstance = new HumanTaskNodeInstance(); ((HumanTaskNodeInstance) nodeInstance).internalSetWorkItemId( _content.getHumanTask().getWorkItemId() ); if ( _content.getHumanTask().getTimerInstanceIdCount() > 0 ) { List<Long> timerInstances = new ArrayList<Long>(); timerInstances.add( _timerId ); ((HumanTaskNodeInstance) nodeInstance).internalSetTimerInstances( timerInstances );