ApplicationGlobalContext context = new ApplicationGlobalContext();
FileInputStream fis = new FileInputStream(context.getCredentials().getHostcertsKeyFile());
GlobusCredential globusCred = new GlobusCredential(fis);
context.setGssCredential(new GlobusGSSCredentialImpl(globusCred, GSSCredential.INITIATE_AND_ACCEPT));
XBayaWorkflowUtil xRegistryUtil = new XBayaWorkflowUtil();
this.workflow = xRegistryUtil.getWorkflowFromRegistry(workflowId, context);
// WorkflowWebResource workflowWebResource = null;
BufferedImage buffer = workflow.getWorkflowImage();