Package org.intalio.tempo.workflow.task.attachments

Examples of org.intalio.tempo.workflow.task.attachments.Attachment


           }
          
           @Test
           public void attachmentsPATask() throws Exception {
            AttachmentMetadata metadata = new AttachmentMetadata();
            Attachment att = new Attachment(metadata, new URL(
                    "http://hellonico.net"));
            String id = "pa" + System.currentTimeMillis();
            PATask task1 = new PATask(id, new URI("http://hellonico.net"),
                    "processId", "soap", getXmlSampleDocument());
            task1.addAttachment(att);
View Full Code Here


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

        try {
            task = dao.fetchTaskIfExists(taskID);
            availableTask = task instanceof ITaskWithAttachments && task.isAvailableTo(credentials);
            if (availableTask) {
                ITaskWithAttachments taskWithAttachments = (ITaskWithAttachments) task;
                Attachment removedAttachment = taskWithAttachments.removeAttachment(attachmentURL);
                availableAttachment = (removedAttachment != null);
                if (availableAttachment) {
                    dao.updateTask(task);
                    dao.commit();
                    if (_logger.isDebugEnabled())
View Full Code Here

            OMElement response = sendRequest(request, TaskXMLConstants.TASK_NAMESPACE + "getAttachments");
            Iterator<?> i = response.getChildElements();
            ArrayList<Attachment> attachments = new ArrayList<Attachment>();
            while (i.hasNext()) {
                OMElement attachmentElement = (OMElement) i.next();
                Attachment attachment = new AttachmentUnmarshaller().unmarshalAttachment(attachmentElement);
                attachments.add(attachment);
            }

            return attachments.toArray(new Attachment[] {});
        } catch (InvalidInputFormatException e) {
View Full Code Here

                                    payloadURL = new URL(payloadURLStr);
                                } catch (MalformedURLException e) {
                                    throw new InvalidInputFormatException(e);
                                }

                                Attachment attachment = new Attachment(metadata, payloadURL);
                                taskWithAttachments.addAttachment(attachment);
                            }
                        } finally {
                            attCursor.dispose();
                        }
View Full Code Here

TOP

Related Classes of org.intalio.tempo.workflow.task.attachments.Attachment

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.