Package com.intalio.bpms.workflow.taskManagementServices20051109

Examples of com.intalio.bpms.workflow.taskManagementServices20051109.Task


  public void testUpdate() throws Exception {
    XmlObject xmlObject = XmlObject.Factory.parse(this.getClass().getResource("/update.xml"));
    Assert.assertNotNull(xmlObject);
        System.out.println(xmlObject.toString());
        Task taskElement = Task.Factory.newInstance();
        TaskMetadata metadata = taskElement.addNewMetadata();
       
        metadata.set(new TaskUnmarshaller().expectElement(xmlObject, "taskMetadata"));
        System.out.println(taskElement.getMetadata().getTaskId());
  }
View Full Code Here


 
  @Test
  public void testUpdateWithUnmarshaller() throws Exception {
    XmlObject xmlObject = XmlObject.Factory.parse(this.getClass().getResource("/update.xml"));
    OMElement om = new XmlTooling().convertDocument(xmlObject);
    TaskMetadata tm = new TaskUnmarshaller().unmarshalPartialTask2(om);
    System.out.println(tm.getTaskId());
  }
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

                _logger.debug(xmlObject.xmlText());
            }
            XmlCursor xmlCursor = xmlObject.newCursor();
            xmlCursor.toStartDoc();
            xmlCursor.toNextToken();
            TaskMetadata taskMetadata = com.intalio.bpms.workflow.taskManagementServices20051109.Task.Factory.newInstance().addNewMetadata();
            taskMetadata.set(xmlCursor.getObject());
            xmlCursor.dispose();
            return taskMetadata;
        } catch (InvalidInputFormatException e) {
            throw e;
        } catch (XmlException e) {
View Full Code Here

            requireElement(xmlObject, "metadata");

            com.intalio.bpms.workflow.taskManagementServices20051109.Task taskElement = com.intalio.bpms.workflow.taskManagementServices20051109.Task.Factory
                            .newInstance();

            TaskMetadata metadataElement = taskElement.addNewMetadata();
            metadataElement.set(expectElement(xmlObject, "metadata"));
            return metadataElement;
        } catch (XmlException e) {
            throw new RuntimeException(e.getMessage(), e);
        }
    }
View Full Code Here

    }
    public TaskMetadata unmarshalPartialTask2(OMElement rootElement) throws InvalidInputFormatException {
      try {
          XmlObject xmlObject = XmlObject.Factory.parse(rootElement.getXMLStreamReader());
          com.intalio.bpms.workflow.taskManagementServices20051109.Task taskElement = com.intalio.bpms.workflow.taskManagementServices20051109.Task.Factory.newInstance();
            TaskMetadata metadata = taskElement.addNewMetadata();
            metadata.set(new TaskUnmarshaller().expectElement(xmlObject, "taskMetadata"));
            return metadata;
        } catch (XmlException e) {
            throw new RuntimeException(e.getMessage(), e);
        }
    }
View Full Code Here

        requireElement(rootElement, "metadata");

        com.intalio.bpms.workflow.taskManagementServices20051109.Task taskElement = com.intalio.bpms.workflow.taskManagementServices20051109.Task.Factory
                        .newInstance();

        TaskMetadata metadataElement = taskElement.addNewMetadata();
        metadataElement.set(expectElement(rootElement, "metadata"));

        com.intalio.bpms.workflow.taskManagementServices20051109.TaskData inputElement = null;
        XmlObject xmlInput = expectElement(rootElement, "input");
        if (xmlInput != null) {
            inputElement = taskElement.addNewInput();
View Full Code Here

        response.setGetAttachmentsResponse(atts);
        return XmlTooling.convertDocument(response);
    }

    private static Attachment transformAttachment(org.intalio.tempo.workflow.task.attachments.Attachment attachment) {
        AttachmentMetadataImpl metadata = (AttachmentMetadataImpl) com.intalio.bpms.workflow.taskManagementServices20051109.AttachmentMetadata.Factory
                        .newInstance();
        AttachmentMetadata data = attachment.getMetadata();
        Calendar cal = Calendar.getInstance();
        cal.setTime(data.getCreationDate());
        metadata.setCreationDate(cal);
        metadata.setDescription(data.getDescription());
        metadata.setFileName(data.getFileName());
        metadata.setMimeType(data.getMimeType());
        metadata.setTitle(data.getTitle());

        Attachment att = (Attachment) Attachment.Factory.newInstance();
        att.setAttachmentMetadata(metadata);
        att.setPayloadUrl(attachment.getPayloadURL().toString());
        return att;
View Full Code Here

            attsTable[i] = transformAttachment(attachment);
            i++;
        }
        Attachments atts = (Attachments) Attachments.Factory.newInstance();
        atts.setAttachmentArray(attsTable);
        GetAttachmentsResponseDocumentImpl response = (GetAttachmentsResponseDocumentImpl) GetAttachmentsResponseDocument.Factory.newInstance();
        response.setGetAttachmentsResponse(atts);
        return XmlTooling.convertDocument(response);
    }
View Full Code Here

        Bpmn2JsonUnmarshaller unmarshaller = new Bpmn2JsonUnmarshaller();
        Definitions definitions = ((Definitions) unmarshaller.unmarshall(getTestJsonFile("sequenceFlow.json"), "").getContents().get(0));
        assertTrue(definitions.getRootElements().size() == 1);
        Process process = getRootProcess(definitions);
        assertTrue(process.getFlowElements().get(0) instanceof Task);
        Task task = (Task) process.getFlowElements().get(0);
        assertEquals("task1", task.getName());
        Task task2 = (Task) process.getFlowElements().get(1);
        assertEquals("task2", task2.getName());
        SequenceFlow flow = (SequenceFlow) process.getFlowElements().get(2);
        assertEquals("seqFlow", flow.getName());
        assertEquals(task, flow.getSourceRef());
        assertEquals(task2, flow.getTargetRef());
        definitions.eResource().save(System.out, Collections.emptyMap());
View Full Code Here

TOP

Related Classes of com.intalio.bpms.workflow.taskManagementServices20051109.Task

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.