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; }
/** * Adds a {@link RoleResolver} to a group. * * @param groupResolverClassName * the {@link RoleResolver} class name * @return the ProcessBuilder in order to add BPM elements */ public ProcessBuilder addGroupResolver(final String groupResolverClassName) { Misc.checkArgsNotNull(groupResolverClassName); if ("".equals(groupResolverClassName.trim())) { problems.add(new Problem("Resolver class name is an empty string.", Problem.SEVERITY_ERROR)); } final Object obj = peek(ParticipantDefinitionImpl.class); if (isParticipant(obj)) { final ParticipantDefinitionImpl group = (ParticipantDefinitionImpl) obj; final RoleMapperDefinition resolver = new ConnectorDefinitionImpl(groupResolverClassName); group.setResolver(resolver); final ProcessDefinitionImpl process = getProcess(); process.addGroup(group); push(group); push(resolver); } else { problems.add(new Problem("Unable to add resolver " + groupResolverClassName + " on an object of type: " + getClass(obj), Problem.SEVERITY_ERROR)); } return this; }
/** * Adds a {@link RoleResolver} to a group. * * @param groupResolverClassName * the {@link RoleResolver} class name * @return the ProcessBuilder in order to add BPM elements */ public ProcessBuilder addGroupResolver(final String groupResolverClassName) { Misc.checkArgsNotNull(groupResolverClassName); if ("".equals(groupResolverClassName.trim())) { problems.add(new Problem("Resolver class name is an empty string.", Problem.SEVERITY_ERROR)); } final Object obj = peek(ParticipantDefinitionImpl.class); if (isParticipant(obj)) { final ParticipantDefinitionImpl group = (ParticipantDefinitionImpl) obj; final RoleMapperDefinition resolver = new ConnectorDefinitionImpl(groupResolverClassName); group.setResolver(resolver); final ProcessDefinitionImpl process = getProcess(); process.addGroup(group); push(group); push(resolver); } else { problems.add(new Problem("Unable to add resolver " + groupResolverClassName + " on an object of type: " + getClass(obj), Problem.SEVERITY_ERROR)); } return this; }
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 InternalProcessDefinition(final ProcessDefinition process) { super(process); nbOfAttachments = 0; activities = new HashSet<ActivityDefinition>(); for (final ActivityDefinition activity : process.getActivities()) { activities.add(new InternalActivityDefinition(activity, createBehaviour(activity))); } if (process.getLabel() != null) { labelOrName = process.getLabel(); } else { labelOrName = process.getName(); } connectors = null; for (final ConnectorDefinition connector : process.getConnectors()) { addConnector(new InternalConnectorDefinition(connector, process.getUUID())); } dataFields = null; for (final DataFieldDefinition dataField : process.getDataFields()) { addData(new InternalDataFieldDefinition(dataField, process.getUUID())); } for (final ParticipantDefinition participant : getParticipants()) { if (participant.getRoleMapper() != null) { ((ParticipantDefinitionImpl) participant).setResolver(new InternalConnectorDefinition(participant .getRoleMapper(), process.getUUID())); } } }
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);