|
|
|
@ -3,8 +3,10 @@
|
|
|
|
|
int bs_wl_check(EPM_rule_message_t msg)
|
|
|
|
|
{
|
|
|
|
|
int ifail = EPM_go, att_count, tag_cnt,form_cnt;
|
|
|
|
|
tag_t rootTask, *attachments, win, top, *tags,*forms;
|
|
|
|
|
tag_t rootTask, *attachments, *tags,*forms;
|
|
|
|
|
char *val;
|
|
|
|
|
stringstream ss,name_ss;
|
|
|
|
|
|
|
|
|
|
EPM_ask_root_task(msg.task, &rootTask);
|
|
|
|
|
|
|
|
|
|
EPM_ask_attachments(rootTask, EPM_target_attachment, &att_count, &attachments);
|
|
|
|
@ -68,7 +70,6 @@ int bs_wl_check(EPM_rule_message_t msg)
|
|
|
|
|
AOM_ask_value_tags(attachments[i], paras["relation"].c_str(), &tag_cnt, &tags);
|
|
|
|
|
printf("relation :%s\n, length:%d\n", paras["relation"].c_str(), tag_cnt);
|
|
|
|
|
pass = false;
|
|
|
|
|
|
|
|
|
|
for(int j=0;j<tag_cnt;j++)
|
|
|
|
|
{
|
|
|
|
|
for(int k=0;k<judge_types.size();k++)
|
|
|
|
@ -76,22 +77,44 @@ int bs_wl_check(EPM_rule_message_t msg)
|
|
|
|
|
if(isTypeOf(tags[j], judge_types[k].c_str()))
|
|
|
|
|
{
|
|
|
|
|
printf("judge_type:%s\n", judge_types[k].c_str());
|
|
|
|
|
tag_t rev;
|
|
|
|
|
ITEM_ask_latest_rev(tags[j], &rev);
|
|
|
|
|
if(rev)
|
|
|
|
|
{
|
|
|
|
|
int rel_cnt;
|
|
|
|
|
tag_t *rels;
|
|
|
|
|
AOM_ask_value_tags(rev, "release_status_list", &rel_cnt, &rels);
|
|
|
|
|
if(rel_cnt==0)
|
|
|
|
|
{
|
|
|
|
|
AOM_ask_value_string(tags[j], "object_string", &val);
|
|
|
|
|
ss << val << ",";
|
|
|
|
|
}
|
|
|
|
|
}else
|
|
|
|
|
{
|
|
|
|
|
printf("dont have rev\n");
|
|
|
|
|
}
|
|
|
|
|
pass = true;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (!pass)
|
|
|
|
|
{
|
|
|
|
|
AOM_ask_value_string(attachments[i], "object_string", &val);
|
|
|
|
|
name = val;
|
|
|
|
|
ifail = EPM_nogo;
|
|
|
|
|
break;
|
|
|
|
|
name_ss << val<<",";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(ss.str().length())
|
|
|
|
|
{
|
|
|
|
|
ss << "×îаæÎ´·¢²¼\n";
|
|
|
|
|
ifail = EPM_nogo;
|
|
|
|
|
}
|
|
|
|
|
if(name_ss.str().length())
|
|
|
|
|
{
|
|
|
|
|
ss << name_ss.str() << paras["prompt"];
|
|
|
|
|
ifail = EPM_nogo;
|
|
|
|
|
}
|
|
|
|
|
if (ifail==EPM_nogo) {
|
|
|
|
|
name += paras["prompt"];
|
|
|
|
|
EMH_store_error_s1(EMH_severity_user_error, EMH_PROP_error_base, name.c_str());
|
|
|
|
|
EMH_store_error_s1(EMH_severity_user_error, EMH_PROP_error_base, ss.str().c_str());
|
|
|
|
|
}
|
|
|
|
|
return ifail;
|
|
|
|
|
}
|
|
|
|
|