Search This Blog

Showing posts with label UserEO. Show all posts
Showing posts with label UserEO. Show all posts

Thursday, December 10, 2015

Hand editing the User.xml file

Sometimes the User.xml file is corrupted or there is a missing field.  You will see the field in the database, in the User Entity object in the System Administration Webapp (with a sandbox open), maybe even in the metadata/iam-features-requestactions/model-data/ModifyUserDataset.xml and CreateUserDataset.xml files.  Just missing from the User.xml file.

One way to correct this issue is to hand edit the file.  When doing this, use Notepad++ so you can see everything and make sure that the file stays valid (or you can use XMLSpy).

Open the file and search for the UDF section:

find the <entity-attributes> tag.  Inside this tag are a collection of <attribute name= tags.

You should (in unix) grep for 'attribute name=' and check to make sure you don't have multiple missing entities, but for this example just concentrate on the one.

Copy any <attribute tag section, all the way to the </attribute> tag, and paste it below.  You may have good luck copying something that looks similar to the tag that is missing.

Then do the following:
Change the name in the initial tag name="XXX" to the new field name
Change the name where it is referenced below the <name>scim</name> tag.
Change the value below the <name>max-size</name> tag to the field width.  Check the database for this value.

Next go to the <target-fields> tag and find a UDF.  Copy and paste a similar <field name= tag, then edit as follows:
Change the name of the initial tag name="xxx" to the new database table field name.  It should start with usr_udf.

Next find the <attribute-maps> tag and find an <attribute-map> tag to copy.  Copy and then:
Change the name of the entity-attribute to match.
Change the name of the target-field to match.

Next find the <metadata-attachment> tag.  Below this are all of your UDFs and several of the OOTB fields.  You need to make a spreadsheet of all of the <name> attributes and the the <value> attributes for those entries with category of categories.Basic User Information.
Compile this list and then sort by name.  Name is a number.  Look for a gap.  If there is a gap, I suggest your new entry should fill the gap.  If there is no gap, add one to the last value and use it.  You will copy a block from the Basic User Information section and rename the value and use the number for name.

Save the file.  Import it using the procedure I have outlined in my blog - search on importMetadata

Tuesday, April 21, 2015

What's in that Sandbox (UDF)

Opening up a sandbox that was exported after creating a UDF, you should find:

mdssys
persdef
xliffBundles

folders.

In the mdssys folder you will find:

sandbox/active_mdsSandboxMetadata.xml which contains the basic info on the sandbox, including the name you gave it when you created it, and the date and time, which you should have put into the name of the sandbox, like this:

Client_yyyyMMdd_HHmm

In the persdef folder you will find:

oracle/iam/ui/common/model/user/entity/mdssys/cust/site/site/UserEO.xml.xml which contains the definition of the UserEO object.  Grep on "Attribute Name" to get a list of all of the UserEO elements in the sandbox.  Your new ones should be there.

oracle/iam/ui/common/model/user/view/mdssys/cust/site/site/UserVO.xml.xml  which contains the definition of the UserVO object.  Grep on "ViewAttribute Name" to get a list of all of the UserVO elements in the sandbox.  Your new ones should be there.

In the xliffBundles folder you will find oracle/iam/ui/runtime/BizEditorBundle.xlf which contains the ADF mappings for all of the UI components.  Grep on user.entity.userEO to see all of the UserEO elements.  Your new objects should be there.