Rules .xml uqload,but it does not work ,why?

recently,I write a Rules and uqload the openclinica by .xml,but it does not work.my Rules like that:
<RuleAssignment>
<Target>I_CB_PEDAT</Target>
<RuleRef OID="CB_21">
<ShowAction IfExpressionEvaluates="true">
<Run AdministrativeDataEntry="true" InitialDataEntry="true" DoubleDataEntry="false" ImportDataEntry="true" Batch="false"/>
<Message>&#x8BF7;&#x8865;&#x5145;&#x5B8C;&#x5584;&#x8D44;&#x6599;&#xFF01;</Message>
<DestinationProperty OID="IG_CB_"/>
</ShowAction>
<InsertAction IfExpressionEvaluates="true">
<Run AdministrativeDataEntry="true" InitialDataEntry="true" DoubleDataEntry="false" ImportDataEntry="true" Batch="false"/>
<DestinationProperty OID="IG_CB_[1].I_CB_PETEST" Value="1&#x3001;&#x773C;&#x8033;&#x9F3B;&#x5589;&#x53E3;">
<ValueExpression/>
</DestinationProperty>
<DestinationProperty OID="IG_CB_[2].I_CB_PETEST" Value="2&#x3001;&#x547C;&#x5438;&#x7CFB;&#x7EDF;">
<ValueExpression/>
</DestinationProperty>
<DestinationProperty OID="IG_CB_[3].I_CB_PETEST" Value="3&#x3001;&#x8840;&#x6DB2;&#x548C;&#x6DCB;&#x5DF4;&#x7CFB;&#x7EDF;">
<ValueExpression/>
</DestinationProperty>
<DestinationProperty OID="IG_CB_[4].I_CB_PETEST" Value="4&#x3001;&#x5FC3;&#x8840;&#x7BA1;&#x7CFB;&#x7EDF;">
<ValueExpression/>
</DestinationProperty>
<DestinationProperty OID="IG_CB_[5].I_CB_PETEST" Value="5&#x3001;&#x6D88;&#x5316;&#x7CFB;&#x7EDF;">
<ValueExpression/>
</DestinationProperty>
</InsertAction>
</RuleRef>
</RuleAssignment>
<RuleDef OID="CB_21" Name="CB_21">
<Description>CB_21</Description>
<Expression>I_CB_PEDAT eq "" or I_CB_PEDAT ne ""</Expression>
</RuleDef>
</RuleImport>

«1

Comments

  • haenselhaensel Posts: 570 ✭✭
    Hi @huamanzhu

    Can't you upload your rule file or isn't it working as expected?

    Regards,
    Christian
  • huamanzhuhuamanzhu Posts: 50
    via Email
    Hi,haensel.
    I can't uqload my Rules ,it is not success.
    have a error message,like this:
    Oops! An error has occurred
    This can be for a number of reasons, which may or may not have to do with the OpenClinica application. If there are any system messages above this text, please copy and paste them into the Report Issue Form.
    If there are no other messages, you might try clicking on the links in the navigation, and see what happens. This might reinitialize your connection with the database. Or click here to go back to where you came from.
    If you cant get back to a working page, please let us know! Please be sure to include
    what you were doing,
    when it happened,
    and any other details (like error messages) that might be important.
    Thank you!
    The OpenClinica Development Team
  • lindsay.stevenslindsay.stevens Posts: 403 ✭✭✭
    via Email
    Not sure of you can insert Unicode values like that, but anyway the first
    thing to do is make sure all the OIDs are correct. For example "IG_CB_"
    looks like a typo.
  • huamanzhuhuamanzhu Posts: 50
    via Email
    hi stevens,
    Yes,I got the OIDs from the Rules Designer,I don't think it is wrong or typo.but it seen to be had some problem when I uqload.you can see this:
  • huamanzhuhuamanzhu Posts: 50
    via Email
    Hi stevens and haensel,
    I have a doubt,is it could't match "IG_CB_[4].I_CB_PETEST" when I uqload or is it can know "[4]" on the system?
  • lindsay.stevenslindsay.stevens Posts: 403 ✭✭✭
    Things to look at:
    - The text in your post is missing the opening <RuleImport> tag. 
    - If IG_CB_ is not a repeating group, any repeat key other than IG_CB_[1] would be invalid. If it is a repeating group then any repeats that don't exist will be created by the insertaction.
    - Try removing the empty <ValueExpression/> tags. 
    - If I_CB_PEDAT is in IG_CB_ it may be invalid to target that group with a show action.
    - Both showaction and insertaction only work within an event, so I_CB_PEDAT must be on the same CRF or on a CRF in the same event as the CRF containing IG_CB_.
    - If you have rules designer, does it show any errors when you validate the rule?

  • huamanzhuhuamanzhu Posts: 50
    edited February 2015 via Email
    Yes,I konw your mean, I test this Rules in the rules designer,it have not show any error. I_CB_PEDAT and IG_CB_ on the same CRF or event. I try it again and again ,but I do not find the problem.
    my Rules like that:

    I_CB_PEDAT



    请补充完善资料!























    CB_21
    I_CB_PEDAT eq "" or I_CB_PEDAT ne ""

  • lindsay.stevenslindsay.stevens Posts: 403 ✭✭✭
    via Email
    Try with importdataentry=false, i dont think these action types can't be
    triggered on import (or batch) anyway. Then maybe check if it works with
    just showaction, or just with insertaction, in case one or the other is the
    problem.
  • huamanzhuhuamanzhu Posts: 50
    via Email
    As you said,I try again,but it can't solve the problem,now I send my CRF and Rules for you,you can try ,I try this website:https://demo.eclinicalhosting.com/OpenClinica/pages/login/login
  • lindsay.stevenslindsay.stevens Posts: 403 ✭✭✭
    via Email
    I got it to work. Change importdataenty=false on both the show action and
    insert action. Remove the valueexpression tags in the insert action.

    It would make troubleshooting much easier is you genuinely try the
    suggested solutions.
This discussion has been closed.