// reading state
@co_call(par_area, par_class, "get", par_area=>par_area, par_class=>par_class, par_id=>par_id);
__GET_RETURNED_RECORDSET(corec)
state = cor_GetCopyOfValueByName(cnx, corec, 0, "state");
method_name = cor_GetCopyOfValueByName(cnx, corec, 0, "method_name");
class_name = cor_GetCopyOfValueByName(cnx, corec, 0, "class_name");
id_permission = atoi(cor_GetValueByName(cnx, corec, 0, "id_permission"));
sec_type = atoi(cor_GetValueByName(cnx, corec, 0, "sec_type"));
force_sec_type = atoi(cor_GetValueByName(cnx, corec, 0, "force_sec_type"));
__SEND_MESG_DEBUG(" state = %s, method_name = %s, class_name = %s, id_permission = %d, sec_type = %d, force_sec_type = %d",
state, method_name, class_name, id_permission, sec_type, force_sec_type)
// this is new method
if(strcmp(state, "NEW")==0)
{
//changing state to INSYNC
@co_call(par_area, par_class, "update", par_area=>par_area, par_class=>par_class, par_id=>par_id, par_prop=>'"state"', new_value=>'"INSYNC"', version=>-1);
@co_call(par_area, '"meta_vtable"', "updateTarget", par_area=>par_area, par_class=>par_class, par_id=>-1, class_name=>class_name, method_name=>method_name, target_class=>class_name, id_permission=>id_permission, sec_type=>sec_type, force_sec_type=>force_sec_type);
}