eclipse-tractusx / bpdm

bpdm
Apache License 2.0
6 stars 15 forks source link

feat(bpdm-gate-pool): MVP hierarchy data model adjustment #1027

Open HeyHardy opened 3 months ago

HeyHardy commented 3 months ago

User Story: Hierarchy Management for BPNLs in Catena-X Portal (Updated Version)

Prerequisites (pre-MVP setup):

Out of Scope:

As a Company Admin,
I want to manage hierarchies for Business Partner Number Legal Entities (BPNLs) in the Catena-X Portal,
so that I can effectively organize and control the relationships between different BPNLs by using the existing UI for own company data in the portal.

Acceptance Criteria:

  1. CRUD Operations:

    • Create: Ability to create a new business partner relationship with hierarchy type Managed in Portal only in the Portal Gate. Future types maybe available in the pool as well
    • Read: Display all hierarchy types, including Managed in Portal with their details.
    • Update: Allow editing of existing hierarchies.
  2. Data Modeling and Integration:

    • Add a new relationship object for Hierarchy.
    • Set Type Managed in Portal - only valid for BPNL.
    • Ensure that each BPNL can support multiple hierarchy types.
  3. Functional Requirements for the Pool and Gate Datamodel:

    • For MVP sequence for CRUD of hierarchies: Portal UI ==> Portal Gate.
    • Initial hierarchy type: Managed in Portal.
    • Future hierarchy types: Is Registered Alternative For, Is Replaced By.
    • Support for multiple hierarchy types for each BPNL.
    • Admin roles: Full access to create and edit hierarchies.
    • Standard users: View-only access to hierarchies.

Open Questions:

  1. Linking of Two BPNLs:
    • How can we ensure that the linkage of two BPNLs exists if the information is not present in the pool?
    • Is a filter required to ensure that the information is correctly linked?
    • In which component will the linkage function be implemented (e.g., in the orchestrator)?
    • For future changes, the linking between child and parent entities needs to be considered. Status changes between these entities must be discussed and implemented accordingly.
    • How will the child be correctly classified in relation to the main (parent) company?
Sebastian-Wurm commented 1 month ago

Source IsManagedBy Target, so target is VW and source is Audi for example.

image

nicoprow commented 4 days ago

@HeyHardy I would like to sharpen the issue here in this repository. Open questions and more overall conceptional ideas should be kept in the attached sig-release parent issue. I would like to sharpen the issue description to the following:

Use case Description

As a Company Admin, I want to manage hierarchies for Business Partner Number Legal Entities (BPNLs) in the Catena-X Portal, so that I can effectively organize and control the relationships between different BPNLs by using the existing UI for own company data in the portal.

Acceptance Criteria

All acceptance criteria refer to the BPDM Gate component. Other BPDM components are not affected as the business partner relationship will not be shared for now.

  1. Data Modeling and Integration:

    • [ ] Create a new business partner relationship resource representing the hierarchy (see chapter Relationship Abstract Data Model).
    • [ ] Support relationship type 'IsManagedBy'.
    • [ ] Ensure that each BPNL can support multiple hierarchy types.
  2. CRUD Operations:

    • [ ] Create: Ability to create a new business partner relationship with hierarchy type IsManagedBy
    • [ ] Read: Display all hierarchy types, including Managed in Portal with their details.
    • [ ] Update: Allow editing of existing hierarchies.
  3. Extended Functional Requirements

    • [ ] Adjust authorization logic
    • [ ] Only able to define relationship for own Legal Entity (identified by owner BPNL) as source and other owned Legal Entity as target
    • [ ] No duplicate relationships from same source to same type

Relationship Abstract Data Model

---
title: Business Partner Relationship
---
classDiagram
    BusinessPartnerRelationship "*" --> "1" BusinessPartner: Source
    BusinessPartnerRelationship "*" --> "1" BusinessPartner: Target
    BusinessPartnerRelationship "*" --> "1" BusinessPartnerRelationshipType: Type

    class BusinessPartner["Business Partner"]{
    }
    class BusinessPartnerRelationship["Business Partner Relationship"]{
        String ExternalId
        Timestamp CreatedAt
        Timestamp UpdatedAt 
    }
    class BusinessPartnerRelationshipType["Business Partner Relationship Type"]{
        <<Enumeration>>
        IsManagedBy
    }

Authorization

Permissions

  1. read_input_relationship
  2. write_input_relationship

BPDM Roles

Admin Input Manager Input Consumer
  • read_input_relationship
  • write_input_relationship
    • read_input_relationship
    • write_input_relationship
    • read_input_relationship

    Working Assumptions:

    Out of Scope:

    Open Questions

    @HeyHardy @Sebastian-Wurm Please give me feedback if you are ok with this summary so I can update the top comment of this issue for clarity