it-at-m / digiwf-core

central workflow automation and integration platform based on the free process framework Camunda.
MIT License
19 stars 7 forks source link

Default Kafka topics for all integrations #958

Closed simonhir closed 7 months ago

simonhir commented 10 months ago

Currently the element templates for cosys, dms and other integrations require to add the Kafka topic for outgoing messages. As these are different for all environments (topic suffix) this requires the process developers to define different configs for all envs and also they need to know what exact topic is the correct one for each of the integrations.

Goal

Business analysts should not know anything about the technical integration, but should rather select the business use case.

Describe solution

Migrations path

  1. provide new element template and motivate process designers to switch over
  2. if necessary, coordinate process migration for long-running process instances
  3. after a certain period of time, e.g. 1 month, switch to the new Kafka in the maintenance window

Acceptance criteria

darenegade commented 9 months ago

@dominikhorn93 @lmoesle Habt ihr eine Idee, wie man das gut lösen kann?

lmoesle commented 9 months ago

Wir könnten auch die DIGIWF_ENV Property auslesen und bei Prozessstart als Prozessvariable setzen. Dann könnten wir in den Element Templates ein default Topic angeben (dwf-email-${digiwf-env}). Der Vorteil wäre, dass die Prozessentwickler die Topics nicht mehr selbst setzen müssen und die Variable bei Bedarf auch für andere Funktionen nutzen könnten.

Wenn man das so machen würde, dann müsste man:

simonhir commented 9 months ago

@lmoesle das Problem ist dann aber, dass wir damit die Topics nicht mehr einfach ändern können, weil ja dann jeder neu das Template auswählen müsste. Für den Schwenk auf das neue Cluster brauchen wir das aber. Hab das gerade mal noch als Akzeptanz-Kriterium hinzugefügt hatte davor gefehlt.

lmoesle commented 9 months ago

Ein Feature unserer Platform ist es ja auch, dass jeder Prozessentwickler seine eigenen Integrationen anbinden kann. Dafür muss nur das Streaming Template mit dem richtigen Kafka Topic und Message Body aufgerufen.

@simonhir Die Variante 2 würde ich da dann eher nicht machen und Variante 1 bevorzugen. In diesem Schritt könnte man dann gleich den app_integration_name an die spring.cloud.function.definition der jeweiligen Integration anpassen. Aktuell sind die Namings da auch alle unterschiedlich. Wenn wir das angleichen, könnten wir den app_integration_name als type Header setzen und aus der Config des Connectors das passende Topic auswählen.

LenaB34 commented 9 months ago

Hey team! Please add your planning poker estimate with Zenhub @darenegade @simonhir @zambrovski @lmoesle @dominikhorn93 @lehju @StephanStrehlerCGI

lmoesle commented 8 months ago

For https://github.com/it-at-m/digiwf-core/issues/874 and https://github.com/it-at-m/digiwf-core/issues/734 it would be a good idea to also add a header for the starting process key

@darenegade, @simonhir Aktuell ist es nicht ohne weiteres möglich den ProcessDefinitionKey an den Connector bzw. auch an die Integrationen weiterzugeben. Deswegen habe ich damals das Ticket #734 aufgemacht. Soll ich #734 dann gleich umsetzen? Also, dass der ProcessDefinitionKey beim Prozessstart als Prozessvariable gesetzt wird und dadurch an den Connector aufruf weitergegeben wird?

simonhir commented 8 months ago

Wir hatten das damals aufgenommen, weil wir dachten, dass das zeitlich weniger Aufwand bedeutet, da man da ja die gleichen Sachen anpassen müsste. Aus meiner Sicht, müsste das nur spätestens im nächsten Sprint angepasst werden, weil das für die Paula-Integration benötigt wird. Also je nachdem ob du das auch so siehst, dass das einfacher ist das gleich zu machen, würde ich sagen macht das schon Sinn.

lmoesle commented 8 months ago

Passt für mich, dann zieh ich #734 auch noch mit rein in den Sprint und setzte das im selben Branch um 👍🏻

lmoesle commented 8 months ago

Ich habe das Ticket auf Impediment verschoben, bis das Vorgehen bei #734 geklärt ist