public StandaloneNotificationSender(String topic, Workflow workflow) { this.workflow = workflow; this.workflowID = URI.create(StringUtil.convertToJavaIdentifier(topic)); }
private void setODEAddress(WsdlDefinitions workflowWsdl, String workflowName) { Iterator<WsdlService> serviceItr = workflowWsdl.services().iterator(); if (serviceItr.hasNext()) { Iterator<WsdlPort> portItr = serviceItr.next().ports().iterator(); if (portItr.hasNext()) { org.xmlpull.infoset.XmlElement address = portItr.next().xml().element("address"); if (!(WorkflowConstants.DEFAULT_ODE_URL + "/ode/processes/" + StringUtil .convertToJavaIdentifier(workflowName)).equals(address.attributeValue("location"))) { address.removeAllAttributes(); address.setAttributeValue("location", WorkflowConstants.DEFAULT_ODE_URL + "/ode/processes/" + StringUtil.convertToJavaIdentifier(workflowName)); } } } }
this.topic = topic; this.brokerURL = brokerURL; this.workflowID = URI.create(StringUtil.convertToJavaIdentifier(this.topic)); this.eventSink = new EndpointReference(this.brokerURL); Properties props = new Properties(); URI initiatorServiceID = URI.create(StringUtil.convertToJavaIdentifier(topic)); String initiatorWorkflowNodeID = null; Integer initiatorWorkflowTimeStep = null;
private void setToWorkflow() { String name = this.nameTextField.getText(); if (name != null && name.equals(StringUtil.convertToJavaIdentifier(name)) && (!isWorkflowNameAlreadyPresent(name))) { String description = this.descriptionTextArea.getText(); this.xbayaGUI.getNewGraphCanvas(name, description); hide(); } else { this.nameTextField.setText(StringUtil.convertToJavaIdentifier(name)); JOptionPane.showMessageDialog(this.xbayaGUI.getFrame(), "Invalid Name or a Workflow under the same name already exists. Please consider the Name suggsted", "Invalid Name", JOptionPane.OK_OPTION); } }
public void setOdeLocation(String ODEEprEndingWithPort, String workflowName, WsdlDefinitions wsdl) { Iterator<WsdlService> serviceItr = wsdl.services().iterator(); if (serviceItr.hasNext()) { WsdlService service = serviceItr.next(); Iterator<WsdlPort> portItr = service.ports().iterator(); if (portItr.hasNext()) { WsdlPort port = portItr.next(); org.xmlpull.infoset.XmlElement address = port.xml().element("address"); if (address != null) { URI uri = null; try { uri = new URI(ODEEprEndingWithPort + "/ode/processes/" + StringUtil.convertToJavaIdentifier(workflowName)); } catch (URISyntaxException e) { throw new RuntimeException(e); } address.setAttributeValue("location", uri.toString()); } else { throw new IllegalStateException("No address found in :" + wsdl.xmlStringPretty()); } } else { throw new IllegalStateException("No port found in :" + wsdl.xmlStringPretty()); } } else { throw new IllegalStateException("No service found in :" + wsdl.xmlStringPretty()); } }
/** * Creates unique node ID in the graph that this node belongs to. */ public void createID() { String candidateID = StringUtil.convertToJavaIdentifier(this.name); Node node = this.graph.getNode(candidateID); while (node != null && node != this) { candidateID = StringUtil.incrementName(candidateID); node = this.graph.getNode(candidateID); } this.id = candidateID; for (PortImpl port : getAllPorts()) { port.createID(); } }
gpelProcess.xml().setAttributeValue(NAME, StringUtil.convertToJavaIdentifier(workflowName)); GpelActivity activity = gpelProcess.getActivity();
this.workflowPrefix = StringUtil.convertToJavaIdentifier(this.graph.getName());