410 likes | 554 Views
XRML Syntax and Automated Form Processing. 2001. 3. 3 IIS/EC Lab Mye M. Sohn. Table of Contents. 1. Introduction 2. XRML Syntax 2.1 Overall Architecture of XRML 2.2 Rule Structure Language (RSL) 2.3 Rule Triggering Language (RTL)
E N D
XRML Syntax and Automated Form Processing 2001. 3. 3 IIS/EC Lab Mye M. Sohn
Table of Contents 1. Introduction 2. XRML Syntax 2.1 Overall Architecture of XRML 2.2 Rule Structure Language (RSL) 2.3 Rule Triggering Language (RTL) 2.4 Rule Identification Language (RIL) 3. Application of Automated Form Processing 4. Conclusion
Advent of XML • Standard communication format across the Internet. Extensible Markup Language (XML) • However, exchanged data is insufficient for rule processing which is involved with workflow system.
Workflow System • So we need the rule exchange scheme on workflow system, which can be understood expert system agents. XRML(Extensible Rule Markup Language)
Definition of XRML • Extensible Rule Markup Language (XRML) extension of XML with additional capabilities of structured rule exchange and interact with ESA and human on intranet workflow system.
2. XRML Syntax 2.1 Overall Architecture of XRML 2.2 Rule Structure Language (RSL) 2.3 Rule Identification Language (RIL) 2.4 Rule Triggering Language (RTL)
2.1 Overall Architecture of XRML Expert System Agent Inference Engine Call Parser RB Transform Knowledge Engineer Trigger Inquiry Answer Knowledge Editor RSL Object Type Forms RTL in Forms Consistency HTML Forms XML/ HTML XML/RIL Workflow XRML Web Browser Web Brower
2.2 Rule Structure Language (RSL) • Automation of the decision making on workflow • Structured rule exchange is essential • To do so, we design Rule Structure Language (RSL) which can represent rule structure in markup syntax.
RSL Representation <?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="transform1.xsl"?> <!DOCTYPE rsl SYSTEM "bc.dtd"> <rsl> <RSLRuleGroupTitle>Budgetary Constraints for research fund</RSLRuleGroupTitle> <rslrule> <RSLRuleTitle>budgetary appropriateness</RSLRuleTitle> <RSLRuleBody> <IF><statement> <l.parn>(</l.parn> <rel.operator>AND</rel.operator> <l.parn>(</l.parn> <l.parn>(</l.parn> <var>budgetary_source</var> <operator> IS </operator> <value>type _P_research_fund</value> <r.parn>)</r.parn> </statement> <statement> …… </statement> </IF> <THEN> <statement> …… </statement> </THEN> </RSLRuleBody> </rslrule> </rsl>
DTD of RSL <?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?> <!ELEMENT rsl (RSLRuleGroupTitle, rslrule)> <!ELEMENT RSLRuleGroupTitle (#PCDATA)> <!ELEMENT rslrule (RSLRuleTitle, RSLRuleBody)> <!ELEMENT RSLRuleTitle (#PCDATA)> <!ELEMENT RSLRuleBody (IF, THEN)> <!ELEMENT IF (statement)+> <!ELEMENT THEN (statement)+> <!ELEMENT statement (l.parn|rel.operator|operator|r.parn|value|var)+> <!ELEMENT l.parn (#PCDATA)> <!ELEMENT operator (#PCDATA)> <!ELEMENT r.parn (#PCDATA)> <!ELEMENT rel.operator (#PCDATA)> <!ELEMENT value (#PCDATA)> <!ELEMENT var (#PCDATA)>
BNF of RSL rule <RSL_Rule> ::= (<RSL> <RSLRulegroupTitle>(rulegrouptitle literal)</RSLRulegroupTitle> <RSLRule>statement {statement} </RSLRule> </RSL>) statement ::= <RSLRuleTitle>(ruletitle literal)</RSLRuleTitle> <RSLRuleBody> <IF> conditions</IF> <THEN> statement </THEN> </RSLRuleBody> conditions ::= AND (statement IS|<operator> statement>| OR (statement IS|<operator> statement)|NIL {AND (statement IS|<operator> statement)| OR (statement IS|<operator> statement)|NIL} statement ::= <var>literal</var>|<val>literal</val> <operator >::= >=|<=|=
XSL (Extensible Stylesheet Language) <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"> <xsl:output method="html"/> <xsl:template match="/"> <html> <head><title><xsl:value-of select="//rslrule/RSLRuleTitle"/></title></head> <body> <h1><xsl:value-of select="//RSLRuleGroupTitle"/></h1> <h2><xsl:value-of select="//rslrule/RSLRuleTitle"/></h2> <xsl:text>IF</xsl:text> <xsl:for-each select="/rsl/rslrule/RSLRuleBody/IF/type1sentence"> <xsl:value-of select="l.parn"/><xsl:value-of select="rel.operator"/><xsl:value-of select="l.parn"/> <xsl:value-of select="l.parn"/> <xsl:value-of select="var"/><xsl:value-of select="operator"/><xsl:value-of select="value"/> <xsl:value-of select="r.parn"/><br/></xsl:for-each> <xsl:for-each select="/rsl/rslrule/RSLRuleBody/IF"><xsl:value-of select="r.parn"/> <xsl:value-of select="r.parn"/></xsl:for-each> <xsl:text>THEN </xsl:text><xsl:for-each select="/rsl/rslrule/RSLRuleBody/THEN/sentence"> <xsl:value-of select="s.l.parn"/> <xsl:value-of select="var"/><xsl:value-of select="operator"/><xsl:value-of select="value"/> <xsl:value-of select="s.r.parn"/><br/></xsl:for-each> </body></html></xsl:template></xsl:stylesheet>
Advantages of RSL • RSL • Structured Rule Interchange format on Internet
2.3 Rule Identification Language (RIL) • To aid human agent’s knowledge processing, rule which is represented RSL should be converted to unstructured HTML. Rule Identification Language (RIL)
Design of RIL • RIL is component of XRML which can identify the relevant rule and contingency variable in unstructured HTML . • Rule title may be viewed as pointer that point out the relevant RSL • Contingency Variables • The RSL should be reconstructed by change of variables in RIL and vice versa.
RIL Representation <?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="transform2.xsl"?> <!DOCTYPE ril SYSTEM "ril.dtd"> <ril> <RILHeader> <RILTitle>budgetary appropriateness</RILTitle> <RILHeader> <RILBody> If the <var>budgetary source</var> is the <val>type-P research fund </val>, the spendable <var>items</var> are<val>student salary</val> and <val>expenses for data collection</val> </RILBody> </ril>
DTD of RIL <?xml version="1.0" encoding="UTF-8"?> <!ELEMENT RILBody (#PCDATA | val | var)*> <!ELEMENT RILHeader (RILTitle)> <!ELEMENT RILTitle (#PCDATA)> <!ELEMENT ril (RILHeader, RILBody)> <!ELEMENT val (#PCDATA)> <!ELEMENT var (#PCDATA)>
Display for Human’s Comprehension . Pointing to RSL
Advantages of RIL • Aid human agent’s Knowledge Processing • Conversion of XRML (including Rule Identification Language) to XML/HTML • Maintain Consistency between Rule Base and Web page • Aid the extraction(semi-automatically) of rules from XML maintaining consistency between them
2.4 Rule Triggering Language (RTL) • Intelligent agent’s knowledge processing against web client • To perform the rule processing, form of workflow can trigger the ESA which can give adequate inference results. Rule Triggering Language (RTL)
Representation of RTL • New attributes type can be created in the form • Representation of the attributes in grammatical form which is represent not only relevant rule, but also returned result that is selected among inference results. • Suggestion of variables and values that describe attribute types.
BNF of RTL <RTL_attribute> ::= <RTL> <RuleGroup> (rule_group_title literal)</RuleGroup> <RuleTitle>(rule_title literal)</RuleTitle> <Condition> <trigger_attribute>(attribute_name literal {literal}) </trigger_attribute> <access>access_var</access> <when>invoke_time</when> </Condition> <ReturnedResult> description </ReturnedResult> </RTL> access_var ::= new-value|new-values|get-value|get_values|delete-value| delete-values|add-value|add-values invoke_time ::= before|after description ::= <attribute>attribute_name</attibute> <val>inference_value</val> attribute_name ::= literal inference_value ::= literal|a certain number
Example of RTL {{requisition-2000/6/28-1 (requisition_section : ICEC ) (Use_for: student’s salary) (budgetary_source: type-P research fund) (account: P-1234) (amount: 1000) (permission: ) (RULE_TRIGGER: (<RTL> <RuleGroup>Budget Control</RuleGroup> <RuleTitle> budgetary_appropriateness</RuleTitle> <Condition> <trigger>budgetary_source</trigger> <access>new-value</access> <when>after</when> </Condition> <ReturnedResult> <var>permission</var> </ReturnedResult> </RTL>)}}
Advantages of RTL • Aid Agent’s Knowledge Processing against Web page • Triggering rule-based inferences in the agents, possibly from the Workflow Management System
Knowledge Management • XRML is devised for Knowledge Management among agents of intranet workflow system • Knowledge Sharing and Reusing • To achieve the knowledge sharing, knowledge should be managed consistently between RSL and RIL.
Rule embedded in a form • In the workflow system, form embed with many rule processing on web client. • In student salary payment process, for instance, the following rules are applied to determine whether or not type-P research fund are allowed.
Illustrative Rules IF (budgetary-source IS type-P research fund) AND ((item IS student’s-salary OR (item IS data-collection-expenses)) THEN permission IS allowed IF (budgetary-source IS type-P research fund) AND NOT (((item IS student’s-salary OR (item IS data-collection-expenses))) THEN permission IS denied
Issues of form processing(1) • Storage of the rule • Memorized by human beings or may be referred to by consulting printed regulations (Unstructured HTML Document). Cause of the Inaccurate Transaction • Remedy • Adoption of intelligent agent named Expert System Agent (ESA)
Issues of form processing(2) • ESA on web client can’t yet understand the unstructured HTML. • Remedy • Structured rule representation is essential.
Issues of form processing(3) • Management (Maintenance) of structured rule • Centralized Management • By a Knowledge Engineer • Rule exchange using XRML (Push Service) • Knowledge Sharing Achievement of Knowledge Management
Illustrative RSL Revision Process Step 1) RSL Rule Revision by Knowledge Engineer Selection of revised RSL rule. For instance, the P-type research fund can be paid out for travel expense. <?xml version="1.0"?> : <RSLRuleGroupTitle>Budgetary Constraints for research fund</RSLRuleGroupTitle> <RSLRuleBody><IF><statement> <l.parn>(</l.parn> : <r.parn>)</r.parn> </statement> <statement> <l.parn>(</l.parn> <rel.operator>OR</rel.operator> <l.parn>(</l.parn> <l.parn>(</l.parn> <var>item</var> <operator> IS </operator> <value>travel_expense</value> <r.parn>)</r.parn> </statement> </IF> <THEN> …… </THEN> </RSLRuleBody></rslrule></rsl> Added RSL Rule Part
Push Service by RSL Server Step 2) Push service to ESA on Web Client Intelligent Agents RSL server Update the rule named budgetary_appropriateness Initiate inference using a rule named budgetary_appropriateness Monitoring Monitoring web clients Send to rule update message Trigger the rule Reply the acceptance message Push the updated RSL rule Parser receives the updated rule Transform to condition-action type rule Perform the inference
Illustrative RIL Revision Process (1) Browsed Display <HTML> <p> Research budgets is organized within limits of the contract deposit and distributed to each accounts. The use of research budget is as follows: </p> <RIL> <RILHeader> <RILTitle>budgetary appropriateness</RILTitle> </RILHeader> <RILBody> If the <var>budgetary source</var> is the <val>type-P research fund</val>, the spendable <var>items</var> are<val>student salary</val>and <val>expenses for data collection</val> and <val>travel expense</val> </RILBody> </RIL> <HTML> HTML/RIL
Illustrative RIL Revision Process • Consistency between RIL and RSL <HTML> The research fund is ………….. ………. <RIL> <RILHeader> <RILTitle>budgetary appropriateness</RILTitle> </RILHeader> <RILBody> If the <var>budgetary source</var> is the <val>type-P research fund</val>, the spendable <var>items</var> are<val>student salary</val>and <val>expenses for data collection</val></RILBody></RIL><HTML> RIL RSL <RSL> <RSLRulegroupTitle>Budgetary Type Constraints</RSLRulegroupTitle> <RSLRule> <RSLRuleTitle>budgetary appropriateness</RSLRuleTitle> <RSLRuleBbody> <IF> (AND (<var>budgetary_source</var> IS <val>type-P research fund</val>) (OR (<var>item</var> IS <val>student’s salary</val>) (<var>item</var> IS <val>data collection expenses</val>)))</IF> <THEN> <var>permission</var> IS <val>allowed</val> </THEN> </RSLRulrBody></RSLRule></RSL>
Illustrative Form Processing Step 1) Form generation Form template (RTL embed) is uploaded.
Form processing on Web Client Step 2) The RTL trigger ESA. Step 2.1) ESA search a specific rule named “budgetary appropriateness” in RB. Step 2.2) The moment ESA triggered a rule, RSL server push a rule if rule is changed. Otherwise, ESA can triggered rule in its RB. Step 3) Return to inference result to form.
Remarks • XRML can be a useful automated form processing on Internet
4. Conclusions • Number of consulting unstructured HTML files manually will be reduced. • Achieve the consistency management between rules, web, and knowledge processing. • Expandable to any application of workflow.