*/
public static ConstructorProps createConstructorPropsFromLeadContext(LeadContextHeader leadContext) {
EndpointReference sinkEpr = leadContext.getEventSink();
ConstructorProps props = ConstructorProps.newProps(ConstructorConsts.BROKER_EPR, sinkEpr.getAddress());
AnnotationProps annotationProps = AnnotationProps.newProps();
String experimentId = leadContext.getExperimentId();
if (experimentId != null) {
annotationProps.set(AnnotationConsts.ExperimentID, experimentId);
}
URI workflowTemplateId = leadContext.getWorkflowTemplateId();
if (workflowTemplateId != null) {
annotationProps.set(AnnotationConsts.AbstractWorkflowID, workflowTemplateId.toString());
}
String userDn = leadContext.getUserDn();
if (userDn != null) {
annotationProps.set(AnnotationConsts.UserDN, userDn);
}
props.set(ConstructorConsts.ANNOTATIONS, annotationProps);
return props;
}