private Set<ParticipantDefinition> getParticipantCopy(final Set<ParticipantDefinition> src) { final Set<ParticipantDefinition> result = new HashSet<ParticipantDefinition>(); if (src != null) { for (final ParticipantDefinition p : src) { result.add(new ParticipantDefinitionImpl(p)); } } return result; }
private Set<ParticipantDefinition> getParticipantCopy(Set<ParticipantDefinition> src) { Set<ParticipantDefinition> result = new HashSet<ParticipantDefinition>(); if (src != null) { for (ParticipantDefinition p : src) { result.add(new ParticipantDefinitionImpl(p)); } } return result; }
public ParticipantDefinition getProcessParticipant(ProcessDefinitionUUID processUUID, String participantId) throws ProcessNotFoundException, ParticipantNotFoundException { FacadeUtil.checkArgsNotNull(processUUID, participantId); Set<ParticipantDefinition> participants = getProcessParticipants(processUUID); if (participants != null) { for (ParticipantDefinition participant : participants) { if (participant.getParticipantId().equals(participantId)) { return new ParticipantDefinitionImpl(participant); } } } throw new ParticipantNotFoundException(participantId, processUUID); }
@Override public ParticipantDefinition getProcessParticipant(final ProcessDefinitionUUID processUUID, final String participantId) throws ProcessNotFoundException, ParticipantNotFoundException { FacadeUtil.checkArgsNotNull(processUUID, participantId); final Set<ParticipantDefinition> participants = getProcessParticipants(processUUID); if (participants != null) { for (final ParticipantDefinition participant : participants) { if (participant.getName().equals(participantId)) { return new ParticipantDefinitionImpl(participant); } } } throw new ParticipantNotFoundException("bai_QDAPII_10", participantId, processUUID); }
this.participants = new HashSet<ParticipantDefinition>(); for (ParticipantDefinition d : participants) { this.participants.add(new ParticipantDefinitionImpl(d));
this.participants = new HashSet<ParticipantDefinition>(); for (final ParticipantDefinition d : participants) { this.participants.add(new ParticipantDefinitionImpl(d));
this.participants = new HashSet<ParticipantDefinition>(); for (ParticipantDefinition d : participants) { this.participants.add(new ParticipantDefinitionImpl(d));
this.participants = new HashSet<ParticipantDefinition>(); for (final ParticipantDefinition d : participants) { this.participants.add(new ParticipantDefinitionImpl(d));
/** * Adds a group. * * @param groupName * the group name * @return the ProcessBuilder in order to add BPM elements */ public ProcessBuilder addGroup(final String groupName) { Misc.checkArgsNotNull(groupName); if ("".equals(groupName.trim())) { problems.add(new Problem("Group name is an empty string.", Problem.SEVERITY_ERROR)); } final Object obj = peek(ProcessDefinitionImpl.class); if (isProcess(obj)) { final ProcessDefinitionImpl process = (ProcessDefinitionImpl) obj; final ParticipantDefinitionImpl group = new ParticipantDefinitionImpl(process.getUUID(), groupName); process.addGroup(group); push(group); } else { problems.add(new Problem("Unable to add group " + groupName + " on an object of type: " + getClass(obj), Problem.SEVERITY_ERROR)); } return this; }
/** * Adds a group. * * @param groupName * the group name * @return the ProcessBuilder in order to add BPM elements */ public ProcessBuilder addGroup(final String groupName) { Misc.checkArgsNotNull(groupName); if ("".equals(groupName.trim())) { problems.add(new Problem("Group name is an empty string.", Problem.SEVERITY_ERROR)); } final Object obj = peek(ProcessDefinitionImpl.class); if (isProcess(obj)) { final ProcessDefinitionImpl process = (ProcessDefinitionImpl) obj; final ParticipantDefinitionImpl group = new ParticipantDefinitionImpl(process.getUUID(), groupName); process.addGroup(group); push(group); } else { problems.add(new Problem("Unable to add group " + groupName + " on an object of type: " + getClass(obj), Problem.SEVERITY_ERROR)); } return this; }
/** * Adds a human to a process. * * @param humanName * the human name * @return the ProcessBuilder in order to add BPM elements */ public ProcessBuilder addHuman(final String humanName) { Misc.checkArgsNotNull(humanName); if ("".equals(humanName.trim())) { problems.add(new Problem("Human name is an empty string.", Problem.SEVERITY_ERROR)); } final Object obj = peek(ProcessDefinitionImpl.class); if (isProcess(obj)) { final ProcessDefinitionImpl process = (ProcessDefinitionImpl) obj; final ParticipantDefinitionImpl group = new ParticipantDefinitionImpl(process.getUUID(), humanName); process.addGroup(group); push(group); } else { problems.add(new Problem("Unable to add human " + humanName + " on an object of type: " + getClass(obj), Problem.SEVERITY_ERROR)); } return this; }
/** * Adds a human to a process. * * @param humanName * the human name * @return the ProcessBuilder in order to add BPM elements */ public ProcessBuilder addHuman(final String humanName) { Misc.checkArgsNotNull(humanName); if ("".equals(humanName.trim())) { problems.add(new Problem("Human name is an empty string.", Problem.SEVERITY_ERROR)); } final Object obj = peek(ProcessDefinitionImpl.class); if (isProcess(obj)) { final ProcessDefinitionImpl process = (ProcessDefinitionImpl) obj; final ParticipantDefinitionImpl group = new ParticipantDefinitionImpl(process.getUUID(), humanName); process.addGroup(group); push(group); } else { problems.add(new Problem("Unable to add human " + humanName + " on an object of type: " + getClass(obj), Problem.SEVERITY_ERROR)); } return this; }
ParticipantDefinition participant = new ParticipantDefinitionImpl(recordUUID, id, getObject(PackageDefinitionUUID.class, parse), getObject(ProcessDefinitionUUID.class, parse), description, roleMapper, externalReference, participantType, name);