{"id":76,"date":"2008-03-26T11:02:50","date_gmt":"2008-03-26T16:02:50","guid":{"rendered":"http:\/\/haleyai.com\/wordpress\/2008\/03\/26\/agile-governance-and-decisions-using-soa-without-xml-details\/"},"modified":"2019-04-05T06:28:21","modified_gmt":"2019-04-05T11:28:21","slug":"agile-governance-and-decisions-using-soa-without-xml-details","status":"publish","type":"post","link":"http:\/\/haleyai.com\/wordpress\/2008\/03\/26\/agile-governance-and-decisions-using-soa-without-xml-details\/","title":{"rendered":"Agile decision services without XML details"},"content":{"rendered":"<p>Externalizing\u00a0enterprise decision management\u00a0using service-oriented architecture orchestrated by business process management\u00a0makes increases agility and allows continuous performance improvement, but&#8230;<\/p>\n<p>How do you implement the rules of EDM in an SOA decision service?\u00a0 <!--more--><\/p>\n<ul>\n<li>Do you worry about how requests are expressed in XML?<\/li>\n<li>Do you write rules that match against the structure of a document object model (DOM)?<\/li>\n<li>Do you write patterns against paths within the nested structure of XML documents using XPATH?<\/li>\n<\/ul>\n<p>Not very agile, right?\u00a0 Not very accessible to non-technical users, right?<\/p>\n<p>Personally, I do not worry about XML or write rules at the level of document structure or using XPATH.\u00a0 I prefer to write rules at a conceptual level that is above the level of data encoding or data structure.\u00a0 In fact, I want my rules to be as independent of the XML schema definition (XSD) as possible.\u00a0 I want my rules to work if I switch to another implementation that gets its data from an SQL database or a Java or .NET object model in the middle tier.\u00a0 Why should my rules depend on any particular data model?<\/p>\n<p>In other words, rules should be written on a semantic foundation.\u00a0 The semantic foundation lies above the details of a data model and any technical syntax used to access it.<\/p>\n<p>Here how to do it:<\/p>\n<ol>\n<li>Take your data model and figure out what it <strong>means<\/strong>.<\/li>\n<li>In the case of an XSD, take an element nested within another and figure out how they are related &#8211; <strong>semantically.<\/strong><\/li>\n<li>Once you understand the relationship between two elements in the XSD, write down what it means (i.e., its semantics) so that someone who is unfamiliar with XML would understand it.<\/li>\n<\/ol>\n<p>For example, in ACORD, the code shown below represents, among other things, that:<\/p>\n<ul>\n<li>A business owner policy (BOP) is a commercial policy.<\/li>\n<li>A business owner policy must identify at least one insured (who may be a principal).<\/li>\n<li>A business owner policy may involve one or more producers (i.e., agents)<\/li>\n<li>A business owner policy covers at least one location.<\/li>\n<li>A business owner policy has a primary line of business (LOB).<\/li>\n<li>A request to update a policy may have attached files.<\/li>\n<li>A request may have remarks.<\/li>\n<\/ul>\n<p>Consider writing rules that use these phrases versus XPATH code.<\/p>\n<ul>\n<li>If an insured under a BOP&#8230;<\/li>\n<li>If the primary LOB of a BOP&#8230;<\/li>\n<li>If a PDF is attached to a request to update a commercial policy&#8230;<\/li>\n<\/ul>\n<p>Such expression of rules allows governance of an insurance practice to be much more agile.\u00a0 If XPATH rules are required there will clearly be a expensive, length, waterfall process to implement any new policies.\u00a0 And if the policies are captured and maintained at a level above the data model, they can be reused across internal systems (that may not use ACORD) and external systems that integrate with agent management systems or exchanges.\u00a0 If rules are written in terms of XML, they will not be portable to other services that use different web service definition language (WSDL) or that use a relational database (i.e., SQL) or object-oriented models (e.g., Java or .NET).<\/p>\n<p>To conclude, we recommend that you define an ontology that is independent of your data model and that you use that ontology in capturing and managing your business logic.<\/p>\n<p>The alternative is to write rules that use XPATH to match against XML documents that conform to the following, for example:<\/p>\n<pre>\u00a0\u00a0 &lt;xsd:complexType name=\"BOPPolicyAddRq_Type\"&gt;\n\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;xsd:sequence&gt;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;xsd:group ref=\"MSGRQINFO\" minOccurs=\"1\" maxOccurs=\"1\"\/&gt;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;xsd:element ref=\"Producer\" minOccurs=\"0\" maxOccurs=\"unbounded\"\/&gt;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;xsd:element ref=\"InsuredOrPrincipal\" minOccurs=\"1\" maxOccurs=\"unbounded\"\/&gt;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;xsd:element ref=\"CommlPolicy\" minOccurs=\"1\" maxOccurs=\"1\"\/&gt;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;xsd:element ref=\"Location\" minOccurs=\"1\" maxOccurs=\"unbounded\"\/&gt;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;xsd:element ref=\"BOPLineBusiness\" minOccurs=\"1\" maxOccurs=\"1\"\/&gt;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;xsd:element ref=\"CommlSubLocation\" minOccurs=\"0\" maxOccurs=\"unbounded\"\/&gt;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;xsd:element ref=\"FileAttachmentInfo\" minOccurs=\"0\" maxOccurs=\"unbounded\"\/&gt;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;xsd:element ref=\"RemarkText\" minOccurs=\"0\" maxOccurs=\"unbounded\"\/&gt;\n\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;\/xsd:sequence&gt;\n\u00a0\u00a0 &lt;\/xsd:complexType&gt;<\/pre>\n<p>Such business rules will obviously be limited to a very technical user community.<\/p>\n<p>In other words:<\/p>\n<ol>\n<li>business agility will remain limited,<\/li>\n<li>stakeholders will remain at more than arm&#8217;s length, and<\/li>\n<li>governance, risk and compliance (GRC) policies will not be reused across silos.<\/li>\n<\/ol>\n<p>To realize these benefits with existing rule engines or business rules management systems (BRMS), look for the following:<\/p>\n<ol>\n<li>Support for building an ontology that maps into an XSD.<\/li>\n<li>Support for asserting XML that conforms to an XSD into the rules engine at runtime.<\/li>\n<li>Support for rules that reference ontologies grounded in an XSD to apply without needed to understand the structure or content of the XML document.<\/li>\n<\/ol>\n<p>The essence of these requirements is that a BRMS should deliver its end user authoring metaphors not just for Java or .NET object but also for XSD and WSDL specifications.\u00a0<\/p>\n<p>I am not aware of any tools that do this for JESS, CLIPS, or Drools \/ JBOSS Rules, however.\u00a0 There are some approaches in the logic programming community.\u00a0 For example, XSB has some support for matching against XML, but it takes the XPATH approach by asserting the tree structured data that corresponds to an XML document and leaving up to the rule author to write rules that traverse the data structure.\u00a0 Other Prologs take similar approaches.\u00a0 Some assert objects that correspond to the document object model (i.e.,\u00a0&#8220;the DOM&#8221;, which is\u00a0the tree structure of the XML).\u00a0<\/p>\n<ul>\n<li>Any approach that emphasizes XPATH or DOM may not go far enough to accomplish core enterprise objectives concerning policy management.<\/li>\n<\/ul>\n<p>Although there may be other approaches, my favorite means of eliminating data model concerns from policy capture and management is to transform the data level up to the semantic level.\u00a0 Ideally, the tool you select will do this for you.\u00a0 That is, if your tool generates the XPATH or DOM rules that turn asserted XML into the semantic model that supports your ontology, your GRC policies will be independent of the implementation.<\/p>\n<p>\u00a0If your tool doesn&#8217;t do this, I would recommend that your technical team does it manually.\u00a0 The return on investment will be high versus any alternative approach.\u00a0 I promise.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Externalizing\u00a0enterprise decision management\u00a0using service-oriented architecture orchestrated by business process management\u00a0makes increases agility and allows continuous performance improvement, but&#8230; How do you implement the rules of EDM in an SOA decision service?\u00a0<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,9,13,17,21],"tags":[25,56,60,880,5,83,882,101,106,109,112,120,150,152,154,167,174,180,181,888,238,269,276,314,319,321,322],"class_list":["post-76","post","type-post","status-publish","format-standard","hentry","category-compliant-governance","category-decision-management","category-knowledge-management","category-ontology","category-rules-engines","tag-acord","tag-blaze-advisor","tag-bpm","tag-business-process-management","tag-business-rules","tag-clips","tag-decision-management","tag-decision-service","tag-dom","tag-drools","tag-edm","tag-enterprise-decision-management","tag-governance","tag-grc","tag-haley","tag-ilog","tag-insurance","tag-jboss-rules","tag-jess","tag-ontology","tag-prolog","tag-semantics","tag-soa","tag-wsdl","tag-xpath","tag-xsb","tag-xsd"],"_links":{"self":[{"href":"http:\/\/haleyai.com\/wordpress\/wp-json\/wp\/v2\/posts\/76","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/haleyai.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/haleyai.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/haleyai.com\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/haleyai.com\/wordpress\/wp-json\/wp\/v2\/comments?post=76"}],"version-history":[{"count":1,"href":"http:\/\/haleyai.com\/wordpress\/wp-json\/wp\/v2\/posts\/76\/revisions"}],"predecessor-version":[{"id":1605,"href":"http:\/\/haleyai.com\/wordpress\/wp-json\/wp\/v2\/posts\/76\/revisions\/1605"}],"wp:attachment":[{"href":"http:\/\/haleyai.com\/wordpress\/wp-json\/wp\/v2\/media?parent=76"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/haleyai.com\/wordpress\/wp-json\/wp\/v2\/categories?post=76"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/haleyai.com\/wordpress\/wp-json\/wp\/v2\/tags?post=76"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}