Package au.edu.qut.yawl.elements

Examples of au.edu.qut.yawl.elements.YAWLServiceReference


                    unmarshalSpecifications(yawlXMLFile.getAbsolutePath()).get(0);

        _engine.loadSpecification(_specification);
        URI serviceURI = new URI("mock://mockedURL/testingCaseCompletion");

        YAWLServiceReference service = new YAWLServiceReference(serviceURI.toString(), null);
        _engine.addYawlService(service);
        _idForTopNet = _engine.startCase(null, null, _specification.getID(), null, serviceURI);

        ObserverGateway og = new ObserverGateway() {
            public void cancelAllWorkItemsInGroupOf(
View Full Code Here


                Iterator yawlServiceIter = doc.getRootElement().getChildren().iterator();
                XMLOutputter out = new XMLOutputter(Format.getCompactFormat());

                while (yawlServiceIter.hasNext()) {
                    Element yawlServiceElem = (Element) yawlServiceIter.next();
                    YAWLServiceReference service =
                            YAWLServiceReference.unmarshal(out.outputString(yawlServiceElem));
                    yawlServices.add(service);
                }
            }
        } catch (JDOMException e) {
View Full Code Here

     * @param serviceDocumentation
     * @param sessionHandle
     * @return result message success / failure ...reason
     */
    public String addYAWLService(String serviceURI, String serviceDocumentation, String sessionHandle) throws IOException {
        YAWLServiceReference service = new YAWLServiceReference(serviceURI, null);
        service.setDocumentation(serviceDocumentation);
        return _interfaceAClient.setYAWLService(service, sessionHandle);
    }
View Full Code Here

            return OPEN_FAILURE + e.getMessage() + CLOSE_FAILURE;
        }
        Set yawlServices = _engine.getYAWLServices();
        StringBuffer result = new StringBuffer();
        for (Iterator iterator = yawlServices.iterator(); iterator.hasNext();) {
            YAWLServiceReference service = (YAWLServiceReference) iterator.next();
            result.append(service.toXML());
        }
        return result.toString();
    }
View Full Code Here

        try {
            _userList.checkConnection(sessionHandle);
        } catch (YAuthenticationException e) {
            return OPEN_FAILURE + e.getMessage() + CLOSE_FAILURE;
        }
        YAWLServiceReference service = _engine.getRegisteredYawlService(yawlServiceURI);
        if (null != service) {
            if (service.getDocumentation() != null) {
                return service.getDocumentation();
            } else {
                return OPEN_FAILURE +
                        "Yawl service [" + yawlServiceURI + "]" +
                        " has no documentation." +
                        CLOSE_FAILURE;
View Full Code Here

        try {
            _userList.checkConnection(sessionHandle);
        } catch (YAuthenticationException e) {
            return OPEN_FAILURE + e.getMessage() + CLOSE_FAILURE;
        }
        YAWLServiceReference service = YAWLServiceReference.unmarshal(serviceStr);
        if (null != service) {
            if (null == _engine.getRegisteredYawlService(service.getURI())) {
                try {
                    _engine.addYawlService(service);
                    return SUCCESS;
                } catch (YPersistenceException e) {
                    enginePersistenceFailure = true;
                    return OPEN_FAILURE + e.getMessage() + CLOSE_FAILURE;
                }
            } else {
                return OPEN_FAILURE + "Engine has already registered a service with " +
                        "the same URI [" +
                        service.toXML() + "]" + ".</reason></failure>";
            }
        } else {
            return OPEN_FAILURE + "Failed to parse yawl service from [" +
                    serviceStr + "]" + ".</reason></failure>";
        }
View Full Code Here

        try {
            _userList.checkConnection(sessionHandle);
        } catch (YAuthenticationException e) {
            return OPEN_FAILURE + e.getMessage() + CLOSE_FAILURE;
        }
        YAWLServiceReference service = _engine.getRegisteredYawlService(serviceURI);
        if (null != service) {
            try {
                YAWLServiceReference ys = _engine.removeYawlService(serviceURI);
                if (null != ys) {
                    return SUCCESS;
                }
            } catch (YPersistenceException e) {
                enginePersistenceFailure = true;
View Full Code Here

            objectType = PT_WORK_ITEM_EVENT;
            YWorkItemEvent obj2 = (YWorkItemEvent) obj;
            key = obj2.getRowkey();
        } else if (obj instanceof YAWLServiceReference) {
            objectType = PT_SERVICE_REF;
            YAWLServiceReference obj2 = (YAWLServiceReference) obj;
            key = objectType + "/" + obj2.get_yawlServiceID();
        } else if (obj instanceof User) {
            objectType = PT_USER;
            User obj2 = (User) obj;
            key = obj2.getUserID();
        } else {
            logger.error("Unknown object type [" + obj.getClass().getName() + "]");
            throw new YPersistenceException("Unknown object type [" + obj.getClass().getName() + "]");
        }
View Full Code Here

TOP

Related Classes of au.edu.qut.yawl.elements.YAWLServiceReference

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.