first draft zahlungsavis
This commit is contained in:
parent
cbfeb8ef38
commit
0d5dbbd626
5 changed files with 95 additions and 9 deletions
|
|
@ -5,6 +5,7 @@ import java.util.logging.Logger;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
|
import org.imixs.archive.core.SnapshotService;
|
||||||
import org.imixs.workflow.FileData;
|
import org.imixs.workflow.FileData;
|
||||||
import org.imixs.workflow.ItemCollection;
|
import org.imixs.workflow.ItemCollection;
|
||||||
import org.imixs.workflow.SignalAdapter;
|
import org.imixs.workflow.SignalAdapter;
|
||||||
|
|
@ -41,6 +42,9 @@ public class ZahlungsavisExportAdapter implements SignalAdapter {
|
||||||
@Inject
|
@Inject
|
||||||
DocumentService documentService;
|
DocumentService documentService;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
SnapshotService snapshotService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method finds or create the Zahlungsavis and adds a reference
|
* This method finds or create the Zahlungsavis and adds a reference
|
||||||
* ($workitemref) to the current invoice.
|
* ($workitemref) to the current invoice.
|
||||||
|
|
@ -81,12 +85,7 @@ public class ZahlungsavisExportAdapter implements SignalAdapter {
|
||||||
}
|
}
|
||||||
|
|
||||||
// load the text block
|
// load the text block
|
||||||
FileData fileData = null;
|
FileData fileData = loadTextBlockFileData(textblockRef, template);
|
||||||
ItemCollection textBlockItemCollection = loadTextBlock(textblockRef);
|
|
||||||
if (textBlockItemCollection != null) {
|
|
||||||
// fetch attachment
|
|
||||||
fileData = textBlockItemCollection.getFileData(template);
|
|
||||||
}
|
|
||||||
|
|
||||||
// do we found the document?
|
// do we found the document?
|
||||||
if (fileData == null) {
|
if (fileData == null) {
|
||||||
|
|
@ -107,17 +106,20 @@ public class ZahlungsavisExportAdapter implements SignalAdapter {
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public ItemCollection loadTextBlock(String name) {
|
public FileData loadTextBlockFileData(String name, String fileName) {
|
||||||
ItemCollection textBlockItemCollection = null;
|
ItemCollection textBlockItemCollection = null;
|
||||||
|
|
||||||
// load text-block by name....
|
// load text-block by name....
|
||||||
String sQuery = "(type:\"" + TYPE_TEXTBLOCK + "\" AND txtname:\"" + name + "\")";
|
String sQuery = "(type:\"" + TYPE_TEXTBLOCK + "\" AND txtname:\"" + name + "\")";
|
||||||
Collection<ItemCollection> col;
|
Collection<ItemCollection> col;
|
||||||
try {
|
try {
|
||||||
|
// find the textblock...
|
||||||
col = documentService.find(sQuery, 1, 0);
|
col = documentService.find(sQuery, 1, 0);
|
||||||
|
|
||||||
if (col.size() > 0) {
|
if (col.size() > 0) {
|
||||||
textBlockItemCollection = col.iterator().next();
|
textBlockItemCollection = col.iterator().next();
|
||||||
|
// fetch the fileData...
|
||||||
|
return snapshotService.getWorkItemFile(textBlockItemCollection.getUniqueID(), fileName);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
logger.warning("Missing text-block : '" + name + "'");
|
logger.warning("Missing text-block : '" + name + "'");
|
||||||
}
|
}
|
||||||
|
|
@ -125,7 +127,7 @@ public class ZahlungsavisExportAdapter implements SignalAdapter {
|
||||||
logger.warning("getTextBlock - invalid query: " + e.getMessage());
|
logger.warning("getTextBlock - invalid query: " + e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
return textBlockItemCollection;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Binary file not shown.
BIN
reports/zahlungsavis/zahlungsavis_template_neu.xls
Normal file
BIN
reports/zahlungsavis/zahlungsavis_template_neu.xls
Normal file
Binary file not shown.
BIN
reports/zahlungsavis/zahlungsavis_template_old.xls
Normal file
BIN
reports/zahlungsavis/zahlungsavis_template_old.xls
Normal file
Binary file not shown.
|
|
@ -178,6 +178,7 @@ result.isValid=true;
|
||||||
<bpmn2:documentation id="Documentation_4"><![CDATA[<textblock><itemvalue>$workflowgroup</itemvalue> - <itemvalue>$workflowstatus</itemvalue></textblock>]]></bpmn2:documentation>
|
<bpmn2:documentation id="Documentation_4"><![CDATA[<textblock><itemvalue>$workflowgroup</itemvalue> - <itemvalue>$workflowstatus</itemvalue></textblock>]]></bpmn2:documentation>
|
||||||
<bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
|
<bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
|
||||||
<bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
|
<bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
|
||||||
|
<bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
|
||||||
<bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
|
<bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
|
||||||
</bpmn2:task>
|
</bpmn2:task>
|
||||||
<bpmn2:sequenceFlow id="SequenceFlow_10" sourceRef="Task_2" targetRef="EndEvent_3"/>
|
<bpmn2:sequenceFlow id="SequenceFlow_10" sourceRef="Task_2" targetRef="EndEvent_3"/>
|
||||||
|
|
@ -482,6 +483,77 @@ result.isValid=true;
|
||||||
</bpmn2:intermediateCatchEvent>
|
</bpmn2:intermediateCatchEvent>
|
||||||
<bpmn2:sequenceFlow id="SequenceFlow_14" sourceRef="IntermediateCatchEvent_3" targetRef="Task_1"/>
|
<bpmn2:sequenceFlow id="SequenceFlow_14" sourceRef="IntermediateCatchEvent_3" targetRef="Task_1"/>
|
||||||
<bpmn2:sequenceFlow id="SequenceFlow_18" sourceRef="IntermediateCatchEvent_5" targetRef="Task_6"/>
|
<bpmn2:sequenceFlow id="SequenceFlow_18" sourceRef="IntermediateCatchEvent_5" targetRef="Task_6"/>
|
||||||
|
<bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_2" imixs:activityid="20" name="Test FIle">
|
||||||
|
<bpmn2:extensionElements>
|
||||||
|
<imixs:item name="keylogtimeformat" type="xs:string">
|
||||||
|
<imixs:value><![CDATA[2]]></imixs:value>
|
||||||
|
</imixs:item>
|
||||||
|
<imixs:item name="keyarchive" type="xs:string">
|
||||||
|
<imixs:value><![CDATA[0]]></imixs:value>
|
||||||
|
</imixs:item>
|
||||||
|
<imixs:item name="txtmailsubject" type="xs:string">
|
||||||
|
<imixs:value><![CDATA[]]></imixs:value>
|
||||||
|
</imixs:item>
|
||||||
|
<imixs:item name="keyaccessmode" type="xs:string">
|
||||||
|
<imixs:value><![CDATA[0]]></imixs:value>
|
||||||
|
</imixs:item>
|
||||||
|
<imixs:item name="keyscheduledactivity" type="xs:string">
|
||||||
|
<imixs:value><![CDATA[0]]></imixs:value>
|
||||||
|
</imixs:item>
|
||||||
|
<imixs:item name="rtfmailbody" type="xs:string">
|
||||||
|
<imixs:value><![CDATA[]]></imixs:value>
|
||||||
|
</imixs:item>
|
||||||
|
<imixs:item name="keyversion" type="xs:string">
|
||||||
|
<imixs:value><![CDATA[0]]></imixs:value>
|
||||||
|
</imixs:item>
|
||||||
|
<imixs:item name="keyaddwritefields" type="xs:string">
|
||||||
|
<imixs:value><![CDATA[namprocessmanager]]></imixs:value>
|
||||||
|
</imixs:item>
|
||||||
|
<imixs:item name="numnextactivityid" type="xs:int">
|
||||||
|
<imixs:value><![CDATA[0]]></imixs:value>
|
||||||
|
</imixs:item>
|
||||||
|
<imixs:item name="keyfollowup" type="xs:string">
|
||||||
|
<imixs:value><![CDATA[2]]></imixs:value>
|
||||||
|
</imixs:item>
|
||||||
|
<imixs:item name="keypublicresult" type="xs:string">
|
||||||
|
<imixs:value><![CDATA[1]]></imixs:value>
|
||||||
|
</imixs:item>
|
||||||
|
<imixs:item name="keylogdateformat" type="xs:string">
|
||||||
|
<imixs:value><![CDATA[2]]></imixs:value>
|
||||||
|
</imixs:item>
|
||||||
|
<imixs:item name="keyownershipfields" type="xs:string"/>
|
||||||
|
<imixs:item name="numnextid" type="xs:int">
|
||||||
|
<imixs:value><![CDATA[5000]]></imixs:value>
|
||||||
|
</imixs:item>
|
||||||
|
<imixs:item name="txtnextprocesstree" type="xs:string">
|
||||||
|
<imixs:value><![CDATA[]]></imixs:value>
|
||||||
|
</imixs:item>
|
||||||
|
<imixs:item name="txtactivityresult" type="xs:string">
|
||||||
|
<imixs:value><![CDATA[ <zahlungsavis name="textblock">Zahlugnsavis Template</zahlungsavis>
|
||||||
|
<zahlungsavis name="template">zahlungsavis_template.xls</zahlungsavis>]]></imixs:value>
|
||||||
|
</imixs:item>
|
||||||
|
<imixs:item name="keyownershipmode" type="xs:string">
|
||||||
|
<imixs:value><![CDATA[0]]></imixs:value>
|
||||||
|
</imixs:item>
|
||||||
|
<imixs:item name="rtfresultlog" type="xs:string">
|
||||||
|
<imixs:value><![CDATA[Sepa Zahlungslauf OK - abgeschlossen von <username>$editor</username>.]]></imixs:value>
|
||||||
|
</imixs:item>
|
||||||
|
<imixs:item name="keyupdateacl" type="xs:boolean">
|
||||||
|
<imixs:value>false</imixs:value>
|
||||||
|
</imixs:item>
|
||||||
|
</bpmn2:extensionElements>
|
||||||
|
<bpmn2:documentation id="Documentation_1"><![CDATA[Vorgang abschließen und archivieren]]></bpmn2:documentation>
|
||||||
|
<bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
|
||||||
|
<bpmn2:dataOutput id="DataOutput_2" name="Signal_1_Output"/>
|
||||||
|
<bpmn2:dataOutputAssociation id="DataOutputAssociation_2">
|
||||||
|
<bpmn2:sourceRef>DataOutput_2</bpmn2:sourceRef>
|
||||||
|
</bpmn2:dataOutputAssociation>
|
||||||
|
<bpmn2:outputSet id="OutputSet_2" name="Output Set 1">
|
||||||
|
<bpmn2:dataOutputRefs>DataOutput_2</bpmn2:dataOutputRefs>
|
||||||
|
</bpmn2:outputSet>
|
||||||
|
<bpmn2:signalEventDefinition id="SignalEventDefinition_3" signalRef="Signal_1"/>
|
||||||
|
</bpmn2:intermediateCatchEvent>
|
||||||
|
<bpmn2:sequenceFlow id="SequenceFlow_3" sourceRef="IntermediateCatchEvent_2" targetRef="Task_2"/>
|
||||||
<bpmn2:textAnnotation id="TextAnnotation_2">
|
<bpmn2:textAnnotation id="TextAnnotation_2">
|
||||||
<bpmn2:text>Ein Zahlungsavis enthält eine Liste von zugeordneten Rechnungen (item '$workitemref')
|
<bpmn2:text>Ein Zahlungsavis enthält eine Liste von zugeordneten Rechnungen (item '$workitemref')
|
||||||
|
|
||||||
|
|
@ -593,6 +665,12 @@ Eine Rechnung wird über die Adapter Klasse 'ZahlungsavisAdapter' eingefügt.
|
||||||
<dc:Bounds height="14.0" width="56.0" x="514.0" y="284.0"/>
|
<dc:Bounds height="14.0" width="56.0" x="514.0" y="284.0"/>
|
||||||
</bpmndi:BPMNLabel>
|
</bpmndi:BPMNLabel>
|
||||||
</bpmndi:BPMNShape>
|
</bpmndi:BPMNShape>
|
||||||
|
<bpmndi:BPMNShape id="BPMNShape_IntermediateCatchEvent_2" bpmnElement="IntermediateCatchEvent_2">
|
||||||
|
<dc:Bounds height="36.0" width="36.0" x="853.0" y="319.0"/>
|
||||||
|
<bpmndi:BPMNLabel id="BPMNLabel_2">
|
||||||
|
<dc:Bounds height="14.0" width="45.0" x="849.0" y="355.0"/>
|
||||||
|
</bpmndi:BPMNLabel>
|
||||||
|
</bpmndi:BPMNShape>
|
||||||
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="BPMNShape_Task_1" targetElement="BPMNShape_EventBasedGateway_1">
|
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="BPMNShape_Task_1" targetElement="BPMNShape_EventBasedGateway_1">
|
||||||
<di:waypoint xsi:type="dc:Point" x="597.0" y="343.0"/>
|
<di:waypoint xsi:type="dc:Point" x="597.0" y="343.0"/>
|
||||||
<di:waypoint xsi:type="dc:Point" x="627.0" y="343.0"/>
|
<di:waypoint xsi:type="dc:Point" x="627.0" y="343.0"/>
|
||||||
|
|
@ -672,6 +750,12 @@ Eine Rechnung wird über die Adapter Klasse 'ZahlungsavisAdapter' eingefügt.
|
||||||
<di:waypoint xsi:type="dc:Point" x="902.0" y="410.0"/>
|
<di:waypoint xsi:type="dc:Point" x="902.0" y="410.0"/>
|
||||||
<bpmndi:BPMNLabel id="BPMNLabel_38"/>
|
<bpmndi:BPMNLabel id="BPMNLabel_38"/>
|
||||||
</bpmndi:BPMNEdge>
|
</bpmndi:BPMNEdge>
|
||||||
|
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="BPMNShape_IntermediateCatchEvent_2" targetElement="BPMNShape_Task_2">
|
||||||
|
<di:waypoint xsi:type="dc:Point" x="871.0" y="319.0"/>
|
||||||
|
<di:waypoint xsi:type="dc:Point" x="871.0" y="263.0"/>
|
||||||
|
<di:waypoint xsi:type="dc:Point" x="902.0" y="263.0"/>
|
||||||
|
<bpmndi:BPMNLabel id="BPMNLabel_9"/>
|
||||||
|
</bpmndi:BPMNEdge>
|
||||||
</bpmndi:BPMNPlane>
|
</bpmndi:BPMNPlane>
|
||||||
<bpmndi:BPMNLabelStyle id="BPMNLabelStyle_1">
|
<bpmndi:BPMNLabelStyle id="BPMNLabelStyle_1">
|
||||||
<dc:Font name="arial" size="9.0"/>
|
<dc:Font name="arial" size="9.0"/>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue