}
private void setup(WsdlDefinitions definitions) throws WorkflowException {
// Set LEAD context header.
WorkflowContextHeaderBuilder builder;
if(contextHeader == null){
builder = new WorkflowContextHeaderBuilder(this.notifier.getEventSink()
.getAddress(), this.gfacURL, null, this.topic,
"xbaya-experiment", this.messageBoxURL);
}else{
builder = new WorkflowContextHeaderBuilder(contextHeader);
}
if(builder.getWorkflowMonitoringContext() == null){
builder.addWorkflowMonitoringContext(this.notifier.getEventSink().getAddress(),
this.topic,this.nodeID,this.messageBoxURL);
} else {
builder.getWorkflowMonitoringContext().setWorkflowInstanceId(this.notifier.getWorkflowID().toASCIIString());
}
builder.getWorkflowMonitoringContext().setWorkflowNodeId(this.nodeID);
builder.getWorkflowMonitoringContext().setServiceInstanceId(this.nodeID);
builder.getWorkflowMonitoringContext().setWorkflowTimeStep(1);
builder.setUserIdentifier("xbaya-user");
//todo write a UI component to collect this information and pass it through Header
// builder.setGridMyProxyRepository("myproxy.nersc.gov","fangliu","Jdas7wph",14000);
StickySoapHeaderHandler handler = new StickySoapHeaderHandler("use-workflowcontext-header", builder.getXml());
// Create Invoker
this.invoker = InvokerFactory.createInvoker(this.portTypeQName, definitions, this.gfacURL, this.messageBoxURL,
builder, true);
this.invoker.setup();