/**
* @throws IOException
* @throws XBayaException
*/
public void test() throws IOException, XBayaException {
Workflow subWorkflow = this.workflowCreator.createSimpleMathWorkflow();
URI subWorkflowID = this.workflowClient.createScriptAndDeploy(subWorkflow,
false);
Workflow workflow = createHierarchicalWorkflow(subWorkflowID);
File file = new File(this.temporalDirectory, "hierarchical-test.xwf");
XMLUtil.saveXML(workflow.toXML(), file);
URI workflowTemplateID = this.workflowClient.createScriptAndDeploy(
workflow, false);
logger.info("workflowTemplateID: " + workflowTemplateID);
// Instantiate the workflow template.
GcInstance instance = this.workflowClient.instantiate(workflow,
this.configuration.getDSCURL());
// ID to retrieve the workflow instance
URI instanceID = instance.getInstanceId();
logger.info("instanceID: " + instanceID);
// Start the workflow instance.
WsdlDefinitions wsdl = this.workflowClient.start(instance);
// Create lead context.
LeadContextHeaderHelper leadContextHelper = new LeadContextHeaderHelper();
leadContextHelper.setXBayaConfiguration(this.configuration);
LeadContextHeader leadContext = leadContextHelper
.getLeadContextHeader();
URI messageBoxURL = null;
if (this.configuration.isPullMode()) {
messageBoxURL = this.configuration.getMessageBoxURL();
}
// Create a invoke to invoke the workflow instance.
LEADWorkflowInvoker invoker = new LEADWorkflowInvoker(wsdl,
leadContext, messageBoxURL);
// Set the input values to the invoker.
// Get the input information
List<WSComponentPort> inputs = workflow.getInputs();
for (WSComponentPort input : inputs) {
// Show the information of each input.
// Name