How to 'sync' user-defined ca_state_province data between MDB and Service Catalog user interface

Document ID : KB000058045
Last Modified Date : 28/01/2019
Show Technical Document Details
Introduction:

Description:

When a local 'state' has been added to the MDB, it needs to be 'synched' with catalog in an .xml file.

Solution:

How to 'sync' user-defined ca_state_province data between MDB and Service Catalog-UI.

When a local 'state' has been added to the MDB, it needs to be 'synched' with catalog in an .xml file.

Current situation:

In sc/admin/users, edit a user profile, the 'state' data is being updated as 'empty' each time you edit the user profile and click OK.

Even when no change is being made in that user profile.

These tables ca_location and ca_state_province are involved in SC-UI/admin/user/search>edit a user profile >> user-location&region&state data.

And as it appears, for the 'state' data also an .xml file is in place.

The .xml holds out of the box state data as shown in the ca_state_province table.

This can be verified in the following way:

  1. Add/insert a new 'state' to the mdb.
     
  2. Set the location to point to that new state
     
  3. Edit the user profile and set it to the location-with-the-new-state
     
  4. Verify the 'state' data is set to 'empty' after clicking OK on the user profile
     
  5. Resolved by adding the user-defined-state to the xml file.

These tables ca_location and ca_state_province are involved in SC-UI/admin/ussre/search>edit a user profile >> user-location&region&state data.

There's an internal function in Catalog that checks if the state is 'out of the box' or 'user-defined'.

If the state is ootb then it will be displayed properly.

If user-defined then the state shows as 'Empty' in the user profile(sc/admin/users/search>edit a user).

To reproduce/test this:

  1. Add/insert a new 'state' to the mdb.

    INSERT INTO ca_state_province
    (id,inactive,symbol,creation_user,creation_date,last_update_user,last_update_date,version_number,description,exclude_registration,delete_time,tenant)
    VALUES
    (1000028,0,'CASTATE',NULL,NULL,NULL,NULL,0,'CATESTSTATE',NULL,NULL,NULL)
     
  2. Set the location to point to that new state

    update ca_location set state = 1000028, county = 'CASTATE Area'

    select l.location_uuid, l.location_name, l.county, l.state from ca_location l

    0x19892FFFE6B94BB2929D2D93D4B5B690,LocationA,CASTATE Area,1000028
     
  3. Edit the user profile and set it to the location-with-the-new-state

    SC/admin/users/search:
    Name: User ID Telephone City State
    last2, first2 user2 0306082728 Utrecht CATESTSTATE (as in ca_state_province)
    SC/admin/users/edit the above user 'user2':
    US State/Canadian Province: 'Empty' >> should be as in ca_state_province
    County/Province/Region: 'CASTATE Area' (as in ca_location)
     
  4. Verify the 'state' data is set to 'empty' after clicking OK on the user profile

    After you click OK and re-edit the user, the State info is gone('Empty').
     
  5. Resolved by adding the user-defined-state to the xml file.

The state info is not only stored in the MDB(ca_state_province).

But also in a separate .xml file(ca_country_state.xml).

And these two (MDB and file) need to be 'in sync'.

The solution for this is the following:

  1. Stop the 'ca service view' service
     
  2. CD into C:\Program Files\CA\Service Catalog\view\webapps\usm\locale\icusen
     
  3. Edit(notepad) ca_country_state.xml
     
  4. Add the following lines to the bottom of this file:

    <st68>
    <id>1000028</id>
    <name>CATESTSTATE</name>
    </st68>
     
  5. Save the file
     
  6. Start the 'ca service view' service
     
  7. Check: SC/admin/users/search>edit the above user 'user2'
Instructions:
Please Update This Required Field