protected static Performer getPerformer(ActivityDefinition activity,
ProcessFullDefinition processDef, PackageFullDefinition packageDef) {
ParticipantDefinition participant = findParticipant(packageDef, processDef, activity.getPerformer());
if (participant == null) {
throw new DeploymentRuntimeException("Wrong performer: " + activity.getPerformer()
+ ". No participant is defined within the package with processDefinitionUUID: " + activity.getPerformer());
}
ClassInfo roleMapper = null;
ClassInfo performerAssign = null;
if (participant.getRoleMapper() != null && participant.getRoleMapper().getClassName() != null) {
roleMapper = new ClassInfo(participant.getRoleMapper().getClassName(), participant.getRoleMapper().getParameters());
}
if (activity.getPerformerAssign() != null && activity.getPerformerAssign().getClassName() != null) {
performerAssign = new ClassInfo(activity.getPerformerAssign().getClassName(),
activity.getPerformerAssign().getParameters());
}
return new Performer(participant.getParticipantId(), participant.getParticipantType(),
participant.getUUID(), roleMapper, performerAssign);
}