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

Improve Errorhandling CoSys #40

Closed darenegade closed 1 year ago

darenegade commented 1 year ago

Is your feature request related to a problem? Please describe. If an error occourse the consumer (process) doesn't know why a document couldn't be created. The respone only delivers an status flag with true (document created) or false (document not created)

Describe the solution you'd like The integration needs to distinguish between business errors and technical errors Business errors needs to be delivered within the normal response Technical errors needs to be delivered within an special error response

Describe alternatives you've considered The error messages (technical and business) can be delivered within the same message, but the process needs to know if the job was successfull or not. On technical errors the job should stop and wait for retry (admin function)

Additional context

https://github.com/it-at-m/digiwf-core/blob/dev/digiwf-integrations/digiwf-cosys-integration/digiwf-cosys-integration-core/src/main/java/io/muenchendigital/digiwf/integration/cosys/api/MessageProcessor.java#L36-L41

https://github.com/it-at-m/digiwf-core/blob/dev/digiwf-integrations/digiwf-cosys-integration/digiwf-cosys-integration-core/src/main/java/io/muenchendigital/digiwf/integration/cosys/domain/service/CosysService.java#L70-L77

darenegade commented 1 year ago

See: https://github.com/it-at-m/digiwf-oce-cosmos-integration/blob/dev/digiwf-oce-cosmos-integration/src/main/java/io/muenchendigital/digiwf/ocecosmos/integration/repository/JobRepository.java#L97

darenegade commented 1 year ago

Use: https://github.com/it-at-m/digiwf-core/blob/dev/digiwf-libs/digiwf-spring-cloudstream-utils/digiwf-spring-cloudstream-utils-core/src/main/java/io/muenchendigital/digiwf/spring/cloudstream/utils/api/streaming/incident/service/IncidentService.java#L31

dominikhorn93 commented 1 year ago

@darenegade you can move this issue to the digiwf-core repository. The CoSys Integration is now developed in that repository.

darenegade commented 1 year ago

Use Streaming Tempate V2

darenegade commented 1 year ago

Use new Envs in Operations-Repo (Spring Cloud Functions and Topics) tu use incident/bpmn-error

martind260 commented 1 year ago

@darenegade How can the artifact recognize business errors? Are there special http status codes?

darenegade commented 1 year ago

@martind260

business errors = bpmn errors

technical errors = incidents

darenegade commented 1 year ago

@martind260 What are business error specifically for cosys depends on the cosys API. I'm not deep enough into this api to provide this information

darenegade commented 1 year ago

@martind260 We can start with the obvious. Most errors should be technical (5xx, 401, 403) i guess. I don't know if the return body provides that information in some way

darenegade commented 1 year ago

If u don't find any obvious business errors, we can go on with everything that goes into status=false ends up in incidents and business errors can be provided in a future enhancement with more info about the API

dominikhorn93 commented 1 year ago

@darenegade @martind260 we should wait about 2 days before starting with this issue. The WebClient and JSON task will cause a lot of merge conflicts.

martind260 commented 1 year ago

@darenegade @dominikhorn93 TOO LATE!