Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagecpp
themeConfluence
EdmiError edmiDefineRuleSchema(SdaiString  ruleSchemaFile,
                                SdaiString  diagnosticFile, 
                                SdaiInteger options, 
                                SdaiInteger *nWarnings, 
                                SdaiInteger *nErrors);

Invokes the EDMexpressXCompiler to compile an EDMruleSchema. The rule schema will be checked for syntactical and consistency errors. Optionally the result of the compilation will be stored as an increment to the appropriate dictionary model in the EDMdatabase.

...

Only rule

...

schema that are compiled without any errors will be stored in the belonging dictionary model

...

, this default behavior can be overruled by an option in the <options> argument. See below for details.

A rule schema defines any business rules to an existing Express schema. Such business rules are defined as Where rules to entities and defined types and as global rules. This belonging Express schema must exist as a dictionary model in the EDMdatabase before this operation can be successfully performed.

...

There can be any number of rule

...

schema for each dictionary model (Express schema). The name of a rule schema must be unique within all rule

...

schema to the same dictionary model.

...

Each rule schema is independent, i.e., a rule schema can be deleted at any time independent of any other rule schema, query schema or data models.

...

When the belonging dictionary model is deleted, then all belonging rule

...

schema will be deleted as well.

...

ruleSchemaFile

Specifies the name of one or more files, each containing one or more EDMruleSchema. If more than one file is specified, delimit each file name with a comma. The wild card symbol "*" is also a permitted character in a filename. The default file extension is ".rex".

diagnosticFile

Specifies the file name for diagnostic information generated by the EDMexpressXCompiler during this operation. If no file name is supplied, i.e. the <diagnosticFile> argument is set to NULL, all diagnostic information will be written to the EDMinterface current output device. The EDMinterface current output device can be defined by the edmiDefineOutputFunction operation.

options

Specifies the current EDMexpressXCompiler options. The <options> value should be specified as a bitwise OR of the EDMexpressXCompiler options to enable. See descriptions below for more details.
Default options are enabled when this argument is set to zero. 
The name of all <options> are defined in the header file sdai.h

nWarnings

Address of a variable that receives the number of warnings detected by the EDMexpressXCompiler during operation.

nErrors

Address of a variable that receives the number of errors detected by the EDMexpressXCompiler during operation.

Option Description

DELETING_EXISTING_SCHEMAS

If an EDMruleSchema with the same name for the same dictionary model, already exists in the EDMdatabase, this existing query schema will be deleted and replaced by the actual compiled version.

PARSE_ONLY

Specifies that the EDMruleSchema will be checked for syntax errors only. No update of the related dictionary model will be done.

NO_DICTIONARY_MODEL

Enforces the EDMexpressXCompiler to update the belonging dictionary model even though errors are detected during compilation time.
NOTE: This option should be used with care as it may lead to unpredictable consequences, possibly fatal system failure!

CONTINUE_STORING_ON_ERROR

Enforces the EDMexpressXCompiler to update the belonging dictionary model even though errors are detected during compilation time.
NOTE: This option should be used with care as it may lead to unpredictable consequences, possibly fatal system failure!

HTML_ERROR_LISTING

Specifies that compilation diagnostics will be written in HTML format on files in the directory defined by the system variable EDMS_TMP_DIR. The diagnostic report is ready to be displayed by an Internet browser. There are three or four HTML diagnostic files with the following names:
On UNIX: s_main.html, s_err.html, s_exp0.html and optionally s_sch.html
On Windows: s_main.htm, s_err.htm, s_exp0.htm and optionally s_sch.htm
The file named s_main.htm or s_main.html is the main file, hence this file should be specified to the actual Internet browser when displaying the diagnostic report.

MakeExpressXlongForm

Create EXPRESSX long form

Returns:
A completion code of datatype EdmiError is the returned function value. The completion code has the following values:
Completion code = 0 : Operation successfully performed.
Completion code != 0: Error in operation. Completion code is an EDMinterface error code. Use edmiGetErrorText to get the error text corresponding to the error code.
EXAMPLE
EdmiError rstat;
SdaiInteger nWarnings, nErrors;
. . .
if (rstat = edmiDefineRuleSchema (
"/usr/hkd/ 

Arguments

...

Insert excerpt
US:_a_ruleSchemaFile_EDMI
US:_a_ruleSchemaFile_EDMI
nopaneltrue
Insert excerpt
US:_a_diagnosticFile_EDMI
US:_a_diagnosticFile_EDMI
nopaneltrue
Insert excerpt
US:_a_options_EDMI
US:_a_options_EDMI
nopaneltrue
Insert excerpt
US:_a_nbWarnings
US:_a_nbWarnings
nopaneltrue
Insert excerpt
US:_a_nbErrors
US:_a_nbErrors
nopaneltrue
        

Return Value

...

Insert excerpt
US:_r_EDMInterface
US:_r_EDMInterface
nopaneltrue

Options

...

  

Insert excerpt
US:_o_DELETING_EXISTING_SCHEMAS
US:_o_DELETING_EXISTING_SCHEMAS
nopaneltrue
Insert excerpt
US:_o_PARSE_ONLY
US:_o_PARSE_ONLY
nopaneltrue
Insert excerpt
US:_o_NO_DICTIONARY_MODEL
US:_o_NO_DICTIONARY_MODEL
nopaneltrue
Insert excerpt
US:_o_CONTINUE_STORING_ON_ERROR
US:_o_CONTINUE_STORING_ON_ERROR
nopaneltrue
Insert excerpt
US:_o_HTML_ERROR_LISTING
US:_o_HTML_ERROR_LISTING
nopaneltrue
  
Insert excerpt
US:_o_MAKE_EXPRESSX_LONGFORM_OPTIONS
US:_o_MAKE_EXPRESSX_LONGFORM_OPTIONS
nopaneltrue
           

 

Example

...

 

Code Block
languagecpp
EdmiError rstat;
SdaiInteger nWarnings, nErrors;
. . .
if (rstat = edmiDefineRuleSchema ("/queries/product_document.rex",

...

 "

...

/

...

queries/query.diag",

...

 DELETING_EXISTING_SCHEMAS,

...

 &nWarnings,

...

 &nErrors)) {

...

 
	/* Error in operation */

...

  
	printf("\nError in edmiDefineRuleSchema: %s\n",

...

 
	edmiGetErrorText(rstat));

...

 
	goto error;

...

 
}

...


printf("\nWarnings during compilation: %ld", nWarnings);

...


printf("\nErrors during compilation..: %ld", nErrors);

...


. . .

 

See also

Filter by label (Content by label)
showLabelsfalse
showSpacefalse
cqllabel = "edmcompilerprj" and parent = "6062220"