Import Rule Error

I am having difficulty with an InsertAction rule I created to copy an item
from a CRF in the same event to another crf. When trying to import, I get this error message:

"Your XML is not well formed, and does not comply with the Rules schema.
Check it and try again. It returned the message: Content is not allowed in
prolog."

 The content of my rule file
is (It was edited in Notepad and Saved AS UNICODE):


<RuleImport>
<RuleAssignment>
 <Target
Context="OC_RULES_V1">SE_VISIT1.F_NEWIMAGEENTR_13_5005.IG_NEWIM_SITEIMAGES.I_NEWIM_IMAGENO</Target>
 <RuleRef
OID="R_GETImageNo">
        <InsertAction
IfExpressionEvaluates="true">
  <Run AdministrativeDataEntry="true"
InitialDataEntry="true" DoubleDataEntry="true" ImportDataEntry="false"
Batch="false"/>
  <DestinationProperty
OID="F_HAWKGRADER_13.IG_HAWK_UNGROUPED.I_HAWK_IMAGENO_5831">
               
<ValueExpression
Context="OC_RULES_V1"></ValueExpression>
  </DestinationProperty>
        
</InsertAction>
       
</RuleRef>
</RuleAssignment>
 <RuleDef OID="R_GETImageNo"
Name="ImageNumber">
                <Description>Insert the
ImageNo</Description>
               
<Expression>(I_NEWIM_IMAGENO ne "") and (I_HAWK_IMAGENO_5831 eq
"")</Expression>
</RuleDef>
</RuleImport>

Comments

  • lkeitalkeita Posts: 50
    via Email
    It looks as though you have not provided a value expression in your rule.
    So you've specified where you want a value to go (in your
    DestinationProperty), but have not specified what value should go there.
    Since you opted to go with the ValueExpression, you'll have to specify the
    OID of the Item that has the value you'd like inserted into your
    DestinationProperty.

    Item OID goes here

    I hope this helps!

    Best regards,

    *Laura*

    *Laura Keita *|* OpenClinica, LLC*
    Director of Training and Compliance
    Direct: *781.547.8462*
    [email protected] | www.openclinica.com

    *Click the image below for details about OC15.*

    [image: https://community.openclinica.com/conference]







    On Mon, Feb 23, 2015 at 11:30 AM, romalynda
  • romalyndaromalynda Posts: 12
    Thanks Laura!

    I added the ValueExpression and got the same error.

    <RuleImport>
    <RuleAssignment>
        <Target Context="OC_RULES_V1">SE_VISIT1.F_NEWIMAGEENTR_13_5005.IG_NEWIM_SITEIMAGES.I_NEWIM_IMAGENO</Target>
        <RuleRef OID="R_GETImageNo">
            <InsertAction IfExpressionEvaluates="true">
            <Run AdministrativeDataEntry="true" InitialDataEntry="true" DoubleDataEntry="true" ImportDataEntry="false" Batch="false"/>
            <DestinationProperty OID="F_HAWKGRADER_13.IG_HAWK_UNGROUPED.I_HAWK_IMAGENO_5831">
                    <ValueExpression Context="OC_RULES_V1">I_NEWIM_IMAGENO</ValueExpression>
            </DestinationProperty>
             </InsertAction>
            </RuleRef>
    </RuleAssignment>
        <RuleDef OID="R_GETImageNo" Name="ImageNumber">
                    <Description>Insert the ImageNo</Description>
                    <Expression>(I_NEWIM_IMAGENO ne "") and (I_HAWK_IMAGENO_5831 eq "")</Expression>
    </RuleDef>
    </RuleImport>
  • lkeitalkeita Posts: 50
    via Email
    So sorry...I didn't catch this before...your RuleDef OID must be in all
    caps (e.g., R_GETIMAGENO). And...of course, you'll have to change that in
    your RuleRef as well.

    Best regards,

    *Laura*

    *Laura Keita *|* OpenClinica, LLC*
    Director of Training and Compliance
    Direct: *781.547.8462*
    [email protected] | www.openclinica.com

    *Click the image below for details about OC15.*

    [image: https://community.openclinica.com/conference]







    On Mon, Feb 23, 2015 at 12:06 PM, romalynda
  • romalyndaromalynda Posts: 12
    Thanks Laura!

    It works now!
This discussion has been closed.