GSSCredential proxy = this.myProxyClient.getProxy();
MyLeadConfiguration myleadConfig = new MyLeadConfiguration(
this.configuration.getMyLeadAgentURL(), this.configuration
.getMyLeadUser(), this.configuration.getMyLeadProject());
MyLead myLead = new MyLead(myleadConfig, proxy);
UserX509Credential gpelUserCredential = new UserX509Credential(
proxy, XBayaSecurity.getTrustedCertificates());
WorkflowClient gpelClient = WorkflowEngineManager.getWorkflowClient(XBayaConstants.DEFAULT_GPEL_ENGINE_URL, gpelUserCredential);
gpelClient.setEngineURL(XBayaConstants.DEFAULT_GPEL_ENGINE_URL);
WorkflowCreator workflowCreator = new WorkflowCreator();
Workflow workflow = workflowCreator.createSimpleMathWorkflow();
gpelClient.createScriptAndDeploy(workflow, false);
logger.info("template ID: " + workflow.getUniqueWorkflowName());
String resourceID = myLead.save(workflow, false);
logger.info("resourceID: " + resourceID);
URI templateID2 = myLead.load(resourceID);
Workflow workflow2 = gpelClient.load(templateID2);
logger.info("workflow name: " + workflow2.getName());
assertEquals(workflow.getName(), workflow2.getName());