Created
May 18, 2014 21:45
-
-
Save jeqo/77c0a80ca2cb232f1629 to your computer and use it in GitHub Desktop.
Method to get participants properties from Oracle BPM Workspace
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public List<ParticipantProperties> getParticipantsProperties(List<String> participantsNames) { | |
List<ParticipantProperties> participantsProperties = | |
new ArrayList<ParticipantProperties>(); | |
try { | |
beginConnection(); | |
IBPMServiceClient bpmServiceClient = | |
clientFactory.getBPMServiceClient(); | |
IBPMOrganizationService bpmOrganizationService = | |
bpmServiceClient.getBPMOrganizationService(); | |
List<Participant> participantes = new ArrayList<Participant>(); | |
for (String participantName : participantsNames) { | |
PrincipleRefType principleRef = new MemberType(); | |
principleRef.setName(participantName); | |
principleRef.setRealm("jazn.com"); | |
principleRef.setType(ParticipantTypeEnum.USER); | |
Participant participante = new Participant(principleRef); | |
participantes.add(participante); | |
} | |
participantsProperties = | |
bpmOrganizationService.getPropertiesOfParticipants(bpmContext, | |
participantes); | |
} catch (Exception e) { | |
e.printStackTrace(); | |
} finally { | |
closeConnection(); | |
} | |
return participantsProperties; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment