Examples of ITaskDAOConnection


Examples of org.intalio.tempo.workflow.tms.server.dao.ITaskDAOConnection

          dao.close();
        }
    }

    public OMElement delete(OMElement requestElement) throws AxisFault {
      ITaskDAOConnection dao=null;
      try {
        dao=_taskDAOFactory.openConnection();
            OMElementQueue rootQueue = new OMElementQueue(requestElement);
            List<String> taskIDs = new ArrayList<String>();
            while (true) {
                String taskID = expectElementValue(rootQueue, "taskId");
                if (taskID != null)
                    taskIDs.add(taskID);
                else
                    break;
            }
            if (taskIDs.isEmpty()) {
                throw new InvalidInputFormatException("At least one taskId element must be present");
            }
            String participantToken = requireElementValue(rootQueue, "participantToken");
            _server.delete(dao,taskIDs.toArray(new String[] {}), participantToken);
             return createOkResponse();
        } catch (Exception e) {
           throw makeFault(e);
        }
        finally{
          if(dao!=null)
          dao.close();
        }
    }
View Full Code Here

Examples of org.intalio.tempo.workflow.tms.server.dao.ITaskDAOConnection

          dao.close();
        }
    }

    public OMElement deleteAll(OMElement requestElement) throws AxisFault {
      ITaskDAOConnection dao=null;
      try {
        dao=_taskDAOFactory.openConnection();
            OMElementQueue rootQueue = new OMElementQueue(requestElement);
            String taskType = expectElementValue(rootQueue, "taskType");
            String subquery = expectElementValue(rootQueue, "subQuery");
            boolean fakeDelete = Boolean.valueOf(requireElementValue(rootQueue, "fakeDelete"));
            String participantToken = requireElementValue(rootQueue, "participantToken");
            _server.deleteAll(dao,fakeDelete, subquery, taskType, participantToken);
            return createOkResponse();
        } catch (Exception e) {
            throw makeFault(e);
        }
        finally{
          if(dao!=null)
          dao.close();
        }
    }
View Full Code Here

Examples of org.intalio.tempo.workflow.tms.server.dao.ITaskDAOConnection

          dao.close();
        }
    }

    public OMElement setOutput(OMElement requestElement) throws AxisFault {
      ITaskDAOConnection dao=null;
      try {
        dao=_taskDAOFactory.openConnection();
            OMElementQueue rootQueue = new OMElementQueue(requestElement);
            String taskID = requireElementValue(rootQueue, "taskId");
            OMElement omOutputContainer = requireElement(rootQueue, "data");
            Document domOutput = null;
            if (omOutputContainer.getFirstElement() != null) {
                domOutput = new TaskUnmarshaller().unmarshalTaskOutput(omOutputContainer);
            }
            String participantToken = requireElementValue(rootQueue, "participantToken");
            _server.setOutput(dao,taskID, domOutput, participantToken);
             return createOkResponse();
        } catch (Exception e) {
          throw makeFault(e);
        }
        finally{
          if(dao!=null)
          dao.close();
        }
       
    }
View Full Code Here

Examples of org.intalio.tempo.workflow.tms.server.dao.ITaskDAOConnection

        }
       
    }

    public OMElement setOutputAndComplete(OMElement requestElement) throws AxisFault {
         ITaskDAOConnection dao=null;
      try {
        dao=_taskDAOFactory.openConnection();
            OMElementQueue rootQueue = new OMElementQueue(requestElement);
            String taskID = requireElementValue(rootQueue, "taskId");
            OMElement omOutputContainer = requireElement(rootQueue, "data");
            Document domOutput = null;
            if (omOutputContainer.getFirstElement() != null) {
                domOutput = new TaskUnmarshaller().unmarshalTaskOutput(omOutputContainer);
            }
            String participantToken = requireElementValue(rootQueue, "participantToken");
            _server.setOutputAndComplete(dao,taskID, domOutput, participantToken);
            return createOkResponse();
        } catch (Exception e) {
          throw makeFault(e);
        }
        finally{
          if(dao!=null)
          dao.close();
        }
    }
View Full Code Here

Examples of org.intalio.tempo.workflow.tms.server.dao.ITaskDAOConnection

          dao.close();
        }
    }

    public OMElement complete(OMElement requestElement) throws AxisFault {
      ITaskDAOConnection dao=null;
      try {
        dao=_taskDAOFactory.openConnection();
            OMElementQueue rootQueue = new OMElementQueue(requestElement);
            String taskID = requireElementValue(rootQueue, "taskId");
            String participantToken = requireElementValue(rootQueue, "participantToken");
            _server.complete(dao,taskID, participantToken);
             return createOkResponse();
        } catch (Exception e) {
          throw makeFault(e);
        }
        finally{
          if(dao!=null)
          dao.close();
        }
    }
View Full Code Here

Examples of org.intalio.tempo.workflow.tms.server.dao.ITaskDAOConnection

          dao.close();
        }
    }

    public OMElement fail(OMElement requestElement) throws AxisFault {
      ITaskDAOConnection dao=null;
      try {
        dao=_taskDAOFactory.openConnection();
            OMElementQueue rootQueue = new OMElementQueue(requestElement);
            String taskID = requireElementValue(rootQueue, "taskId");
            String failureCode = requireElementValue(rootQueue, "code");
            String failureReason = requireElementValue(rootQueue, "message");
            String participantToken = requireElementValue(rootQueue, "participantToken");
            _server.fail(dao,taskID, failureCode, failureReason, participantToken);
            return createOkResponse();
        } catch (Exception e) {
          throw makeFault(e);
        }
        finally{
          if(dao!=null)
          dao.close();
        }
    }
View Full Code Here

Examples of org.intalio.tempo.workflow.tms.server.dao.ITaskDAOConnection

          dao.close();
        }
    }

    public OMElement initProcess(final OMElement requestElement) throws AxisFault {
      ITaskDAOConnection dao=null;
      try {
        dao=_taskDAOFactory.openConnection();
            OMElementQueue rootQueue = new OMElementQueue(requestElement);
            String taskID = requireElementValue(rootQueue, "taskId");
            OMElement omInputContainer = requireElement(rootQueue, "input");
            Document domInput = null;
            if (omInputContainer.getFirstElement() != null) {
                domInput = new TaskUnmarshaller().unmarshalTaskOutput(omInputContainer);
            }
            final String participantToken = requireElementValue(rootQueue, "participantToken");
            final UserRoles ur = _server.getUserRoles(participantToken);
            final String user = ur.getUserID();           
            final String formUrl = expectElementValue(rootQueue, "formUrl");
            Document userProcessResponse = _server.initProcess(dao,taskID, user, formUrl, domInput, participantToken);
            if (userProcessResponse == null)
                throw new RuntimeException("TMP did not return a correct message while calling init");
            OMElement response = new TMSResponseMarshaller(OM_FACTORY) {
                public OMElement marshalResponse(Document userProcessResponse) {
                    OMElement response = createElement("initProcessResponse");
                    OMElement userProcessResponseWrapper = createElement(response, "userProcessResponse");
                    userProcessResponseWrapper.addChild(new XmlTooling().convertDOMToOM(userProcessResponse, this.getOMFactory()));
                    return response;
                }
            }.marshalResponse(userProcessResponse);
            return response;
        } catch (Exception e) {
          throw makeFault(e);
        }
        finally{
          if(dao!=null)
          dao.close();
        }
    }
View Full Code Here

Examples of org.intalio.tempo.workflow.tms.server.dao.ITaskDAOConnection

          dao.close();
        }
    }

    public OMElement getAttachments(OMElement requestElement) throws AxisFault {
      ITaskDAOConnection dao=null;
      try {
        dao=_taskDAOFactory.openConnection();
            OMElementQueue rootQueue = new OMElementQueue(requestElement);
            String taskID = requireElementValue(rootQueue, "taskId");
            String participantToken = requireElementValue(rootQueue, "participantToken");
            Attachment[] attachments = _server.getAttachments(dao,taskID, participantToken);
            OMElement result = AttachmentMarshaller.marshalAttachments(attachments);
            return result;
        } catch (Exception e) {
          throw makeFault(e);
        }
        finally{
          if(dao!=null)
          dao.close();
        }
    }
View Full Code Here

Examples of org.intalio.tempo.workflow.tms.server.dao.ITaskDAOConnection

          dao.close();
        }
    }

    public OMElement addAttachment(OMElement requestElement) throws AxisFault {
      ITaskDAOConnection dao=null;
      try {
        dao=_taskDAOFactory.openConnection();
            OMElementQueue rootQueue = new OMElementQueue(requestElement);
            String taskID = requireElementValue(rootQueue, "taskId");
            OMElement attachmentElement = requireElement(rootQueue, "attachment");
            Attachment attachment = new AttachmentUnmarshaller().unmarshalAttachment(attachmentElement);
            String participantToken = requireElementValue(rootQueue, "participantToken");
            _server.addAttachment(dao,taskID, attachment, participantToken);
             return createOkResponse();
        } catch (Exception e) {
          throw makeFault(e);
        }
        finally{
          if(dao!=null)
          dao.close();
        }
    }
View Full Code Here

Examples of org.intalio.tempo.workflow.tms.server.dao.ITaskDAOConnection

          dao.close();
        }
    }

    public OMElement removeAttachment(OMElement requestElement) throws AxisFault {
      ITaskDAOConnection dao=null;
      try {
        dao=_taskDAOFactory.openConnection();
            OMElementQueue rootQueue = new OMElementQueue(requestElement);
            String taskID = requireElementValue(rootQueue, "taskId");
            String attachmentURL = requireElementValue(rootQueue, "attachmentUrl");
            String participantToken = requireElementValue(rootQueue, "participantToken");
            try {
                _server.removeAttachment(dao,taskID, new URL(attachmentURL), participantToken);
                }
            catch (MalformedURLException e) {
              throw new InvalidInputFormatException(e);
            }
            return createOkResponse();
        } catch (Exception e) {
           throw makeFault(e);
        }
        finally{
          if(dao!=null)
          dao.close();
        }
    }
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.