Clarity: Required attribute on Department or Location Object prevents Entity creation if OBS definition already has OBS units

Document ID : KB000050206
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

In the Admin Tool - OBS definitions can be created and units can be created and are not considered an instance of the Department or Location Object until the OBS definition is associated with an Entity definition. Therefore, when the OBS definition is used in the creation of an Entity, the application is attempting to convert the existing OBS Unit records into Department or Location records and because the Department or Location Object has a required attribute defined, the existing OBS unit does not have a value in the required attribute and the application generates the internal server error, preventing the Entity from being created.

Steps to Reproduce:

  1. Create a required field on the Department Object (id=myrequireddeptattr)

    Do not set a default value

    Figure 1

  2. Create a Department OBS definition

    Add one unit to this new OBS definition

    Figure 1

  3. Create a Location OBS definition

    Add one unit to this new OBS definition

    Figure 1

  4. Create a new Entity using the new Department and Location OBS definitions

    Figure 1

    Expected Result: Entity should be created without error or a proper error message should be displayed
    Actual Result: Internal Server Error prevents the Entity from being created

    ERROR 2011-09-20 09:34:02,667 [http-1211-6] admin.PersistEntityService (admin:5300261__-52639F33_1327384293D_-7FEE:revmgr.saveEntity) processRequest Exception com.niku.union.odf.exception.ODFValidationException: Validation failure. Attribute: myrequireddeptattr. Cause: required

  5. Admin Tool > Studio: Department Object - change the attribute so it is no longer required

  6. Create a required field on the Location Object (id=myrequiredlocattr)

    Do not set a default value

    Figure 1

  7. Create a new Entity using the new Department and Location OBS definitions

    Figure 1

Expected Result: Entity should be created without error or a proper error message should be displayed

Actual Result: Internal Server Error prevents the Entity from being created

ERROR 2011-09-20 10:03:56,331 [http-1211-6] admin.PersistEntityService (admin:5300334__-52639F33_1327384293D_-7FEC:revmgr.saveEntity) processRequest Exception com.niku.union.odf.exception.ODFValidationException: Validation failure. Attribute: myrequiredlocattr. Cause: required

Solution:

WORKAROUND:
In the Admin Tool > Studio > Department or Location Object, change the attribute so that it is no longer required until after the OBS definition is linked
OR
In the Admin Tool > OBS, remove all the existing OBS Units for the OBS definition that will be used as the Department or Location OBS on a new Entity definition

STATUS/RESOLUTION:
This issue has been documented as CLRT-64479 and is assigned to development for review. If you are experiencing this problem and the workaround above

Keywords: CLARITYKB, CLRT-64479, clarity12open.