Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Implement Cleaning Logic on Reserve Task #516

Conversation

fabiodmota
Copy link
Contributor

@fabiodmota fabiodmota commented Oct 11, 2023

Description

Request new cleaning tasks for step "GenericCleaning" from Orchestrator
Create Legal Entity, Site and Address representations from the given generic business partner data
Create BPN request identifiers where missing
Post dummy cleaning results to Orchestrator for step "GenericCleaning"
Create configurable scheduling for performing these on regular time interval

#433

Pre-review checks

Please ensure to do as many of the following checks as possible, before asking for committer review:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logic diagram can be seen on this #433 (comment)

@fabiodmota fabiodmota requested a review from nicoprow October 13, 2023 11:33
@fabiodmota fabiodmota force-pushed the feat/cleaning_service/Create_cleaning_result branch from 4270e8e to e6a1b35 Compare October 16, 2023 11:31
Copy link
Contributor

@alexsilva-CGI alexsilva-CGI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Logic for cleaning seems also good.

@martinfkaeser
Copy link
Contributor

If the Pool validates a BP (#518) as discussed today, the logic when to create an address needs to be changed.
There we said a cleaning service shouldn't send redundant data. So it should only set an address if it is an additional address. So legalAddress, siteMainAddress and (additional) address shouldn't share a BPN-A-Ref (no matter if real BPN or BpnRequestId).

Did I get that right? @nicoprow @rainer-exxcellent @fabiodmota

@fabiodmota fabiodmota force-pushed the feat/cleaning_service/Create_cleaning_result branch from e6a1b35 to 7e65600 Compare October 17, 2023 21:17
@fabiodmota
Copy link
Contributor Author

If the Pool validates a BP (#518) as discussed today, the logic when to create an address needs to be changed. There we said a cleaning service shouldn't send redundant data. So it should only set an address if it is an additional address. So legalAddress, siteMainAddress and (additional) address shouldn't share a BPN-A-Ref (no matter if real BPN or BpnRequestId).

Did I get that right? @nicoprow @rainer-exxcellent @fabiodmota

So based on that description i changed the code on bpdm-cleaning-service-dummy/src/main/kotlin/org/eclipse/tractusx/bpdm/cleaning/service/CleaningServiceDummy.kt the addres will only be passed based on the address type

  private fun shouldCreateAddress(
        addressType: AddressType?,
        addressPartner: LogisticAddressDto
    ): LogisticAddressDto? {
        val addressDto = if (addressType == AddressType.AdditionalAddress) {
            addressPartner
        } else {
            null
        }
        return addressDto
    }

is this the correct logic ?

@fabiodmota fabiodmota force-pushed the feat/cleaning_service/Create_cleaning_result branch 2 times, most recently from 159be5a to bb57726 Compare October 18, 2023 09:18
@fabiodmota fabiodmota force-pushed the feat/cleaning_service/Create_cleaning_result branch from bb57726 to 96bc9a7 Compare October 18, 2023 10:12
@nicoprow nicoprow merged commit 599e98c into eclipse-tractusx:main Oct 18, 2023
7 checks passed
@nicoprow nicoprow deleted the feat/cleaning_service/Create_cleaning_result branch October 18, 2023 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants