Page 1 of 1

Import rule definition using API loses description

Posted: Wed Nov 29, 2017 9:01 am
by boxtoby
I wonder if anyone can help me with some apparently inconsistent behaviour when importing a data rule definition using the api?

Here's the api command I'm using:

CreateCmd=`$IAAdminPath/IAAdmin.sh -v -user $user -password $password -url $url -create -projectContent $InputFolder/$ruleName -projectName "$Project"`

It successfully creates the rule definition but, sometimes the description is not imported.

Here's an xml file where the description is imported:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<iaapi:Project xmlns:iaapi="http://www.ibm.com/investigate/api/iaapi" name="RETAIL CRMB">
  <DataRuleDefinitions>
    <DataRuleDefinition folder="All" name="CRMB_DRD_HHP99">
      <description>Main Subsidiary Group and generic status</description>
      <LongDescription>Main Subsidiary Group and generic status</LongDescription>
      <Variables>
        <Variable dataType="any" name="src_fld_01"/>
        <Variable dataType="any" name="src_fld_01_ltrl"/>
        <Variable dataType="any" name="src_fld_02"/>
        <Variable dataType="any" name="src_fld_02_ltrl"/>
      </Variables>
      <expression>src_fld_01 = src_fld_01_ltrl OR  
src_fld_02 = src_fld_02_ltrl</expression>
    </DataRuleDefinition>
  </DataRuleDefinitions>
</iaapi:Project>
and here's an xml file where the description is not imported:

(Main Subsidiary Group and COMMERCIAL GRP not imported)

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<iaapi:Project xmlns:iaapi="http://www.ibm.com/investigate/api/iaapi" name="RETAIL CRMB">
  <DataRuleDefinitions>
    <DataRuleDefinition folder="All" name="CRMB_DRD_HHP02">
      <description>Main Subsidiary Group and COMMERCIAL GRP</description>
      <LongDescription>Main Subsidiary Group and COMMERCIAL GRP</LongDescription>
      <Variables>
        <Variable dataType="any" name="src_fld_01"/>
        <Variable dataType="any" name="src_fld_01_ltrl"/>
        <Variable dataType="any" name="src_fld_02"/>
        <Variable dataType="any" name="src_fld_02_ltrl"/>
      </Variables>
      <expression>src_fld_01 = src_fld_01_ltrl and  
src_fld_02 = src_fld_02_ltrl</expression>
    </DataRuleDefinition>
  </DataRuleDefinitions>
</iaapi:Project>
Is there a difference between the files that I can't see?

Look forward to hearing from you.

Many thanks,
Bob.

Posted: Wed Nov 29, 2017 9:03 am
by boxtoby
Sorry, the second xml piece should have been titled:

and here's an xml file where the description is NOT imported:

(Main Subsidiary Group and COMMERCIAL GRP not imported)

etc
etc

Posted: Wed Nov 29, 2017 10:07 am
by chulett
Bob, I went back and made the noted change for you while I was in there adding the code tags... and just as an FYI you can always edit your own posted messages.

Posted: Thu Nov 30, 2017 5:03 am
by boxtoby
Many thanks. :D