From d5d4b21434806a27ada23d2436bbe2f05929bbc0 Mon Sep 17 00:00:00 2001 From: Ralph Soika Date: Sat, 30 Nov 2024 16:00:40 +0100 Subject: [PATCH] =?UTF-8?q?AGL=20Metrics=20eingef=C3=BChrt=20(draft)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose.yml | 2 + .../MetricDebitorRestService.java | 208 + .../MetricDebitorService.java | 178 + workflow/rechnungsausgang-de-1.0.14.bpmn | 4280 +++++++++++++++++ 4 files changed, 4668 insertions(+) create mode 100644 office-alexander-logistics-app/src/main/java/com/alexanderlogistics/MetricDebitorRestService.java create mode 100644 office-alexander-logistics-app/src/main/java/com/alexanderlogistics/MetricDebitorService.java create mode 100644 workflow/rechnungsausgang-de-1.0.14.bpmn diff --git a/docker-compose.yml b/docker-compose.yml index 00772be..e908d2c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -40,6 +40,8 @@ services: LLM_SERVICE_ENDPOINT_USER: "admin" LLM_SERVICE_ENDPOINT_PASSWORD: "imixs4.null" + METRICS_ENABLED: "true" + ports: - "8080:8080" - "9990:9990" diff --git a/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/MetricDebitorRestService.java b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/MetricDebitorRestService.java new file mode 100644 index 0000000..0aea3e1 --- /dev/null +++ b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/MetricDebitorRestService.java @@ -0,0 +1,208 @@ +package com.alexanderlogistics; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.logging.Logger; + +import org.imixs.marty.team.TeamService; +import org.imixs.workflow.ItemCollection; +import org.imixs.workflow.ItemCollectionComparator; +import org.imixs.workflow.engine.DocumentService; +import org.imixs.workflow.exceptions.PluginException; +import org.imixs.workflow.exceptions.QueryException; + +import jakarta.ejb.Stateless; +import jakarta.inject.Inject; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; + +@Path("metrics") +@Stateless +public class MetricDebitorRestService { + + private static Logger logger = Logger.getLogger(MetricDebitorRestService.class.getName()); + + @Inject + DocumentService documentService; + + @Inject + MetricDebitorService metricService; + + @Inject + TeamService teamService; + + @GET + @Path("/ping") + @Produces({ MediaType.TEXT_PLAIN }) + public String ping() { + logger.info("GET ping"); + return "ping: " + System.currentTimeMillis(); + } + + /** + * This method refreshes all debitor metrics by iterating through the metric + * entities. + * + * @return + */ + @GET + @Path("/refresh") + @Produces({ MediaType.TEXT_PLAIN }) + public Response refreshMetrics() { + try { + // Alle Debitoren Metriken laden + String query = "(type:" + MetricDebitorService.TYPE_METRIC_DEBITOR + ")"; + List metrics = documentService.find(query, 9999, 0); + + // Metriken initialisieren + for (ItemCollection metric : metrics) { + metricService.initMetric(metric); + } + + return Response.ok().entity("Initialized " + metrics.size() + " debitor metrics").build(); + + } catch (Exception e) { + return Response.serverError() + .entity("Failed to initialize metrics: " + e.getMessage()) + .build(); + } + } + + /** + * This method initializes the metrics for all debitors with open invoices. + * The method creates or updates the metric entires for each debitor. + * + * @return + */ + @GET + @Path("/init") + @Produces({ MediaType.TEXT_PLAIN }) + public Response initMetrics() { + Map dbtrDataCache = new HashMap(); + long l = System.currentTimeMillis(); + logger.info("├── init metrics..."); + try { + // compute all departments + List spaceNames = new ArrayList(); + List spaces = teamService.getSpaces(); + // sort by space.name + Collections.sort(spaces, new ItemCollectionComparator("space.name", true)); + for (ItemCollection space : spaces) { + String spaceName = space.getItemValueString("space.name"); + spaceNames.add(spaceName); + logger.info("│   ├── grouping invoices by debitor..."); + groupInvoicesByWeek(space.getUniqueID(), spaceName, dbtrDataCache); + } + logger.info("│   ├── grouping invoices finished in " + (System.currentTimeMillis() - l) + "ms"); + + rebuildMetrics(dbtrDataCache); + logger.info("├── init metrics completed in " + (System.currentTimeMillis() - l) + "ms"); + return Response.ok().entity("init metrics completed in " + (System.currentTimeMillis() - l) + "ms").build(); + + } catch (Exception e) { + return Response.serverError() + .entity("Failed to initialize metrics: " + e.getMessage()) + .build(); + } + } + + private void rebuildMetrics(Map dbtrDataCache) throws PluginException { + logger.info("│   ├── rebuild metrics..."); + + for (String dbtrNumber : dbtrDataCache.keySet()) { + DbtrData dbtrData = dbtrDataCache.get(dbtrNumber); + String dbtrName = dbtrData.dbtrName; + + ItemCollection metric = metricService.loadMetric(dbtrNumber, dbtrName); + metric.setItemValue(MetricDebitorService.ITEM_SALDO, dbtrData.getTotal("EUR")); + documentService.save(metric); + metricService.initMetric(metric); + } + } + + /** + * Diese Methode gruppiert eine Rechnungsliste nach debitoren + * + * @param spaceID - Space Ref to select a list of invoices associated with + * a + * space + * @param dbtrDataCache - a local cache storing all invoices by week + * + * + */ + private void groupInvoicesByWeek(String spaceID, String spaceName, + Map dbtrDataCache) { + + logger.info("│   │   ├── group invoices for " + spaceName + "/" + spaceID); + try { + List invoices = documentService.find( + "$modelversion:rechnungsausgang-* AND type:workitem AND $uniqueidref:" + spaceID, 9999, 0, + "invoice.number", false); + + logger.fine(" found " + invoices.size() + " for space " + spaceName); + for (ItemCollection invoice : invoices) { + + String debitorName = invoice.getItemValueString("dbtr.name"); + String debitorNumber = invoice.getItemValueString("dbtr.number"); + + DbtrData invoiceData = dbtrDataCache.get(debitorNumber); + if (invoiceData == null) { + invoiceData = new DbtrData(debitorNumber, debitorName); + } + + // Jetzt Rechnung addieren + invoiceData.add(invoice); + dbtrDataCache.put(debitorNumber, invoiceData); + } + + } catch (QueryException e) { + e.printStackTrace(); + } + + } + + /** + * Data Element for invoice totals by debitor. + * The object holds multiple currencies. + */ + class DbtrData { + + String dbtrName; + String dbtrNumber; + + Map totals = new HashMap<>(); + + public DbtrData(String dbtrNumber, String dbtrName) { + this.dbtrName = dbtrName; + this.dbtrNumber = dbtrNumber; + } + + public void add(ItemCollection invoice) { + String currency = invoice.getItemValueString("invoice.currency"); + Double total = invoice.getItemValueDouble("invoice.saldo"); + Double totalCurrency = totals.get(currency); + if (totalCurrency == null) { + totalCurrency = 0.0; + } + totalCurrency = totalCurrency + total; + totals.put(currency, InvoiceUtil.round(totalCurrency)); + } + + public double getTotal(String currency) { + Double result = totals.get(currency); + if (result != null) { + return result; + } else { + return 0.0; + } + } + + } + +} diff --git a/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/MetricDebitorService.java b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/MetricDebitorService.java new file mode 100644 index 0000000..f617359 --- /dev/null +++ b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/MetricDebitorService.java @@ -0,0 +1,178 @@ +package com.alexanderlogistics; + +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.ConcurrentHashMap; +import java.util.logging.Logger; + +import org.eclipse.microprofile.metrics.Metadata; +import org.eclipse.microprofile.metrics.MetricRegistry; +import org.eclipse.microprofile.metrics.Tag; +import org.eclipse.microprofile.metrics.annotation.RegistryScope; +import org.imixs.workflow.ItemCollection; +import org.imixs.workflow.engine.DocumentService; +import org.imixs.workflow.engine.ProcessingEvent; +import org.imixs.workflow.exceptions.PluginException; +import org.imixs.workflow.exceptions.QueryException; + +import jakarta.annotation.security.DeclareRoles; +import jakarta.annotation.security.RolesAllowed; +import jakarta.annotation.security.RunAs; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.enterprise.event.Observes; +import jakarta.inject.Inject; + +/** + * Dieser Service reagiert auch ProcessingEvents und speichert/aktualisert die + * zugehörige Debitoren Metric Entity. + * + */ +@DeclareRoles({ "org.imixs.ACCESSLEVEL.NOACCESS", "org.imixs.ACCESSLEVEL.READERACCESS", + "org.imixs.ACCESSLEVEL.AUTHORACCESS", "org.imixs.ACCESSLEVEL.EDITORACCESS", + "org.imixs.ACCESSLEVEL.MANAGERACCESS" }) +@RolesAllowed({ "org.imixs.ACCESSLEVEL.NOACCESS", "org.imixs.ACCESSLEVEL.READERACCESS", + "org.imixs.ACCESSLEVEL.AUTHORACCESS", "org.imixs.ACCESSLEVEL.EDITORACCESS", + "org.imixs.ACCESSLEVEL.MANAGERACCESS" }) +@RunAs("org.imixs.ACCESSLEVEL.MANAGERACCESS") +@ApplicationScoped +public class MetricDebitorService { + + private static Logger logger = Logger.getLogger(MetricDebitorService.class.getName()); + private final ConcurrentHashMap currentSaldos = new ConcurrentHashMap<>(); + + public static final String METRIC_INVOICES = "invoices"; + public static final String TYPE_METRIC_DEBITOR = "metric.debitor"; + public static final String ITEM_LAST_METRIC = "metric.saldo"; + public static final String ITEM_SALDO = "invoice.saldo"; + + @Inject + @RegistryScope(scope = MetricRegistry.APPLICATION_SCOPE) + MetricRegistry metricRegistry; + + @Inject + DocumentService documentService; + + /** + * Process Metric only if some data has changed.... + * + * @param processingEvent + * @throws PluginException + */ + public void onProcessingEvent(@Observes ProcessingEvent processingEvent) throws PluginException { + double debitorSaldo = 0; + ItemCollection invoice = processingEvent.getDocument(); + if (!invoice.getModelVersion().startsWith("rechnungsausgang-")) { + // skip event + return; + } + + // verify if saldo has changed..... + double invoiceSaldo = invoice.getItemValueDouble(ITEM_SALDO); + if (invoiceSaldo == invoice.getItemValueDouble(ITEM_LAST_METRIC)) { + // no change - no metric update! + return; + } + + // update metric and cache last value + if (processingEvent.getEventType() == ProcessingEvent.AFTER_PROCESS) { + String dbtrNumber = invoice.getItemValueString("dbtr.number"); + String dbtrName = invoice.getItemValueString("dbtr.name"); + + ItemCollection metric = loadMetric(dbtrNumber, dbtrName); + + // Saldo-Berechnung wie bisher + debitorSaldo = metric.getItemValueDouble(ITEM_SALDO); + if (invoice.hasItem(ITEM_LAST_METRIC)) { + debitorSaldo = debitorSaldo - invoice.getItemValueDouble(ITEM_LAST_METRIC); + } + debitorSaldo = InvoiceUtil.round(debitorSaldo + invoiceSaldo); + + // Speichern in der Datenbank + metric.setItemValue(ITEM_SALDO, debitorSaldo); + logger.info("--- update Debitor Saldo " + dbtrNumber + " -> " + debitorSaldo); + documentService.save(metric); + + // Aktuellen Saldo im Memory speichern + currentSaldos.put(dbtrNumber, debitorSaldo); + // Gauge registrieren + registerGauge(dbtrNumber, metric.getItemValueString("dbtr.name")); + logger.info("--- new gauge value for " + dbtrNumber + " -> " + debitorSaldo); + } + } + + /** + * This method loads a metric entity. If no metric entity exits, the method + * creates a new one. + * + * @param dbtrID + * @return + * @throws PluginException + */ + public ItemCollection loadMetric(String dbtrNumber, String dbtrName) throws PluginException { + + ItemCollection debitorMetric = null; + if (dbtrNumber == null || dbtrNumber.isEmpty()) { + throw new PluginException(PluginException.class.getName(), "QUERY ERROR", + "missing debitor number"); + } + try { + String query = "(type:" + TYPE_METRIC_DEBITOR + ") AND (name:" + dbtrNumber + ")"; + List result = documentService.find(query, 1, 0, "$modified", true); + if (result.size() > 0) { + debitorMetric = result.get(0); + } + if (debitorMetric == null) { + // create a new instance + logger.info("creating new debitor metric"); + debitorMetric = new ItemCollection(); + debitorMetric.setType(TYPE_METRIC_DEBITOR); + debitorMetric.setItemValue("name", dbtrNumber); + debitorMetric.setItemValue("dbtr.number", dbtrNumber); + debitorMetric.setItemValue("dbtr.name", dbtrName); + } + } catch (QueryException e) { + throw new PluginException(PluginException.class.getName(), "QUERY ERROR", e.getMessage(), e); + } + + return debitorMetric; + } + + /** + * Hilfsmethode um Metriken initial aufzubauen. Wird vom Metric Rest Service + * verwendet. + * + */ + public void initMetric(ItemCollection metric) { + String dbtrNumber = metric.getItemValueString("dbtr.number"); + double saldo = metric.getItemValueDouble(ITEM_SALDO); + + // Aktuellen Saldo in Map speichern + currentSaldos.put(dbtrNumber, saldo); + // Gauge registrieren + registerGauge(dbtrNumber, metric.getItemValueString("dbtr.name")); + logger.info("Initialized metric for debitor " + dbtrNumber + " -> " + saldo); + } + + /** + * Helper method to register a gauge for a debitor + * + * @param dbtrNumber - the debitor number + * @param dbtrName - the debitor name + */ + private void registerGauge(String dbtrNumber, String dbtrName) { + List tags = new ArrayList<>(); + tags.add(new Tag("type", "dbtr")); + tags.add(new Tag("number", dbtrNumber)); + tags.add(new Tag("name", dbtrName)); + + Metadata metadata = Metadata.builder() + .withName("dbtr.invoice.saldo") + .withDescription("Debitor Balance") + .withUnit("EUR") + .build(); + + metricRegistry.gauge(metadata, + () -> currentSaldos.getOrDefault(dbtrNumber, 0.0), + tags.toArray(new Tag[0])); + } +} \ No newline at end of file diff --git a/workflow/rechnungsausgang-de-1.0.14.bpmn b/workflow/rechnungsausgang-de-1.0.14.bpmn new file mode 100644 index 0000000..eb04d26 --- /dev/null +++ b/workflow/rechnungsausgang-de-1.0.14.bpmn @@ -0,0 +1,4280 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + + + + + + + + + +<itemvalue>$workflowstatus</itemvalue> + +]]> + + + In case you have already made the payment, please disregard this notice. If you require any information regarding your account, please do not hesitate to contact us.

+

Thank you for your cooperation.

+

 

+

Kind regards
Alexander Global Logistics GmbH

+ +]]>
+
+ + + + + + + + + + + + + Task_2 + ExclusiveGateway_1 + StartEvent_1 + IntermediateCatchEvent_6 + EventBasedGateway_1 + IntermediateCatchEvent_13 + IntermediateThrowEvent_11 + IntermediateThrowEvent_8 + IntermediateCatchEvent_1 + IntermediateCatchEvent_5000-20 + Task_6 + Task_5 + IntermediateCatchEvent_23 + EndEvent_3 + EndEvent_2 + IntermediateCatchEvent_3 + ExclusiveGateway_5 + IntermediateCatchEvent_18 + IntermediateCatchEvent_17 + IntermediateCatchEvent_2 + IntermediateCatchEvent_5 + + TextAnnotation_1 + task_E0DgYw + event_0WRr6A + event_AXDCrA + event_u2FK8g + gateway_J96obA + event_XIV4XA + + + IntermediateCatchEvent_22 + Task_7 + Task_1 + IntermediateThrowEvent_12 + Task_3 + IntermediateCatchEvent_4 + EventBasedGateway_3 + EventBasedGateway_4 + IntermediateThrowEvent_1 + IntermediateCatchEvent_29 + IntermediateCatchEvent_9 + IntermediateCatchEvent_21 + Task_4 + IntermediateCatchEvent_14 + ExclusiveGateway_3 + IntermediateThrowEvent_6 + IntermediateCatchEvent_20 + IntermediateCatchEvent_10 + ExclusiveGateway_4 + IntermediateCatchEvent_15 + IntermediateCatchEvent_19 + IntermediateCatchEvent_8 + IntermediateCatchEvent_25 + EventBasedGateway_5 + IntermediateCatchEvent_5005-10 + IntermediateCatchEvent_28 + IntermediateThrowEvent_10 + IntermediateCatchEvent_11 + IntermediateCatchEvent_24 + IntermediateCatchEvent_26 + IntermediateThrowEvent_9 + Task_5005 + IntermediateThrowEvent_7 + IntermediateThrowEvent_4 + IntermediateThrowEvent_5 + IntermediateCatchEvent_16 + + task_Y7VnSQ + event_hICMqQ + task_t0lAhQ + event_OzrjzA + IntermediateCatchEvent_27 + Task_8 + TextAnnotation_2 + EndEvent_1 + event_EHOHuQ + event_pP1EGg + DataObject_2 + event_jV7dMA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + home]]> + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + SequenceFlow_22 + SequenceFlow_27 + + + + SequenceFlow_0 + SequenceFlow_21 + SequenceFlow_20 + SequenceFlow_33 + + + + + + + SequenceFlow_0 + + + + + + + + + + + + txtlastcomment]]> + + + + + + + + + true + + + + + + + + + + + + + _imginvoice.type invoice.number dbtr.number dbtr.name (invoice.currency invoice.total) ]]> + + + $workflowgroup - $workflowstatus]]> + SequenceFlow_38 + SequenceFlow_36 + SequenceFlow_24 + sequenceFlow_IKuaHQ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + + + + false + + + + SequenceFlow_38 + + + + + + + + + + + txtlastcomment]]> + + + + + + + + + _imginvoice.type invoice.number dbtr.number dbtr.name (invoice.currency invoice.total) ]]> + + + true + + + + + + + + + + + + + + + $workflowgroup - $workflowstatus]]> + SequenceFlow_33 + SequenceFlow_15 + SequenceFlow_39 + SequenceFlow_37 + SequenceFlow_22 + sequenceFlow_R5AIQA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + + + + false + + + + + SequenceFlow_20 + + + + + + + + + + + txtlastcomment]]> + + + + + + + + + true + + + + + + + + + + + + + + + _imginvoice.type invoice.number dbtr.number dbtr.name (invoice.currency invoice.total) ]]> + + + $workflowgroup - $workflowstatus]]> + SequenceFlow_52 + SequenceFlow_11 + SequenceFlow_47 + sequenceFlow_08L3LA + + + SequenceFlow_47 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Mahnwesen]]> + + + + + + + + + + + + false + + + + SequenceFlow_21 + + + + + + + + + + + + + txtlastcomment]]> + + + + + + + + + true + + + + + + + + + + + + + + _imginvoice.type invoice.number dbtr.number dbtr.name (invoice.currency invoice.total) ]]> + + + $workflowgroup - $workflowstatus]]> + SequenceFlow_27 + SequenceFlow_4 + SequenceFlow_18 + SequenceFlow_35 + SequenceFlow_34 + sequenceFlow_KEAm0Q + + + + + + + + txtlastcomment]]> + + + + + + + + + true + + + + + + + + + + + + + + + _imginvoice.type invoice.number dbtr.number dbtr.name (invoice.currency invoice.total) ]]> + + + $workflowgroup - $workflowstatus]]> + SequenceFlow_59 + SequenceFlow_31 + SequenceFlow_1 + SequenceFlow_44 + SequenceFlow_69 + + + SequenceFlow_61 + + + + SequenceFlow_39 + SequenceFlow_17 + SequenceFlow_65 + SequenceFlow_13 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + + + + false + + + + SequenceFlow_52 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + + + + false + + + + SequenceFlow_59 + + + + + + + + txtlastcomment]]> + + + + + + + + + true + + + + + + + + + + + + + _imginvoice.type invoice.number dbtr.number dbtr.name (invoice.currency invoice.total) ]]> + + + $workflowgroup - $workflowstatus]]> + SequenceFlow_3 + SequenceFlow_29 + SequenceFlow_68 + sequenceFlow_1KoKlw + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + + + + false + + + + SequenceFlow_3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + mahnlauf-de-1.0 +1000 +100 +/pages/workitems/workitem.jsf?id=dunning.ref +]]> + + + + + + + + + + + + false + + + + + + + + + + + + SequenceFlow_4 + + + DataOutput_1 + + + DataOutput_1 + + + + + SequenceFlow_18 + SequenceFlow_25 + SequenceFlow_64 + SequenceFlow_9 + + + + + + + + + + + + cdtr.name invoice.number]]> + + + + + + + + + cdtr.name +Rechnungsnummer: invoice.number +Betrag: invoice.total invoice.currency + + +]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 +2. Dunning +]]> + + + + + + + + + + + + false + + + + + + + + SequenceFlow_67 + SequenceFlow_29 + + + + + + + + + + + + + + + + cdtr.name invoice.number]]> + + + + + + + + + cdtr.name +Rechnungsnummer: invoice.number +Betrag: invoice.total invoice.currency + + +]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 +Last Dunning]]> + + + + + + + + + + + + false + + + + + + + + SequenceFlow_30 + SequenceFlow_31 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + + + + false + + + + + + + SequenceFlow_42 + SequenceFlow_8 + + + + + + + + + + SequenceFlow_42 + + + + + SequenceFlow_50 + + + + + + + + SequenceFlow_7 + + + + + + + + SequenceFlow_8 + SequenceFlow_10 + SequenceFlow_12 + + + + + + + + + invoice.saldo]]> + + + + + + SequenceFlow_10 + SequenceFlow_11 + + + + + + + + + + + + + invoice.saldo]]> + + + + + + SequenceFlow_12 + SequenceFlow_14 + + + + + + + + + + SequenceFlow_16 + + + + + + + + SequenceFlow_17 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + home]]> + + + + + + + + + + + + false + + + + + SequenceFlow_34 + SequenceFlow_15 + + + + + + SequenceFlow_25 + + + + + + + + + + + + + + + + + + + cdtr.name invoice.number]]> + + + + + + + + + cdtr.name +Rechnungsnummer: invoice.number +Betrag: invoice.total invoice.currency + + +]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + 7 +1. Dunning + +]]> + + + + + + + + + + + + false + + + + + + + + SequenceFlow_35 + SequenceFlow_37 + SequenceFlow_36 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + mahnlauf-de-1.0 +1000 +100 +/pages/workitems/workitem.jsf?id=dunning.ref +]]> + + + + + + + + + + + + false + + + + + + + + + + + + SequenceFlow_41 + + + DataOutput_3 + + + DataOutput_3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + mahnlauf-de-1.0 +1000 +100 +/pages/workitems/workitem.jsf?id=dunning.ref +]]> + + + + + + + + + + + + false + + + + + + + + + + + + + + DataOutput_4 + + + DataOutput_4 + + + sequenceFlow_ZD07Xw + + + + + + + + cdtr.name invoice.number]]> + + + + + + + + + cdtr.name +Rechnungsnummer: invoice.number +Betrag: invoice.total invoice.currency + + +]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5]]> + + + + + + + + + + + + false + + + + + + + + SequenceFlow_1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + home +]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + sequenceFlow_IKuaHQ + sequenceFlow_U0JMVg + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + home +]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + sequenceFlow_1KoKlw + sequenceFlow_KaO3rw + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + home + + invoice.reminder + @daily +]]> + + + + + + + + + + + + true + + + + + + + + + + + + + + + + + + + SequenceFlow_44 + + + + + + + + + + + + txtlastcomment]]> + + + + + + + + + true + + + + + + + + + + + + + + + _imginvoice.type invoice.number dbtr.number dbtr.name (invoice.currency invoice.total) ]]> + + + $workflowgroup - $workflowstatus]]> + SequenceFlow_49 + SequenceFlow_53 + SequenceFlow_57 + SequenceFlow_54 + sequenceFlow_nTS72A + + + + + Wollen Sie den Vorgang wirklich an Inkasso leiten? +/pages/workitems/workitem.jsf?id=debtcollection.ref]]> + + + + + + + + + SequenceFlow_40 + SequenceFlow_49 + + + DataOutput_5 + + + DataOutput_5 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + + + + false + + + + SequenceFlow_53 + + + + + + + + + + + txtlastcomment]]> + + + + + + + + + true + + + + + + + + + + + + + + + _imginvoice.type invoice.number dbtr.number dbtr.name (invoice.currency invoice.total) ]]> + + + $workflowgroup - $workflowstatus]]> + SequenceFlow_60 + SequenceFlow_61 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + + + + false + + + + + + + SequenceFlow_54 + SequenceFlow_55 + + + + SequenceFlow_55 + SequenceFlow_56 + SequenceFlow_58 + + + + + + invoice.saldo]]> + + + + + + SequenceFlow_58 + SequenceFlow_60 + + + + + + invoice.saldo]]> + + + + + + SequenceFlow_56 + SequenceFlow_57 + + + + + + + + + + + + + + + + (parseFloat(workitem['invoice.saldo'][0]) == parseFloat('0.0')) + + + + + + + + + + SequenceFlow_40 + + + + + + + + SequenceFlow_62 + + + + + + + + SequenceFlow_63 + + + + + + + + SequenceFlow_64 + + + + + + + + SequenceFlow_65 + + + + + + + + SequenceFlow_24 + SequenceFlow_50 + SequenceFlow_63 + SequenceFlow_67 + + sequenceFlow_Z2zL5g + + + + + + SequenceFlow_68 + SequenceFlow_30 + SequenceFlow_7 + SequenceFlow_62 + + sequenceFlow_i1zqtw + + + + + + SequenceFlow_69 + SequenceFlow_16 + SequenceFlow_70 + + sequenceFlow_Z0P3cQ + + + + + + SequenceFlow_70 + + + + + + + + + + + + + + + + _subject]]> + + + + + + + + + _amount (Brutto € _amount_brutto) +_description]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + home]]> + + + + + + + + + + + + false + + + + + + + SequenceFlow_9 + SequenceFlow_13 + SequenceFlow_5 + + + + + + + + + + + + + + + + + txtlastcomment]]> + + + + + + + + + true + + + + + + + + + + + + + + + _imginvoice.type invoice.number dbtr.number dbtr.name (invoice.currency invoice.total) ]]> + + + $workflowgroup - $workflowstatus]]> + SequenceFlow_5 + SequenceFlow_19 + + + SequenceFlow_19 + + + + + + + + + + + + + Trigger über ZahlungseingangsSaldoAdapter + + + + + + + Triggered by MahnlaufExecuteAdapter + +Wiedervorlage wird um 7 bzw. 5 Tage erhöht + + + + + + + + + txtlastcomment]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + _imginvoice.type invoice.number dbtr.number dbtr.name (invoice.currency invoice.total) ]]> + + + $workflowgroup - $workflowstatus]]> + SequenceFlow_38 + SequenceFlow_36 + SequenceFlow_41 + SequenceFlow_24 + sequenceFlow_U0JMVg + sequenceFlow_Z2zL5g + SequenceFlow_41 + sequenceFlow_30tT9w + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + + + + false + + + + SequenceFlow_38 + sequenceFlow_30tT9w + + + + + + + + txtlastcomment]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + _imginvoice.type invoice.number dbtr.number dbtr.name (invoice.currency invoice.total) ]]> + + + $workflowgroup - $workflowstatus]]> + SequenceFlow_3 + SequenceFlow_29 + SequenceFlow_68 + sequenceFlow_KaO3rw + sequenceFlow_i1zqtw + sequenceFlow_Giue7g + sequenceFlow_ZD07Xw + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + + + + false + + + + SequenceFlow_3 + sequenceFlow_Giue7g + + + + + + + + + + + + + + txtlastcomment]]> + + + + + + + + + true + + + + + + + + + + + + + + + _imginvoice.type invoice.number dbtr.number dbtr.name (invoice.currency invoice.total) ]]> + + + $workflowgroup - $workflowstatus]]> + sequenceFlow_no8EcQ + sequenceFlow_aXiaEA + + + + sequenceFlow_no8EcQ + + + + + + + + sequenceFlow_7ZpJaQ + + + + + + + + sequenceFlow_Z0P3cQ + + + + + + + + sequenceFlow_nTS72A + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + + + + false + + + + + + + sequenceFlow_7ZpJaQ + sequenceFlow_aXiaEA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + + + + false + + + + sequenceFlow_KEAm0Q + + + + + + + SequenceFlow_14 + sequenceFlow_R5AIQA + sequenceFlow_mw5MWg + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + + + + false + + + + + + + + sequenceFlow_08L3LA + sequenceFlow_mw5MWg + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +