update business partner

This commit is contained in:
Ralph Soika 2025-04-26 08:41:10 +02:00
parent d6ba785002
commit bdf3c8ba01
6 changed files with 131 additions and 111 deletions

View file

@ -5,6 +5,11 @@
- Finalizierung Business Partner Interface
- Zoho Schnittstelle
**Migration**
- Encoding für CSV Impoort aus cargosoft muss auf `encoding=UTF-8` stehen!
- Neues Businesspartner BPMN Modell einspielen
### 1.3.3
- Imixs-Archive 3.1.1. Compactor Sevrvice

View file

@ -9,12 +9,7 @@ In Imixs ist es dann aber möglich zusätzliche Attribute zu einem Businesspartn
- Bankverbindungen
- Emailadressen für Mahnwesen
Die Businessparnter werden zentral nur in dem Hauptsystem in Bremen importiert und verwaltet. Damit ein AGL System auf die BusinessPartner zugreifen kann wird eine Rest API Schnittstelle verwendet. Diese kann über Environmentvariablen aktiviert werden:
# Rest Service BusinessPartner API
WORKFLOW_SERVICE_ENDPOINT: "http://app:8080/api"
WORKFLOW_SERVICE_USER: "admin"
WORKFLOW_SERVICE_PASSWORD: "xxxxxxxx"
Die Businessparnter werden für jedes System separat importiert und verwaltet.
## BusinessPartner Suche
@ -28,7 +23,7 @@ Z.b. kann das als Custom Part in eine Form eingebunden werden:
<item name="bpid" type="custom" path="alexander/businesspartner_search" required="true" label="Businesspartner:" />
```
Das widget legt dann automatisch die felder `bpid` und `bpidname` an.
Das widget legt dann automatisch die Items `bpid` und `bpidname` an.
Alternativ kann im Backend über die EJB BusinessPartnerService nach bpid gesucht werden:
@ -40,10 +35,20 @@ Alternativ kann im Backend über die EJB BusinessPartnerService nach bpid gesuch
# Daten Migration
Der `BusinessPartnerImportService` hängt sich über ein CDI Observer Pattern an den standard CSVImport Service
der die Cargosoft Stammdaten aktualisiert. Der BusinessPartnerImportService
prüft ob der Workflow schon existiert oder ggf. aktualisiert werden muss.
Der Service migriert auch die alten zusätzlichen IBAN/BIC felder wenn der Business partner erstmals neu angelegt wird. Falls bei der ersten Migration erkannt wird, dass die IBAN Nummern nicht eindeutig sind wir der BusinessParter mit dem Event 300 angelegt.
-
\_vendor_zip_code
\_vendor_fax
(type:cargosoftkreditor) AND ($modified:[20010101 TO 20250215])
Wir müssen gundsätzlich erstmal über all $nosnapshot = true eintragen!
## Anmerkungen zu seltsamen Daten
BP4641 existier jetzt 3 mal mit der Debitoren nummer D14641

View file

@ -53,6 +53,7 @@ import org.imixs.workflow.FileData;
import org.imixs.workflow.ItemCollection;
import org.imixs.workflow.engine.DocumentService;
import org.imixs.workflow.engine.WorkflowService;
import org.imixs.workflow.engine.index.UpdateService;
import org.imixs.workflow.exceptions.AccessDeniedException;
import org.imixs.workflow.exceptions.ModelException;
import org.imixs.workflow.exceptions.PluginException;
@ -113,6 +114,9 @@ public class CargosoftMigrationRestService implements Serializable {
@Inject
MahnlaufService mahnlaufService;
@Inject
UpdateService updateService;
@Inject
TeamService teamService;
@ -692,6 +696,9 @@ public class CargosoftMigrationRestService implements Serializable {
totalObjects++;
if (syncBusinessPartner(cargosoftItemCol)) {
syncs++;
// Explicit flush the lucene search event log
updateService.updateIndex();
}
if (syncs >= maxcount)
break;
@ -808,7 +815,7 @@ public class CargosoftMigrationRestService implements Serializable {
}
/**
* Hilfsmethode speichert eine cargoosft kreditor object...
* Hilfsmethode - löscht ein cargoosoft object...
*
* @param bpID
* @param messageBuffer

View file

@ -65,12 +65,15 @@ import jakarta.enterprise.event.Observes;
* "ON_DOCUMENT_SAVE" reagiert. Hier hängt sich der BusinessPartnerImportService
* ein und prüft ob der Workflow schon existiert oder ggf. aktualisiert werden
* muss.
*
* <p>
* Der Service migriert auch die alten zusätzlichen IBAN/BIC felder wenn der
* Business partner erstmals neu angelegt wird.
*
* The service set also the flag NOSNAPSHOT=true for the crgosoftcreditor
* document type.
* <p>
* Falls bei der ersten Migration erkannt wird, dass die IBAN Nummern nicht
* eindeutig sind wir der BusinessParter mit dem Event 300 angelegt.
* <p>
* Im Cargosoft Entity wird zusätzlich das flag NOSNAPSHOT=true gesetzt. Dies
* ist nur eine Performance Optimierung.
*
* @author rsoika
*
@ -110,11 +113,11 @@ public class BusinessPartnerImportService {
if (event == null || event.getDocument() == null) {
return;
}
// check if source is already completed
if (event.getEventType() == DocumentEvent.ON_DOCUMENT_SAVE) {
// check type!
if ("cargosoftkreditor".equals(event.getDocument().getType())) {
// set NOSNAPSHOT=true
// check source
if (event.getEventType() == DocumentEvent.ON_DOCUMENT_SAVE
&& "cargosoftkreditor".equals(event.getDocument().getType())) {
// set NOSNAPSHOT=true fro cargosoft item (migration)
event.getDocument().setItemValue(SnapshotService.NOSNAPSHOT, true);
// run only if we have the model 'businesspartner-*';
@ -193,7 +196,7 @@ public class BusinessPartnerImportService {
logger.warning("Failed to update Business Partner Object " + name + " - " + e.getMessage());
}
}
}
}
}

View file

@ -634,9 +634,9 @@
<dc:Bounds height="50.0" width="110.0" x="1360.0" y="270.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="event_aSdkwg" id="BPMNShape_uesqgg">
<dc:Bounds height="36.0" width="36.0" x="437.0" y="277.0"/>
<dc:Bounds height="36.0" width="36.0" x="457.0" y="277.0"/>
<bpmndi:BPMNLabel id="BPMNLabel_AxKRKQ">
<dc:Bounds height="20.0" width="100.0" x="405.0" y="316.0"/>
<dc:Bounds height="20.0" width="100.0" x="425.0" y="316.0"/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="sequenceFlow_S9LVXg" id="BPMNEdge_xoCSiA" sourceElement="BPMNShape_CUpR6w" targetElement="BPMNShape_6IZk7Q">
@ -646,7 +646,7 @@
<bpmndi:BPMNShape bpmnElement="event_Tr0aug" id="BPMNShape_NEaJjA">
<dc:Bounds height="36.0" width="36.0" x="1227.0" y="277.0"/>
<bpmndi:BPMNLabel id="BPMNLabel_GkrCTA">
<dc:Bounds height="20.0" width="100.0" x="1195.0" y="316.0"/>
<dc:Bounds height="20.0" width="100.0" x="1193.0" y="258.0"/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="sequenceFlow_1mXO8A" id="BPMNEdge_7CorJA" sourceElement="BPMNShape_NEaJjA" targetElement="BPMNShape_ghujeA">
@ -703,8 +703,8 @@
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="sequenceFlow_gC0I9w" id="BPMNEdge_0nCVvg" sourceElement="BPMNShape_T4k09g" targetElement="BPMNShape_ghujeA">
<di:waypoint x="1360.0" y="185.0"/>
<di:waypoint x="1390.0" y="185.0"/>
<di:waypoint x="1363.0" y="193.0"/>
<di:waypoint x="1390.0" y="193.0"/>
<di:waypoint x="1390.0" y="270.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape bpmnElement="task_delO7Q" id="BPMNShape_rEOMWA">
@ -754,8 +754,8 @@
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sequenceFlow_b0Bj3Q" id="BPMNEdge_CDn41A" sourceElement="BPMNShape_rEOMWA" targetElement="BPMNShape_NEaJjA">
<di:waypoint x="770.0" y="540.0"/>
<di:waypoint x="1240.0" y="540.0"/>
<di:waypoint x="1240.0" y="312.0"/>
<di:waypoint x="1246.0" y="540.0"/>
<di:waypoint x="1246.0" y="313.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sequenceFlow_T5L9aQ" id="BPMNEdge_dAQH1Q" sourceElement="BPMNShape_7JA0nw" targetElement="BPMNShape_FKXJtw">
<di:waypoint x="770.0" y="295.0"/>
@ -769,7 +769,7 @@
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="sequenceFlow_jAU3VA" id="BPMNEdge_2qLI2g" sourceElement="BPMNShape_6IZk7Q" targetElement="BPMNShape_uesqgg">
<di:waypoint x="390.0" y="295.0"/>
<di:waypoint x="437.0" y="295.0"/>
<di:waypoint x="457.0" y="295.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sequenceFlow_BHsRkQ" id="BPMNEdge_1LX47g" sourceElement="BPMNShape_mG4csA" targetElement="BPMNShape_rEOMWA">
<di:waypoint x="593.0" y="535.0"/>
@ -782,7 +782,7 @@
<di:waypoint x="675.0" y="510.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sequenceFlow_8O1EtQ" id="BPMNEdge_JxSLfA" sourceElement="BPMNShape_uesqgg" targetElement="BPMNShape_7JA0nw">
<di:waypoint x="473.0" y="295.0"/>
<di:waypoint x="493.0" y="295.0"/>
<di:waypoint x="660.0" y="295.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape bpmnElement="event_6250fg" id="BPMNShape_v5Xzvg">

View file

@ -644,13 +644,13 @@
<di:waypoint x="340.0" y="295.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape bpmnElement="event_Tr0aug" id="BPMNShape_NEaJjA">
<dc:Bounds height="36.0" width="36.0" x="1227.0" y="277.0"/>
<dc:Bounds height="36.0" width="36.0" x="1237.0" y="277.0"/>
<bpmndi:BPMNLabel id="BPMNLabel_GkrCTA">
<dc:Bounds height="20.0" width="100.0" x="1195.0" y="316.0"/>
<dc:Bounds height="20.0" width="100.0" x="1203.0" y="255.0"/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="sequenceFlow_1mXO8A" id="BPMNEdge_7CorJA" sourceElement="BPMNShape_NEaJjA" targetElement="BPMNShape_ghujeA">
<di:waypoint x="1263.0" y="295.0"/>
<di:waypoint x="1273.0" y="295.0"/>
<di:waypoint x="1360.0" y="295.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sequenceFlow_rwdWxw" id="BPMNEdge_t88dUw" sourceElement="BPMNShape_ghujeA" targetElement="BPMNShape_85k4rg">
@ -754,8 +754,8 @@
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sequenceFlow_b0Bj3Q" id="BPMNEdge_CDn41A" sourceElement="BPMNShape_rEOMWA" targetElement="BPMNShape_NEaJjA">
<di:waypoint x="770.0" y="540.0"/>
<di:waypoint x="1240.0" y="540.0"/>
<di:waypoint x="1240.0" y="312.0"/>
<di:waypoint x="1254.0" y="540.0"/>
<di:waypoint x="1254.0" y="313.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sequenceFlow_T5L9aQ" id="BPMNEdge_dAQH1Q" sourceElement="BPMNShape_7JA0nw" targetElement="BPMNShape_FKXJtw">
<di:waypoint x="770.0" y="295.0"/>
@ -827,7 +827,7 @@
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sequenceFlow_neSsFQ" id="BPMNEdge_b7C0wQ" sourceElement="BPMNShape_VljsIw" targetElement="BPMNShape_NEaJjA">
<di:waypoint x="1170.0" y="295.0"/>
<di:waypoint x="1227.0" y="295.0"/>
<di:waypoint x="1237.0" y="295.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape bpmnElement="event_AMs05g" id="BPMNShape_rS0hsw">
<dc:Bounds height="36.0" width="36.0" x="477.0" y="517.0"/>
@ -862,15 +862,15 @@
<di:waypoint x="847.0" y="195.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape bpmnElement="event_u8OBFg" id="BPMNShape_Kp730Q">
<dc:Bounds height="36.0" width="36.0" x="1137.0" y="177.0"/>
<dc:Bounds height="36.0" width="36.0" x="1147.0" y="177.0"/>
<bpmndi:BPMNLabel id="BPMNLabel_iUQ02A">
<dc:Bounds height="20.0" width="100.0" x="1105.0" y="216.0"/>
<dc:Bounds height="20.0" width="100.0" x="1115.0" y="216.0"/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="sequenceFlow_zd6RWA" id="BPMNEdge_6qKC4A" sourceElement="BPMNShape_VljsIw" targetElement="BPMNShape_Kp730Q">
<di:waypoint x="1114.0" y="270.0"/>
<di:waypoint x="1114.0" y="195.0"/>
<di:waypoint x="1137.0" y="195.0"/>
<di:waypoint x="1147.0" y="195.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sequenceFlow_rNZ3tw" id="BPMNEdge_zrajzA" sourceElement="BPMNShape_VljsIw" targetElement="BPMNShape_FKXJtw">
<di:waypoint x="1080.0" y="270.0"/>