Examples of YWorkItem


Examples of au.edu.qut.yawl.engine.YWorkItem

    public synchronized void cancel(YPersistenceManager pmgr) throws YPersistenceException {
        YIdentifier i = _i;
        super.cancel(pmgr);
        if (i != null && _decompositionPrototype != null) {
            YWorkItem workItem = _workItemRepository.getWorkItem(i.toString(), getID());
            i = null;
            if (null != workItem) {
                _workItemRepository.removeWorkItemFamily(workItem);
                //if applicable cancel yawl service
                YAWLServiceGateway wsgw = (YAWLServiceGateway) getDecompositionPrototype();
View Full Code Here

Examples of au.edu.qut.yawl.engine.YWorkItem

    }


    public String getOutputSkeletonXML(String caseID, String taskID) {
        YParametersSchema params = _paramsDefinitions.getParamsForTask(taskID);
        YWorkItem item = _engineClient.getWorkItem(caseID + ":" + taskID);
        String specID = item.getSpecificationID();
        YTask task = _engineClient.getTaskDefinition(specID, item.getTaskID());
        return Marshaller.getOutputParamsInXML(
                params,
                task.getDecompositionPrototype().getRootDataElementName());
    }
View Full Code Here

Examples of au.edu.qut.yawl.engine.YWorkItem

        }
        Set allItems = _engine.getAvailableWorkItems();
        StringBuffer workItemsStr = new StringBuffer();
        workItemsStr.append("<ids>");
        for (Iterator iterator = allItems.iterator(); iterator.hasNext();) {
            YWorkItem workItem = (YWorkItem) iterator.next();
            workItemsStr.append("<workItemID>");
            workItemsStr.append(workItem.getWorkItemID().toString());
            workItemsStr.append("</workItemID>");
        }
        workItemsStr.append("</ids>");
        return workItemsStr.toString();
    }
View Full Code Here

Examples of au.edu.qut.yawl.engine.YWorkItem

        try {
            _userList.checkConnection(sessionHandle);
        } catch (YAuthenticationException e) {
            return OPEN_FAILURE + e.getMessage() + CLOSE_FAILURE;
        }
        YWorkItem workItem = _engine.getWorkItem(workItemID);
        if (workItem != null) {
            return workItem.toXML();
        } else {
            return
                    OPEN_FAILURE + "WorkItem with ID (" +
                    workItemID +
                    ") not found.<failure><reason>";
View Full Code Here

Examples of au.edu.qut.yawl.engine.YWorkItem

     * @throws RemoteException
     */
    public String suspendWorkItem(String workItemID, String sessionHandle) throws RemoteException {
        try {
            _userList.checkConnection(sessionHandle);
            YWorkItem item = _engine.suspendWorkItem(workItemID);

            if (item != null)
                return OPEN_SUCCESS + item.toXML() + CLOSE_SUCCESS;
            else
                return OPEN_FAILURE +
                        "WorkItem with ID [" + workItemID + "] not found." +
                        CLOSE_FAILURE;
        }
View Full Code Here

Examples of au.edu.qut.yawl.engine.YWorkItem

     */
    public String unsuspendWorkItem(String workItemID, String sessionHandle) throws RemoteException {
        try {
            _userList.checkConnection(sessionHandle);

            YWorkItem item = _engine.unsuspendWorkItem(workItemID);
            if (item != null)
                return OPEN_SUCCESS + item.toXML() + CLOSE_SUCCESS;
            else
                return OPEN_FAILURE +
                        "WorkItem with ID [" + workItemID + "] not found." +
                        CLOSE_FAILURE;
        }
View Full Code Here

Examples of au.edu.qut.yawl.engine.YWorkItem

     * @throws RemoteException if used in RMI mode
     */
    public String completeWorkItem(String workItemID, String data, boolean force, String sessionHandle) throws RemoteException {
        try {
            _userList.checkConnection(sessionHandle);
            YWorkItem workItem = _engine.getWorkItem(workItemID);
            if (workItem != null) {
                _engine.completeWorkItem(workItem, data, force);
                return SUCCESS;
            } else {
                return OPEN_FAILURE +
View Full Code Here

Examples of au.edu.qut.yawl.engine.YWorkItem

     */
    public String startWorkItem(String workItemID, String sessionHandle) throws RemoteException {
        try {
            _userList.checkConnection(sessionHandle);

            YWorkItem item = _engine.getWorkItem(workItemID);
            if (item != null) {
                String userID = _userList.getUserID(sessionHandle);
                YWorkItem child = _engine.startWorkItem(item, userID);
                if( child == null ) {
                  throw new YAWLException(
                      "Engine failed to start work item " + item.toString() +
                      ". The engine returned no work items." );
                }
                return OPEN_SUCCESS + child.toXML() + CLOSE_SUCCESS;
            }
            return OPEN_FAILURE + "No work item with id = " + workItemID + CLOSE_FAILURE;
        } catch (YAWLException e) {
            if (e instanceof YPersistenceException) {
                enginePersistenceFailure = true;
View Full Code Here

Examples of au.edu.qut.yawl.engine.YWorkItem

     * @throws RemoteException
     */
    public String createNewInstance(String workItemID, String paramValueForMICreation, String sessionHandle) throws RemoteException {
        try {
            _userList.checkConnection(sessionHandle);
            YWorkItem existingItem = _engine.getWorkItem(workItemID);
            YWorkItem newItem = _engine.createNewInstance(existingItem, paramValueForMICreation);
            return OPEN_SUCCESS + newItem.toXML() + CLOSE_SUCCESS;
        } catch (YAWLException e) {
            if (e instanceof YPersistenceException) {
                enginePersistenceFailure = true;
            }
            return OPEN_FAILURE + e.getMessage() + CLOSE_FAILURE;
View Full Code Here

Examples of au.edu.qut.yawl.engine.YWorkItem

        try {
            _userList.checkConnection(sessionHandle);
        } catch (YAuthenticationException e) {
            return OPEN_FAILURE + e.getMessage() + CLOSE_FAILURE;
        }
        YWorkItem item = _engine.getWorkItem(workItemID);
        return describeWorkItems(_engine.getChildrenOfWorkItem(item));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.