Package org.apache.airavata.workflow.tracking.common

Examples of org.apache.airavata.workflow.tracking.common.ConstructorProps


        api.subscribe(consumerServiceEprs[0], ">", null);

        String topic = "Foo";
        // if remote broker location specified, use WSMessaging publisher;
        ConstructorProps props = ConstructorProps
                .newProps(ConstructorConsts.ENABLE_ASYNC_PUBLISH, "false")
                .set(ConstructorConsts.ENABLE_BATCH_PROVENANCE, "true")
                .set(ConstructorConsts.ANNOTATIONS,
                        AnnotationProps.newProps(AnnotationConsts.ExperimentID,
                                "experiment-id-" + System.currentTimeMillis()).set(AnnotationConsts.UserDN,
                                "/O=IU/OU=Extreme Lab/CN=drlead"));
        if (BROKER_URL != null) {
            EndpointReference brokerEpr = api.createEndpointReference(BROKER_URL, topic);

            props.set(ConstructorConsts.BROKER_EPR, brokerEpr.getAddress());
        } else {
            props.set(ConstructorConsts.PUBLISHER_IMPL_CLASS,
                    "org.apache.airavata.workflow.tracking.impl.publish.LoopbackPublisher");
            props.set(ConstructorConsts.TOPIC, topic);
        }

        System.out.println(ConstructorConsts.ANNOTATIONS);
        System.out.println(ConstructorConsts.KARMA_IMPL);
        runSample();
View Full Code Here


     * @param leadContext
     * @return The constructor props created.
     */
    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;
    }
View Full Code Here

TOP

Related Classes of org.apache.airavata.workflow.tracking.common.ConstructorProps

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.