| <?xml version="1.0" encoding="iso-8859-1"?> |
| |
| <process-definition |
| name="pagesWorkflow" |
| xmlns="urn:jbpm.org:jpdl-3.1" |
| xmlns:s="urn:intelliForm:Spaces" |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| xsi:schemaLocation="urn:jbpm.org:jpdl-3.1 jpdl-3.1.xsd"> |
| |
| <start-state name="Start"> |
| |
| <task name="start-task" /> |
| |
| <transition name="ZumEnde" to="Ende"> |
| <script> |
| <expression> |
| java.io.ByteArrayOutputStream b = new java.io.ByteArrayOutputStream(); |
| de.cit.util.java.io.StreamUtil.copy(new java.io.FileInputStream("c:\\temp\\input.odt"), b, true); |
| byte[] data = b.toByteArray(); |
| attachments.createAttachment("input", "input.odt", "application/vnd.oasis.opendocument.text", data); |
| |
| b = new java.io.ByteArrayOutputStream(); |
| de.cit.util.java.io.StreamUtil.copy(new java.io.FileInputStream("c:\\temp\\input.xml"), b, true); |
| data = b.toByteArray(); |
| attachments.createAttachment("data", "data.xml", "text/xml", data); |
| </expression> |
| </script> |
| |
| <action class="de.cit.intelliform.spaces.actions.PagesRenderAction" config-type="constructor"> |
| <s:input-document>input</s:input-document> |
| <s:data-document>data</s:data-document> |
| <s:output-document>output</s:output-document> |
| <s:output-type>application/pdf</s:output-type> |
| <s:output-name>Created-by-Pages.pdf</s:output-name> |
| </action> |
| |
| <action class="de.cit.intelliform.spaces.actions.SaveAttachmentsAction" config-type="constructor"> |
| <f:attachments xmlns:f="urn:intelliForm:AttachmentFilter"> |
| <f:and> |
| <f:property-filter name="id" value="output" /> |
| |
| <f:filter> |
| <f:expression>System.out.println("id = " + attachment.getId()); return "true";</f:expression> |
| </f:filter> |
| |
| <f:not> |
| <f:property-filter name="name" value="*.exe" /> |
| </f:not> |
| |
| <f:not> |
| <f:default-filter /> |
| </f:not> |
| |
| <f:property-filter name="content-type" value="application/pdf" /> |
| |
| <f:and> |
| <f:size-filter max="200" unit="kb" /> |
| </f:and> |
| </f:and> |
| </f:attachments> |
| </action> |
| |
| <!-- |
| <action class="de.cit.intelliform.spaces.actions.SaveFileAction" config-type="constructor"> |
| <s:name>output.pdf</s:name> |
| <s:attachmentId>output</s:attachmentId> |
| </action> |
| --> |
| |
| <action class="de.cit.intelliform.spaces.actions.SetFolderMessageAction" config-type="constructor"> |
| <s:type>INFO</s:type> |
| <s:message>Glückwunsch, Saschas Workflow!</s:message> |
| </action> |
| |
| </transition> |
| |
| </start-state> |
| |
| |
| <end-state name="Ende" /> |
| |
| </process-definition> |