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

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


        tms.delete(new String[] { id });
    }

    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


    Task[] tasks = new TaskFetcher(em).fetchAvailableTasks(new UserRoles(
        userId, roles), taskClass, subQuery);
    Assert.assertEquals(size, tasks.length);

    if (optionalMarshalling) {
      TaskMarshaller marshaller = new TaskMarshaller();
      for (Task task : tasks)
        marshaller.marshalFullTask(task, null);
    }

    return tasks;
  }
View Full Code Here

            final UserRoles user = _server.getUserRoles(participantToken);
            Task task = _server.getTask(dao,taskID, participantToken);
            OMElement response = new TMSResponseMarshaller(OM_FACTORY) {
                public OMElement marshalResponse(Task task) {
                    OMElement response = createElement("getTaskResponse");
                    response.addChild(new TaskMarshaller().marshalFullTask(task, user));
                    return response;
                }
            }.marshalResponse(task);
           return response;
        } catch (Exception e) {
View Full Code Here

            final UserRoles user = _server.getUserRoles(participantToken);
            Task task = _server.getPipa(dao,taskID, participantToken);
            OMElement response = new TMSResponseMarshaller(OM_FACTORY) {
                public OMElement marshalResponse(Task task) {
                    OMElement response = createElement("getPipaResponse");
                    response.addChild(new TaskMarshaller().marshalFullTask(task, user));
                    return response;
                }
            }.marshalResponse(task);
            return response;
        } catch (Exception e) {
View Full Code Here

        OMElement response = new TMSResponseMarshaller(OM_FACTORY) {
            public OMElement marshalResponse(Task[] tasks) {
                OMElement response = createElement(responseTag);
                for (Task task : tasks) {
                    try {
                        response.addChild(new TaskMarshaller().marshalTaskMetadata(task, user));
                    } catch (Exception e) {
                        // marshalling of that task failed.
                        // let's not fail fast, but provide info in the logs.
                        _logger.error(task.getID() + "could not be serialized to xml", e);
                    }
View Full Code Here

        }

        OMElement request = new TMSMarshaller() {
            public OMElement marshalRequest() {
                OMElement request = createElement("createTaskRequest");
                new TaskMarshaller().marshalFullTask(task, request, null);
                createElement(request, "participantToken", _participantToken);
                return request;
            }
        }.marshalRequest();
View Full Code Here

        }

        OMElement request = new TMSMarshaller() {
            public OMElement marshalRequest() {
                OMElement request = createElement("updateTaskRequest");
                OMElement meta = new TaskMarshaller().marshalFullTask(task, null);
                request.addChild(meta);
                createElement(request, "participantToken", _participantToken);
                return request;
            }
        }.marshalRequest();
View Full Code Here

    public void storePipa(final PIPATask task) throws AuthException, InvalidTaskException {
        OMElement request = new TMSMarshaller() {
            public OMElement marshalRequest() {
                OMElement request = createElement("storePipaRequest");
                OMElement pipa = createElement(request, TaskXMLConstants.TASK_LOCAL_NAME);
                new TaskMarshaller().marshalFullTask(task, pipa, null);
                createElement(request, "participantToken", _participantToken);
                return request;
            }
        }.marshalRequest();
        sendRequest(request, TaskXMLConstants.TASK_NAMESPACE + "storePipa");
View Full Code Here

TOP

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

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.