Clarity

Expand all | Collapse all

Department XOG

Jump to Best Answer
  • 1.  Department XOG

    Posted 06-06-2014 09:33 AM

    When the Department OBS is associated with the entity Clarity prohibits the use of the obs_write.xml template to write Department OBS units to the system. However, it is still possible to load departments using the department_write.xml template.

    My question is about the logic of the department_write.xml template. In the user interface, each department has a parent code as follows:

    But there is no parent code in the XML. The parent child relationship of the units is dependent on the order and spacing of the departments in the XML.


     

    A few questions: Is my understanding of this correct? Does anyone have experience or an example of transforming Department source data to load this hierarchy with the correct parent/child relationships?



  • 2.  RE: Department XOG

    Posted 06-09-2014 12:17 PM

    Daniel - 

    According to the XOG Developer Guide (v13.3 - and I'm sure it's similar or same for other versions), You can use the parent_department_code in your child department.

    parent_department_code

    Defines the code for parent department.

    Table and Column: parent_department_id

    Type: String

     

    Hope that helps!

    - Nathan

     



  • 3.  RE: Department XOG

    Posted 06-09-2014 03:46 PM

    The r8.1.1. integration says

     

     

    while the version in the sample department_write.xml is version="8.0.0.3895 (in v13.3)

     

    Too bad there is not parent department in any of the I have lookedat.

     

    Martti K.



  • 4.  RE: Department XOG

    Posted 06-09-2014 03:55 PM

    The thing that concerns me is that when I read out the department hierachy out from the v13.2 sandbox I just get the units not their hierarchy. That means you cannot get the hierarchy without manual action when XOG in that to another environment.

     

    Just wondering again...is that as desinged?

     

    Martti K.



  • 5.  RE: Department XOG

    Posted 06-09-2014 04:05 PM
    another_martink:

    The thing that concerns me is that when I read out the department hierachy out from the v13.2 sandbox I just get the units not their hierarchy. That means you cannot get the hierarchy without manual action when XOG in that to another environment.

     

    Just wondering again...is that as desinged?

     

    Martti K.

     

    If you perform a XOG read on some departments with parent/child relationships it doesn't use the department code, but it does maintain the hierarchy via the order it appears in the XML and the spacing.

    When I attempt to add the parent_department_code to the XML manually the following error is generated:

    <Description>[Error] :0:0: unexpected attribute "parent_department_code" Invalid attribute in input document. Please remove all instances of attribute from document elements and try again. [Element : Department, Attribute : parent_department_code ].</Description><Exception type="java.lang.Exception">Invalid xml data</Exception>

    I think this means either the documentation is wrong or it isn't working as designed.


     



  • 6.  RE: Department XOG

    Posted 06-09-2014 04:11 PM

    Sounds like it is not working or the document is wrong.

    If the hierarchy is in the order of the units what determines if the next unit is at the same level, lower or hight level.

     

    Martti K.



  • 7.  RE: Department XOG
    Best Answer

    Posted 06-09-2014 04:34 PM
    Here is the response from support:

    You can't use the attribute "parent_department_code" in XOG as it is no longer available in the XSD. This attribute "parent_department_code" was indeed available via the XSD in earlier versions of Clarity. However, it was removed it seems in the 8.1 release as a result of defect# CLRT-11769 (Department XOG wipes out the parent department during update of departments). Here is why: The code previously inferred the "parent" department based on the structure, not on the attribute. So therefore, the expectation was wrong that one could have a department element and just change the parent attribute code. However, the presence of that attribute was causing confusion, so the solution was to drop the parent_department_code attribute from the xsd (it had an incorrect length of40 anyways) and change all the files that refer to the attribute.


  • 8.  RE: Department XOG

    Posted 06-10-2014 08:30 AM

    Thanks for posting the response from Support. It seems CA needs to udate their documentation then, as it still shows in documentation associated with Clarity v13.3.

    Given the screenshot you originally showed then, the column still exists on the table, yes?  So then there is no (supported) method to programatically update the data. It seems then you have two options:

    1. Ask CA for a method

    2. Write a process, stored procedure, etc.. to do your updates.



  • 9.  RE: Department XOG

    Posted 06-10-2014 03:44 PM

    There is a community for feedback. See

    https://communities.ca.com/web/ca-community-feedback/message-board/-/message_boards/message/120351378?p_p_auth=xsbCL3Hx&#p_19

     

    These are the fields in v13.3

    id
    departcode
    description
    shortdesc
    departidentifier
    default_reviewer
    alt_default_reviewer
    obs_unit_id
    parent_department_id
    department_manager_id
    brm_id
    entity_id
    delegate_inv_appr
    created_date
    created_by
    last_updated_date
    last_updated_by

     

     

    Martti K.