erdomke / InnovatorAdmin

A tool for managing Aras Innovator installations focusing on improving the import/export experience.
http://erdomke.github.io/InnovatorAdmin/
MIT License
58 stars 42 forks source link

Error transferring identity from one db to another #161

Closed rneuber1 closed 8 years ago

rneuber1 commented 8 years ago

When transferring an identity from one database to another, the following problem occurs:

image

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Body>
        <SOAP-ENV:Fault xmlns:af="http://www.aras.com/InnovatorFault">
            <faultcode>0</faultcode>
            <faultstring><![CDATA[No items of type Identity found.]]></faultstring>
            <detail>
                <af:legacy_detail><![CDATA[No items of type Identity found.]]></af:legacy_detail>
                <af:legacy_faultstring><![CDATA[No items of type 'Identity' found using the criteria: 
<Item isNew="1" isTemp="1" type="Identity" action="get" id="4A452B1F8EF648C98CB032BB381DF8A1" select="classification" />
]]></af:legacy_faultstring>
            </detail>
        </SOAP-ENV:Fault>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

The identity does not exist in the target DB, the AML transferred by InnovatorAdmin is:

<?xml version="1.0" encoding="utf-8" ?>
<Item type="Identity" id="4A452B1F8EF648C98CB032BB381DF8A1" _keyed_name="Fxxx Lxxx" action="merge"
    _dependencies_analyzed="1">
    <is_alias>1</is_alias>
    <name>Fxxx Lxxx</name>
</Item>

which looks quite reasonable.

This is an Alias Identity. I tried it beforehand to export only the user, adding the identity via the dependency checks (which did work); but importing failed with the same message.

Any Idea?

erdomke commented 8 years ago

I am betting that the culprit is the Identity_IsClassificationValid server method. Aras tends to be bad about remembering that the merge action is a possibility. If you change line 28 of the method from

if (this.getAttribute("action") != "add" && this.getAttribute("action") != "create")

to

if (this.getAttribute("action") != "add" && this.getAttribute("action") != "create" && this.getAttribute("action") != "merge")

I think it should work. It appears that I had made the change a while back which might explain why I haven't seen the error.

rneuber1 commented 8 years ago

This exactly solved the problem. Thank you! Did you report this to Aras as a bug?

erdomke commented 8 years ago

Glad to hear it. Nope, I didn't think about reporting it at the time. Now, I don't have access to a form that I can report it through.