/* (non-Javadoc)
* @see edu.indiana.vortex2.gpel.WorkflowContext#prepare(edu.indiana.vortex2.WorkflowClient)
*/
public void prepare(WorkflowClient client, Workflow workflow)
throws GSSException, URISyntaxException {
LeadContextHeader leadContextHeader = new LeadContextHeader(this.topic,
proxy.getName().toString());
leadContextHeader.setXRegistryUrl(new URI(
XBayaConstants.DEFAULT_XREGISTRY_URL.toString() + "?wsdl"));
leadContextHeader.setGfacUrl(new URI(XBayaConstants.DEFAULT_GFAC_URL
.toString()
+ "?wsdl"));
leadContextHeader.setDscUrl(XBayaConstants.DEFAULT_DSC_URL);
// The followings might overwrite some variables.
leadContextHeader.setWorkflowTemplateId(workflow.getGPELTemplateID());
leadContextHeader.setWorkflowInstanceId(new URI(client.getInstanceID()));
leadContextHeader.setUserDn(proxy.getName().toString());
leadContextHeader.setMyleadAgentUrl(new URI(
XBayaConstants.DEFAULT_MYLEAD_AGENT_URL.toString() + "?wsdl"));
WsaEndpointReference eventSink = WseClientAPI.createEndpointReference(
XBayaConstants.DEFAULT_BROKER_URL.toString(), topic);
leadContextHeader.setEventSink(eventSink);
leadContextHeader.setExperimentId("urn:uuid:"+topic);
this.header = leadContextHeader;
}