Skip to content

Commit

Permalink
# This is a combination of 8 commits.
Browse files Browse the repository at this point in the history
# This is the 1st commit message:

feat: Adding extend error states

# This is the commit message eclipse-tractusx#2:

feat: Adding logic to TaskResolutionService handling conditions

# This is the commit message eclipse-tractusx#3:

feat(bpdm-gate): Extend error states

# This is the commit message eclipse-tractusx#4:

feat(bpdm-gate): Extend error code with description

# This is the commit message eclipse-tractusx#5:

feat(bpdm-gate): Extend error code with description. Extend error code to DB schema

# This is the commit message eclipse-tractusx#6:

Revert "feat(bpdm-gate): Extend error code with description. Extend error code to DB schema"

This reverts commit ff2863d.

# This is the commit message eclipse-tractusx#7:

feat(bpdm-gate): Extend error code with description. Extend error code to DB schema

# This is the commit message eclipse-tractusx#8:

feat: Adding extend error states
  • Loading branch information
kunyao-cofinity-x committed Jul 18, 2024
1 parent bedcf07 commit ac3cc8a
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

package org.eclipse.tractusx.bpdm.gate.api.exception

import io.swagger.v3.oas.annotations.media.Schema

/**
* For every combination of possible errors a separate enum class is defined extending this marker interface.
* We need separate enum classes in order to get the correct error codes for each endpoint in the Swagger schema.
Expand All @@ -30,6 +32,24 @@ enum class BusinessPartnerSharingError : ErrorCode {
SharingTimeout,
BpnNotInPool,
MissingTaskID,

@Schema(description = "The provided record contains natural person information. ")
NaturalPersonError,

@Schema(description = "The provided record can not be matched to a legal entity or an address.")
BpnErrorNotFound,

@Schema(description = "The provided record can not link to a clear legal entity.")
BpnErrorTooManyOptions,

@Schema(description = "The provided record does not fulfill mandatory validation rules. ")
MandatoryFieldValidationFailed,

@Schema(description = "The provided record is part of a country that is not allowed to be processed by the GR process (example: Brazil).")
BlacklistCountryPresent,

@Schema(description = "The provided record contains unalloyed special characters. ")
UnknownSpecialCharacters
}

enum class ChangeLogOutputError : ErrorCode {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,18 @@ enum class SharingStateType {
Success,
Error,
Initial,
Ready
Ready,
NaturalPersonError,
BpnErrorMissingParent,
BpnErrorNotFound,
BpnErrorTooManyOptions,
MandatoryFieldValidationFailed,
BlacklistCountryPresent,
InvalidSpecialCharacters,
MandatoryFieldMissing,
BpnlChanged,
UnclearEntity,
UnknownSpecialCharacters,
MatchBasedOnProvidedNameOrIdentifier,
None
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,18 @@ package org.eclipse.tractusx.orchestrator.api.model
enum class ResultState {
Pending,
Success,
Error
Error,
NaturalPersonError,
BpnErrorMissingParent,
BpnErrorNotFound,
BpnErrorTooManyOptions,
MandatoryFieldValidationFailed,
BlacklistCountryPresent,
InvalidSpecialCharacters,
MandatoryFieldMissing,
BpnlChanged,
UnclearEntity,
UnknownSpecialCharacters,
MatchBasedOnProvidedNameOrIdentifier,
None
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,27 @@

package org.eclipse.tractusx.orchestrator.api.model

import io.swagger.v3.oas.annotations.media.Schema

enum class TaskErrorType {
Timeout,
Unspecified
Unspecified,

@Schema(description = "The provided record contains natural person information. ")
NaturalPersonError,

@Schema(description = "The provided record can not be matched to a legal entity or an address.")
BpnErrorNotFound,

@Schema(description = "The provided record can not link to a clear legal entity.")
BpnErrorTooManyOptions,

@Schema(description = "The provided record does not fulfill mandatory validation rules. ")
MandatoryFieldValidationFailed,

@Schema(description = "The provided record is part of a country that is not allowed to be processed by the GR process (example: Brazil).")
BlacklistCountryPresent,

@Schema(description = "The provided record contains unalloyed special characters. ")
UnknownSpecialCharacters
}
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ create table golden_record_tasks (
create table task_errors (
task_id bigint not null,
description varchar(255) not null,
type varchar(255) not null check (type in ('Timeout', 'Unspecified'))
type varchar(255) not null check (type in ('Timeout', 'Unspecified', 'NaturalPersonError', 'BpnErrorNotFound', 'BpnErrorTooManyOptions','MandatoryFieldValidationFailed', 'BlacklistCountryPresent', 'UnknownSpecialCharacters'))
);

create table gate_records (
Expand Down

0 comments on commit ac3cc8a

Please sign in to comment.