Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Create Department Entity:
    It passes tenant Id, master department id, hierarchy level, and its cand children list with department entity name and code. Tenant, hierarchy level and the master department are root info about the department entity. If the department entity does not contain any child, that means it is a leaf department entity it can only seek for its parent.

  2. Search Department Entity:
    It can make search requests based on any department entity attribute but can't skip tenant information, it returns the whole department entity details along with its child information. It finds all ancestry information of the current department entity.

  3. Update Department Entity:
    Update the existing department entity by searching based on department entity id and tenant id.
    Mandatory Fields to update department entity "id" and "tenant id".
    We can update any attribute in the department entity except “id” itself.
    updatable attribute list: tenantId, departmentId, code, name, hierarchy level and children.

    It does a few validation validations before updating the department entity.

    • departmentId and children can not be updated without a hierarchy level.

    • hierarchy level value should be valid for departmentId and children. If the value got mismatched then it will throw an appropriate error message.

    • It checks in the system before doing an update, that department entity id is available or not. If exist then it'll update else throw a meaningful error message.

...

In the above image, the first row contains the definition about of the data that is there in the second row. Ideally, we are considering the first row as Meta-Data of subsequent row data.

Department Hierarchy Create API - creates the hierarchy based on the Meta-Data. Creation The creation of the Department Hierarchy follows a Top to Bottom approach.

  1. Top The top or first label will be named as “Department”, with no parent (parent as null) in the create department hierarchy apiAPI. Once the hierarchy is created, in api API response will get a unique id and level as 0.

  2. For the next subsequent create hierarchy api API request, will pass the label as “Zone", with a parent as the previous request unique id. This request will also return the response with a new unique id and with level as 1(you can refer to the hierarchy level evaluation section).

  3. Similarly, for the next hierarchy, create will pass  pass labels as  “Circle”, “Division”,... and corresponding previous unique id as a parent.

  4. For this example , we will stop the hierarchy creation till labeled as  “GPWSC”.

...