workflow modelle aufgeräumt

This commit is contained in:
Ralph Soika 2025-08-15 11:26:22 +02:00
parent 8fcdaa3b69
commit ea5bc8d1e5
11 changed files with 111 additions and 25 deletions

View file

@ -62,7 +62,7 @@ public class TestIMAPOutlookOAuth {
* Wert: zDL8Q~iEy8AX~dEmIOHrVv3aBTCZLrHIFmShibZ_ Geheime ID: * Wert: zDL8Q~iEy8AX~dEmIOHrVv3aBTCZLrHIFmShibZ_ Geheime ID:
* bcaa558a-3300-4498-94e1-2267f418afd5 * bcaa558a-3300-4498-94e1-2267f418afd5
*/ */
@Disabled
@Test @Test
public void TestMailboxImixs() { public void TestMailboxImixs() {
Store store = null; Store store = null;
@ -71,7 +71,7 @@ public class TestIMAPOutlookOAuth {
// try to connect... // try to connect...
token = getAuthToken(); token = getAuthToken();
assertNotNull(token); assertNotNull(token);
store = connect(token, "imixs@alexander-logistics.com"); store = connect(token, "imixs@alexander-logistics.com", false);
assertNotNull(store); assertNotNull(store);
if (!store.isConnected()) { if (!store.isConnected()) {
@ -94,6 +94,87 @@ public class TestIMAPOutlookOAuth {
} }
/*
* Alle 4 Mailboxen texten
*/
@Test
public void TestAllMailboxes() {
Store store = null;
String token = null;
try {
token = getAuthToken();
assertNotNull(token);
// Bremen
store = connect(token, "imixs@alexander-logistics.com", false);
assertNotNull(store);
if (!store.isConnected()) {
// not connected!
fail();
} else {
// read inbox....
IMAPFolder inbox = (IMAPFolder) store.getFolder("INBOX");
inbox.open(Folder.READ_WRITE);
// fetches all messages from the INBOX...
Message[] messages = inbox.getMessages();
System.out.println("..." + messages.length + " new messages found");
}
// Polen
store = connect(token, "imixspl@alexander-logistics.com", false);
assertNotNull(store);
if (!store.isConnected()) {
// not connected!
fail();
} else {
// read inbox....
IMAPFolder inbox = (IMAPFolder) store.getFolder("INBOX");
inbox.open(Folder.READ_WRITE);
// fetches all messages from the INBOX...
Message[] messages = inbox.getMessages();
System.out.println("..." + messages.length + " new messages found");
}
// DWC
store = connect(token, "Imixsae@alexander-logistics.com", false);
assertNotNull(store);
if (!store.isConnected()) {
// not connected!
fail();
} else {
// read inbox....
IMAPFolder inbox = (IMAPFolder) store.getFolder("INBOX");
inbox.open(Folder.READ_WRITE);
// fetches all messages from the INBOX...
Message[] messages = inbox.getMessages();
System.out.println("..." + messages.length + " new messages found");
}
// USA
store = connect(token, "imixs-usa@alexander-logistics.com", false);
assertNotNull(store);
if (!store.isConnected()) {
// not connected!
fail();
} else {
// read inbox....
IMAPFolder inbox = (IMAPFolder) store.getFolder("INBOX");
inbox.open(Folder.READ_WRITE);
// fetches all messages from the INBOX...
Message[] messages = inbox.getMessages();
System.out.println("..." + messages.length + " new messages found");
}
} catch (IOException e) {
e.printStackTrace();
fail();
} catch (MessagingException e) {
e.printStackTrace();
fail();
}
}
/** /**
* Debug reading first mail.... * Debug reading first mail....
*/ */
@ -106,7 +187,7 @@ public class TestIMAPOutlookOAuth {
// try to connect... // try to connect...
token = getAuthToken(); token = getAuthToken();
assertNotNull(token); assertNotNull(token);
store = connect(token, "imixs@alexander-logistics.com"); store = connect(token, "imixs@alexander-logistics.com", true);
assertNotNull(store); assertNotNull(store);
if (!store.isConnected()) { if (!store.isConnected()) {
@ -195,7 +276,7 @@ public class TestIMAPOutlookOAuth {
// try to connect... // try to connect...
token = getAuthToken(); token = getAuthToken();
assertNotNull(token); assertNotNull(token);
store = connect(token, "Imixsbhv@alexander-logistics.com"); store = connect(token, "Imixsbhv@alexander-logistics.com", false);
assertNotNull(store); assertNotNull(store);
@ -228,7 +309,7 @@ public class TestIMAPOutlookOAuth {
// try to connect... // try to connect...
token = getAuthToken(); token = getAuthToken();
assertNotNull(token); assertNotNull(token);
store = connect(token, "imixspl@alexander-logistics.com"); store = connect(token, "imixspl@alexander-logistics.com", false);
assertNotNull(store); assertNotNull(store);
@ -314,7 +395,7 @@ public class TestIMAPOutlookOAuth {
// try to connect... // try to connect...
token = getAuthToken(); token = getAuthToken();
assertNotNull(token); assertNotNull(token);
store = connect(token, "Imixsae@alexander-logistics.com"); store = connect(token, "Imixsae@alexander-logistics.com", false);
assertNotNull(store); assertNotNull(store);
@ -341,7 +422,7 @@ public class TestIMAPOutlookOAuth {
/** /**
* This method returns a connection to an javax.mail.store * This method returns a connection to an javax.mail.store
*/ */
public Store connect(String oauth2AccessToken, String userEmailId) { public Store connect(String oauth2AccessToken, String userEmailId, boolean debug) {
try { try {
@ -372,11 +453,11 @@ public class TestIMAPOutlookOAuth {
props.put("mail.imap.fetchsize", "1048576"); props.put("mail.imap.fetchsize", "1048576");
// debug // debug
props.put("mail.debug", "true"); props.put("mail.debug", "" + debug);
props.put("mail.debug.auth", "true"); props.put("mail.debug.auth", "" + debug);
Session session = Session.getInstance(props); Session session = Session.getInstance(props);
session.setDebug(true); session.setDebug(debug);
store = session.getStore("imaps"); store = session.getStore("imaps");
@ -391,7 +472,7 @@ public class TestIMAPOutlookOAuth {
} }
System.out.println("Store.Connect failed!"); System.out.println("Store.Connect failed!");
} catch (Exception e) { } catch (Exception e) {
System.out.println("Store.Connect failed with the errror: " + e.getMessage()); System.out.println("Store.Connect failed with the error: " + e.getMessage());
StringWriter sw = new StringWriter(); StringWriter sw = new StringWriter();
e.printStackTrace(new PrintWriter(sw)); e.printStackTrace(new PrintWriter(sw));
String exceptionAsString = sw.toString(); String exceptionAsString = sw.toString();

View file

@ -518,7 +518,12 @@ result.isValid=true;
<imixs:value/> <imixs:value/>
</imixs:item> </imixs:item>
<imixs:item name="txtactivityresult" type="xs:string"> <imixs:item name="txtactivityresult" type="xs:string">
<imixs:value/> <imixs:value><![CDATA[<imixs-data-group name="EXPORT">
<type>CSV</type>
<dataview>outbound-tax-export</dataview>
<targetname>outbound-invoice-export.csv</targetname>
<debug>true</debug>
</imixs-data-group>]]></imixs:value>
</imixs:item> </imixs:item>
<imixs:item name="keyownershipmode" type="xs:string"> <imixs:item name="keyownershipmode" type="xs:string">
<imixs:value><![CDATA[0]]></imixs:value> <imixs:value><![CDATA[0]]></imixs:value>
@ -573,7 +578,7 @@ result.isValid=true;
<bpmn2:outputSet id="OutputSet_2" name="Output Set 2"> <bpmn2:outputSet id="OutputSet_2" name="Output Set 2">
<bpmn2:dataOutputRefs>DataOutput_2</bpmn2:dataOutputRefs> <bpmn2:dataOutputRefs>DataOutput_2</bpmn2:dataOutputRefs>
</bpmn2:outputSet> </bpmn2:outputSet>
<bpmn2:signalEventDefinition id="SignalEventDefinition_4" signalRef="Signal_1"/> <bpmn2:signalEventDefinition id="SignalEventDefinition_4" signalRef="signal_1"/>
</bpmn2:intermediateCatchEvent> </bpmn2:intermediateCatchEvent>
<bpmn2:sequenceFlow id="SequenceFlow_1" sourceRef="ExclusiveGateway_1" targetRef="IntermediateCatchEvent_2"> <bpmn2:sequenceFlow id="SequenceFlow_1" sourceRef="ExclusiveGateway_1" targetRef="IntermediateCatchEvent_2">
<bpmn2:documentation id="documentation_vOugFQ"/> <bpmn2:documentation id="documentation_vOugFQ"/>
@ -891,8 +896,8 @@ Instances are created grouped
<imixs:item name="txtactivityresult" type="xs:string"> <imixs:item name="txtactivityresult" type="xs:string">
<imixs:value><![CDATA[<imixs-data-group name="EXPORT"> <imixs:value><![CDATA[<imixs-data-group name="EXPORT">
<type>CSV</type> <type>CSV</type>
<dataview>outbound-tax-export </dataview> <dataview>outbound-tax-export</dataview>
<targetname>my-export.csv</targetname> <targetname>outbound-invoice-export.csv</targetname>
<debug>true</debug> <debug>true</debug>
</imixs-data-group>]]></imixs:value> </imixs-data-group>]]></imixs:value>
</imixs:item> </imixs:item>
@ -1034,9 +1039,9 @@ Instances are created grouped
</bpmndi:BPMNLabel> </bpmndi:BPMNLabel>
</bpmndi:BPMNShape> </bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="Message_6" id="BPMNShape_Message_3"> <bpmndi:BPMNShape bpmnElement="Message_6" id="BPMNShape_Message_3">
<dc:Bounds height="20.0" width="30.0" x="108.0" y="75.0"/> <dc:Bounds height="20.0" width="30.0" x="110.0" y="80.0"/>
<bpmndi:BPMNLabel id="BPMNLabel_46"> <bpmndi:BPMNLabel id="BPMNLabel_46">
<dc:Bounds height="20.0" width="100.0" x="73.5" y="95.0"/> <dc:Bounds height="20.0" width="100.0" x="75.5" y="100.0"/>
</bpmndi:BPMNLabel> </bpmndi:BPMNLabel>
</bpmndi:BPMNShape> </bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="Message_8" id="BPMNShape_Message_6"> <bpmndi:BPMNShape bpmnElement="Message_8" id="BPMNShape_Message_6">
@ -1079,9 +1084,9 @@ Instances are created grouped
<dc:Bounds height="50.0" width="110.0" x="920.0" y="410.0"/> <dc:Bounds height="50.0" width="110.0" x="920.0" y="410.0"/>
</bpmndi:BPMNShape> </bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="IntermediateCatchEvent_2" id="BPMNShape_IntermediateCatchEvent_2"> <bpmndi:BPMNShape bpmnElement="IntermediateCatchEvent_2" id="BPMNShape_IntermediateCatchEvent_2">
<dc:Bounds height="36.0" width="36.0" x="830.0" y="417.0"/> <dc:Bounds height="36.0" width="36.0" x="827.0" y="417.0"/>
<bpmndi:BPMNLabel id="BPMNLabel_2" labelStyle="BPMNLabelStyle_1"> <bpmndi:BPMNLabel id="BPMNLabel_2" labelStyle="BPMNLabelStyle_1">
<dc:Bounds height="20.0" width="100.0" x="801.0" y="454.0"/> <dc:Bounds height="20.0" width="100.0" x="798.0" y="454.0"/>
</bpmndi:BPMNLabel> </bpmndi:BPMNLabel>
</bpmndi:BPMNShape> </bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="TextAnnotation_3" id="BPMNShape_TextAnnotation_3"> <bpmndi:BPMNShape bpmnElement="TextAnnotation_3" id="BPMNShape_TextAnnotation_3">
@ -1145,11 +1150,11 @@ Instances are created grouped
<bpmndi:BPMNEdge bpmnElement="SequenceFlow_1" id="BPMNEdge_SequenceFlow_1" sourceElement="BPMNShape_ExclusiveGateway_1" targetElement="BPMNShape_IntermediateCatchEvent_2"> <bpmndi:BPMNEdge bpmnElement="SequenceFlow_1" id="BPMNEdge_SequenceFlow_1" sourceElement="BPMNShape_ExclusiveGateway_1" targetElement="BPMNShape_IntermediateCatchEvent_2">
<bpmndi:BPMNLabel id="BPMNLabel_3"/> <bpmndi:BPMNLabel id="BPMNLabel_3"/>
<di:waypoint x="770.0" y="435.0"/> <di:waypoint x="770.0" y="435.0"/>
<di:waypoint x="830.0" y="435.0"/> <di:waypoint x="827.0" y="435.0"/>
</bpmndi:BPMNEdge> </bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="SequenceFlow_3" id="BPMNEdge_SequenceFlow_3" sourceElement="BPMNShape_IntermediateCatchEvent_2" targetElement="BPMNShape_Task_1"> <bpmndi:BPMNEdge bpmnElement="SequenceFlow_3" id="BPMNEdge_SequenceFlow_3" sourceElement="BPMNShape_IntermediateCatchEvent_2" targetElement="BPMNShape_Task_1">
<bpmndi:BPMNLabel id="BPMNLabel_4"/> <bpmndi:BPMNLabel id="BPMNLabel_4"/>
<di:waypoint x="866.0" y="435.0"/> <di:waypoint x="863.0" y="435.0"/>
<di:waypoint x="920.0" y="435.0"/> <di:waypoint x="920.0" y="435.0"/>
</bpmndi:BPMNEdge> </bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="SequenceFlow_4" id="BPMNEdge_SequenceFlow_4" sourceElement="BPMNShape_Task_1" targetElement="BPMNShape_Lgiawg"> <bpmndi:BPMNEdge bpmnElement="SequenceFlow_4" id="BPMNEdge_SequenceFlow_4" sourceElement="BPMNShape_Task_1" targetElement="BPMNShape_Lgiawg">
@ -1161,8 +1166,8 @@ Instances are created grouped
<bpmndi:BPMNLabel id="BPMNLabel_11"/> <bpmndi:BPMNLabel id="BPMNLabel_11"/>
<di:waypoint x="855.0" y="304.0"/> <di:waypoint x="855.0" y="304.0"/>
<di:waypoint x="855.0" y="364.0"/> <di:waypoint x="855.0" y="364.0"/>
<di:waypoint x="848.0" y="364.0"/> <di:waypoint x="845.0" y="364.0"/>
<di:waypoint x="848.0" y="417.0"/> <di:waypoint x="845.0" y="417.0"/>
</bpmndi:BPMNEdge> </bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="SequenceFlow_11" id="BPMNEdge_SequenceFlow_11" sourceElement="BPMNShape_IntermediateCatchEvent_4" targetElement="BPMNShape_Task_1"> <bpmndi:BPMNEdge bpmnElement="SequenceFlow_11" id="BPMNEdge_SequenceFlow_11" sourceElement="BPMNShape_IntermediateCatchEvent_4" targetElement="BPMNShape_Task_1">
<bpmndi:BPMNLabel id="BPMNLabel_17"/> <bpmndi:BPMNLabel id="BPMNLabel_17"/>
@ -1226,8 +1231,8 @@ Instances are created grouped
</bpmndi:BPMNLabel> </bpmndi:BPMNLabel>
</bpmndi:BPMNShape> </bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="sequenceFlow_8adg0g" id="BPMNEdge_sBKjhQ" sourceElement="BPMNShape_4T5wsg" targetElement="BPMNShape_Task_7"> <bpmndi:BPMNEdge bpmnElement="sequenceFlow_8adg0g" id="BPMNEdge_sBKjhQ" sourceElement="BPMNShape_4T5wsg" targetElement="BPMNShape_Task_7">
<di:waypoint x="534.0" y="527.0"/> <di:waypoint x="535.0" y="527.0"/>
<di:waypoint x="534.0" y="492.0"/> <di:waypoint x="535.0" y="492.0"/>
<di:waypoint x="615.0" y="492.0"/> <di:waypoint x="615.0" y="492.0"/>
<di:waypoint x="615.0" y="460.0"/> <di:waypoint x="615.0" y="460.0"/>
</bpmndi:BPMNEdge> </bpmndi:BPMNEdge>