}
if (needDeployment) {
deployStreamControlWorkflowIfNecessary(this.engine
.getWorkflow());
WorkflowProxyClient wpClient = new WorkflowProxyClient();
wpClient.setXRegistryUrl(this.engine.getConfiguration()
.getXRegistryURL());
wpClient.setEngineURL(this.engine.getConfiguration()
.getProxyURI());
wpClient.setXBayaEngine(this.engine);
GSSCredential proxy = null;
if (wpClient.isSecure()) {
MyProxyClient myProxyClient = this.engine
.getMyProxyClient();
proxy = myProxyClient.getProxy();
UserX509Credential credential = new UserX509Credential(
proxy, XBayaSecurity.getTrustedCertificates());
wpClient.setUserX509Credential(credential);
}
this.engine.getGUI().getGraphCanvas().setNameAndDescription(
"Control_" + oldWorkflowName,
"Control_" + oldWorkflowName);
engine.getWorkflow().setName("Control_" + oldWorkflowName);