added a debug test for outlook mail, upgraded docker image

This commit is contained in:
Ralph Soika 2025-03-16 18:15:12 +01:00
parent 47d90c8655
commit 0b20c10c0a
7 changed files with 250 additions and 149 deletions

View file

@ -1,4 +1,5 @@
FROM imixs/imixs-office-workflow:5.1.0
FROM imixs/imixs-office-workflow:5.1.1-SNAPSHOT-wildfly-27.0.1.Final-jdk17
#FROM imixs/imixs-office-workflow:5.1.0
# Setup debug configuration
# COPY ./docker/configuration/standalone-debug.xml /opt/jboss/wildfly/standalone/configuration/

View file

@ -1,4 +1,5 @@
FROM imixs/imixs-office-workflow:5.1.0
FROM imixs/imixs-office-workflow:5.1.1-SNAPSHOT-wildfly-27.0.1.Final-jdk17
#FROM imixs/imixs-office-workflow:5.1.0
# Deploy artefact
RUN rm -r /opt/jboss/wildfly/standalone/deployments/*

View file

@ -1,14 +1,28 @@
# Versionen
### 1.3.1 (Development - Office-Workflow 5.0.4 )
### 1.3.3 (Development)
- Imixs-Archive 3.1.1. Compactor Sevrvice
Migration:
set ARCHIVE_SNAPSHOT_GRACE_PERIOD= 5
set ARCHIVE_SNAPSHOT_COMPACTOR= enabled
### 1.3.2
- Posteingang Worklfow - timeout logic
- added lucene client to docker image
- added optional oidc profile
### 1.3.1
- Imixs-Office-Workflow 5.0.4
- Mulit Currecy Feature für Ausgangsrechnungen
- Neue Analyse Boards
- Neue SOA
- Neues Mahnwesen
### 1.3.0
- Migration auf Imixs-Office-Workflow 5.0.2
@ -25,6 +39,7 @@
1. Parameter Pflegen
a) Währungen pflegen
- DE = EUR;CHF;SEK;RUB;NOK;GBP;USD;CAD
- PL = PLN;EUR;CHF;SEK;RUB;NOK;GBP;USD;CAD
- DWC = AED; EUR;CHF;SEK;RUB;NOK;GBP;USD;CAD
@ -34,19 +49,16 @@
3. Alle Workflow Modelle erneuern
### 1.2.21 (Draft)
- Beim XML Invoice Import wird nun auch die Sprache für das Mahnwesen ermittelt (fehlte)
- Währungsunabhängigkeit
**Migration**
1. Paramter Pflegen
a) Währungen pflegen
- DE = EUR;CHF;SEK;RUB;NOK;GBP;USD;CAD
- PL = PLN;EUR;CHF;SEK;RUB;NOK;GBP;USD;CAD
- DWC = AED; EUR;CHF;SEK;RUB;NOK;GBP;USD;CAD
@ -67,7 +79,6 @@
- Neue XML Invoice Schnittstelle
- Mahnwesen englisch
### 1.2.18
- Fix in Archiv Suche CustomSearchController.java - requestscoped
@ -90,10 +101,10 @@
- sepa-export-manual-3.0.0
- sepa-export-manual-pl-3.0.1
**Achtung**: Kubernetes Deploymets müssen angepasst werden (siehe AGL Polen)
### 1.2.15
- kleinere Layout Anpassungen in den Formualren und input Feldern (Positionstabelle, Sachbearbeiter Auswahl...)
- invoice.exchangerate Input ersetzt nun , durch . damit der Wert richtig gespeichert wird.
- Fix Cargosoft DATEV Import - Korektur des Rechnungsdatums / Jahr
@ -105,7 +116,6 @@
- Internationalisierung
### 1.2.13
- Payment Statistik
@ -119,13 +129,10 @@
Realisiert über neue Custom Feld 'textlist'
- validierung e-mail erfolgt über Adapter und Workflow Rule
### 1.2.10
Inkasso Workflow
### 1.2.8
Neue KI Version
@ -134,7 +141,6 @@
Zalungsavis für SEPA Rechnungen freigeschaltet
### 1.2.7
Erweiterte Kreditoren Verwaltung. Es können bis zu 4 IBAN/BIC Kombinationen pro Kreditor erfasst werden.

View file

@ -56,54 +56,54 @@ services:
###############################################
# Tika OCR Service
###############################################
tika:
#image: apache/tika:latest
#image: apache/tika:1.24.1-full
image: apache/tika:2.4.1-full
environment:
TZ: "Europe/Berlin"
ports:
- "9998:9998"
# tika:
# #image: apache/tika:latest
# #image: apache/tika:1.24.1-full
# image: apache/tika:2.4.1-full
# environment:
# TZ: "Europe/Berlin"
# ports:
# - "9998:9998"
##################
# Exporter Service
##################
imixsexporter-app:
image: imixs/imixs-archive-exporter
environment:
# EXAMPLE SETUP
WORKFLOW_SERVICE_ENDPOINT: "http://app:8080/api"
WORKFLOW_SERVICE_USER: "admin"
WORKFLOW_SERVICE_PASSWORD: "adminadmin"
WORKFLOW_SERVICE_AUTHMETHOD: "form"
METRICS_ENDPOINT: "http://localhost:9991/metrics"
HEALTH_ENDPOINT: "http://localhost:9991/health"
EXPORT_PATH: "/agl/dwc-test"
EXPORT_FTP_HOST: "u248962.your-storagebox.de"
EXPORT_FTP_PORT: "21"
EXPORT_FTP_USER: "u248962-sub4"
EXPORT_FTP_PASSWORD: "en4g3f1Jw0WlQ9Yb"
ports:
- "8081:8080"
- "8788:8787"
# imixsexporter-app:
# image: imixs/imixs-archive-exporter
# environment:
# # EXAMPLE SETUP
# WORKFLOW_SERVICE_ENDPOINT: "http://app:8080/api"
# WORKFLOW_SERVICE_USER: "admin"
# WORKFLOW_SERVICE_PASSWORD: "adminadmin"
# WORKFLOW_SERVICE_AUTHMETHOD: "form"
# METRICS_ENDPOINT: "http://localhost:9991/metrics"
# HEALTH_ENDPOINT: "http://localhost:9991/health"
# EXPORT_PATH: "/agl/dwc-test"
# EXPORT_FTP_HOST: "u248962.your-storagebox.de"
# EXPORT_FTP_PORT: "21"
# EXPORT_FTP_USER: "u248962-sub4"
# EXPORT_FTP_PASSWORD: "en4g3f1Jw0WlQ9Yb"
# ports:
# - "8081:8080"
# - "8788:8787"
###############################################
# Imixs-Admin
###############################################
imixsadmin:
image: imixs/imixs-admin
ports:
- "8888:8080"
# imixsadmin:
# image: imixs/imixs-admin
# ports:
# - "8888:8080"
###############################################
# Mailgateway
###############################################
mailgateway:
image: imixs/exim4
environment:
EXIM_SMARTHOST: "www149.your-server.de:25"
EXIM_PASSWORD: "www149.your-server.de:webmaster@imixs.com:$MAILPASSWORD"
EXIM_ALLOWED_SENDERS: "10.0.0.0/8:172.18.0.0/12:192.168.0.0/16"
# mailgateway:
# image: imixs/exim4
# environment:
# EXIM_SMARTHOST: "www149.your-server.de:25"
# EXIM_PASSWORD: "www149.your-server.de:webmaster@imixs.com:$MAILPASSWORD"
# EXIM_ALLOWED_SENDERS: "10.0.0.0/8:172.18.0.0/12:192.168.0.0/16"
# prometheus:
# image: prom/prometheus:latest

View file

@ -6,7 +6,7 @@
<parent>
<artifactId>office-alexander-logistics</artifactId>
<groupId>com.alexander-logistics</groupId>
<version>1.3.2</version>
<version>1.3.3</version>
</parent>
<artifactId>office-alexander-logistics-app</artifactId>
<packaging>war</packaging>

View file

@ -8,17 +8,6 @@ import java.io.StringWriter;
import java.util.Map;
import java.util.Properties;
import javax.mail.Address;
import javax.mail.BodyPart;
import javax.mail.Folder;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.Multipart;
import javax.mail.Part;
import javax.mail.Session;
import javax.mail.Store;
import javax.mail.internet.MimeBodyPart;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
@ -27,14 +16,25 @@ import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.message.BasicHeader;
import org.eclipse.angus.mail.imap.IMAPFolder;
import org.imixs.archive.importer.mail.IMAPImportHelper;
import org.junit.Ignore;
import org.junit.Test;
import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.sun.mail.imap.IMAPFolder;
import jakarta.mail.Address;
import jakarta.mail.BodyPart;
import jakarta.mail.Folder;
import jakarta.mail.Message;
import jakarta.mail.MessagingException;
import jakarta.mail.Multipart;
import jakarta.mail.Part;
import jakarta.mail.Session;
import jakarta.mail.Store;
import jakarta.mail.internet.MimeBodyPart;
import jakarta.mail.internet.MimeUtility;
import junit.framework.Assert;
/**
@ -92,6 +92,99 @@ public class TestIMAPOutlookOAuth {
}
/**
* Debug reading first mail....
*/
@Test
@Ignore
public void TestMailboxImixsDebug() {
Store store = null;
String token = null;
try {
// try to connect...
token = getAuthToken();
Assert.assertNotNull(token);
store = connect(token, "imixs@alexander-logistics.com");
Assert.assertNotNull(store);
if (!store.isConnected()) {
// not connected!
} 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");
for (Message message : messages) {
Address[] fromAddress = null;
String subject = null;
// if we can not open the mail (messaging Exception) than we simply skipp this
// mail see Issue #175
try {
System.out.println("...try to open first message...");
fromAddress = message.getFrom();
subject = message.getSubject();
} catch (MessagingException me) {
System.out.println("...Failed to read message from inbox: " + me.getMessage());
Assert.fail();
}
System.out.println("......received mail from: " + fromAddress[0].toString());
System.out.println("......subject = " + subject);
Object contentObject = message.getContent();
if (contentObject instanceof Multipart) {
System.out.println("......found multipart");
// here we are save to cast the content to Mulipart
Multipart multiPart = (Multipart) message.getContent();
System.out.println("......multipartcount = " + multiPart.getCount());
for (int i = 0; i < multiPart.getCount(); i++) {
BodyPart bodyPart = multiPart.getBodyPart(i);
if (bodyPart instanceof MimeBodyPart) {
MimeBodyPart mimeBodyPart = (MimeBodyPart) multiPart.getBodyPart(i);
if (Part.ATTACHMENT.equalsIgnoreCase(mimeBodyPart.getDisposition())) {
String fileName = mimeBodyPart.getFileName();
if (fileName == null) {
System.out.println("...skip detaching file, because of missing filename");
continue; // skip this attachment
}
// decode filename (issue #202)
fileName = MimeUtility.decodeText(fileName);
System.out.println("... filename = " + fileName);
// detach only add PDF files?
// add this attachment
InputStream input = mimeBodyPart.getInputStream();
byte[] content = IMAPImportHelper.readAllBytes(input);
String contentType = mimeBodyPart.getContentType();
System.out.println("mimetype=" + contentType);
System.out.println("content size=" + content.length);
}
}
}
}
break;
}
}
} catch (IOException e) {
e.printStackTrace();
Assert.fail();
} catch (MessagingException e) {
e.printStackTrace();
Assert.fail();
}
}
@Test
public void TestMailboxImixsBHV() {
Store store = null;

View file

@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.alexander-logistics</groupId>
<artifactId>office-alexander-logistics</artifactId>
<version>1.3.2</version>
<version>1.3.3</version>
<packaging>pom</packaging>
<name>Imixs Office Workflow - Custom Build</name>
@ -32,7 +32,7 @@
<!-- 3.0.2 -->
<org.imixs.archive.version>3.1.1-SNAPSHOT</org.imixs.archive.version>
<org.imixs.adapters.version>3.0.3</org.imixs.adapters.version>
<org.imixs.melman.version>2.0.2</org.imixs.melman.version>
<org.imixs.melman.version>2.1.1-SNAPSHOT</org.imixs.melman.version>
<microprofile.version>6.0</microprofile.version>
<net.sf.saxon.version>9.9.1-4</net.sf.saxon.version>
<apache.pdfbox.version>2.0.26</apache.pdfbox.version>