Package org.intalio.tempo.workflow.task.xml

Examples of org.intalio.tempo.workflow.task.xml.TaskUnmarshaller


    }

    private void testRoundTrip(PATask task1, Document input) throws Exception {
        TaskMarshaller marshaller = new TaskMarshaller();
        OMElement marshalledTask = marshaller.marshalFullTask(task1, null);
        TaskUnmarshaller unmarshaller = new TaskUnmarshaller();
        PATask task2 = (PATask) unmarshaller.unmarshalFullTask(marshalledTask);
        Assert.assertEquals(task1.getInput().toString(), task2.getInput().toString());
    }
View Full Code Here


        ITaskDAOConnection dao=null;
      try {
        dao=_taskDAOFactory.openConnection();
            OMElementQueue rootQueue = new OMElementQueue(requestElement);
            OMElement taskElement = requireElement(rootQueue, "task");
            Task task = new TaskUnmarshaller().unmarshalFullTask(taskElement);
            if (task instanceof PIPATask) {
                throw new InvalidInputFormatException("Not allowed to create() PIPA tasks");
            }
            String participantToken = requireElementValue(rootQueue, "participantToken");
            _server.create(dao,task, participantToken);
View Full Code Here

      ITaskDAOConnection dao=null;
      try {
        dao=_taskDAOFactory.openConnection();
            OMElementQueue rootQueue = new OMElementQueue(requestElement);
            OMElement taskElement = requireElement(rootQueue, "taskMetadata");
            TaskMetadata metadata = new TaskUnmarshaller().unmarshalPartialTask2(taskElement);
            String participantToken = requireElementValue(rootQueue, "participantToken");
            _server.update(dao,metadata, participantToken);
            return createOkResponse();
        } catch (Exception e) {
            throw makeFault(e);
View Full Code Here

            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) {
View Full Code Here

            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) {
View Full Code Here

            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");
View Full Code Here

      ITaskDAOConnection dao=null;
      try {
        dao=_taskDAOFactory.openConnection();
            OMElementQueue rootQueue = new OMElementQueue(requestElement);
            OMElement taskElement = requireElement(rootQueue, "task");
            PIPATask task = (PIPATask) new TaskUnmarshaller().unmarshalFullTask(taskElement);
            String participantToken = requireElementValue(rootQueue, "participantToken");
            // final UserRoles user = _server.getUserRoles(participantToken);
            _server.storePipa(dao,task, participantToken);
            return createOkResponse();
        } catch (Exception e) {
View Full Code Here

            OMElement taskElement = expectElement(rootQueue, "task");
            if (taskElement == null)
                break;

            try {
                Task task = new TaskUnmarshaller().unmarshalTaskFromMetadata(taskElement);
                tasks.add(task);
            } catch (Exception e) {
                _log.error("Error reading task: " + taskElement, e);
            }
        }
View Full Code Here

        }.marshalRequest();

        try {
            OMElement response = sendRequest(request, TaskXMLConstants.TASK_NAMESPACE + "getTask");
            OMElement taskElement = response.getFirstElement();
            Task task = new TaskUnmarshaller().unmarshalFullTask(taskElement);

            return task;
        } catch (InvalidInputFormatException e) {
            throw new RuntimeException(e);
        }
View Full Code Here

        _log.info(request.toString());

        try {
            OMElement response = sendRequest(request, TaskXMLConstants.TASK_NAMESPACE + "getPipaTask");
            OMElement taskElement = response.getFirstElement();
            PIPATask task = (PIPATask) new TaskUnmarshaller().unmarshalFullTask(taskElement);
            return task;
        } catch (InvalidInputFormatException e) {
            throw new RuntimeException(e);
        }
    }
View Full Code Here

TOP

Related Classes of org.intalio.tempo.workflow.task.xml.TaskUnmarshaller

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.