Forum Stats

  • 3,728,127 Users
  • 2,245,554 Discussions
  • 7,853,346 Comments

Discussions

Intelligent Advisor - Extracting Business Rules from OPM Excel/Word rules files

Hi,

We have a business requirements where we need to sync the business rules authored in OPM to an external target system.

Have anyone encounter the similiar requirements before and can share how they overcome the challenge?

Best Answers

  • Richard Napier
    Richard Napier Member Posts: 180 Silver Badge
    edited February 16 Accepted Answer

    Hi There

    Interesting. I have a tendency to want to "eat my own dog food" so I have done something similar in Intelligent Advisor in the past, with Intelligent Advisor doing the reading and sending of Office file contents to a back office. I've done it for Word and Excel since both XLS and DOCX are readable using JavaScript libraries (SheetJS and Docx.JS) . Obviously that is an extreme scenario where Intelligent Advisor reads its own file type.

    It depends how automated you want this to become. You have as I see it several challenges (bear with me)

    None of the Word or Excel files are easily accessible at runtime, so this is something you would need to do from the Oracle Policy Modeling or the desktop.

    So: you might use Word and Excel macros / VBA to do some simple scraping of files and copy that into whatever system you need by a REST or XML call. It would also be possible to use a console application to call via REST the Hub to download, then unzip, read and parse files on a schedule and send them nightly or whenever to the system

    But : even with that, you would be missing potentially important information about data model elements, names, that are in the data model XML file, or the XGEN files.

    But : Any form of parsing of those documents will only really lend itself to automation when the file has a rigidly maintained structure. For an Excel table for example it is easy to understand and maintain a fixed set of columns with defined meanings. Trying to do the same parsing in Word would be much harder.

    So : Given the above, it can make more sense to leverage the XGEN files for each intelligent Advisor rule document rather than the Word or Excel files themselves. The structure is XML, and lends itself to a decent parse since you have the format, the text, the type, the entity and so on in an obviously very structured file. Still, it's going to be a struggle to render the output into something readable at the other end. It depends on the use case / the why.

    But : Given that the Intelligent Advisor Hub Projects keeps a complete set of files for every version you create, is that not good enough since it is out of the box ?

    So : What is the business driver behind this? What is the benefit?

    Addendum : In the future, given that the Hub Authoring interface uses JSON based files, and is entirely Hub-based, it may become much easier to do something like this. But I have no control over that.

    Please feel free to respond.

    Richard

    Jasmine Lee-Oracle
  • Richard Napier
    Richard Napier Member Posts: 180 Silver Badge
    Accepted Answer

    Hi

    XGEN files can be found in the bin folder of your project, one file per document (Word or Excel):


    As mentioned previously, to get a complete picture of the project you would need more than these files (project data model xml file for example) , but they represent a handy structured version of the unstructured Word and Excel documents.

    Otherwise I fear that parsing Excel might be possible given the nature of the data, but a Word file would be a real challenge.

Answers

  • Richard Napier
    Richard Napier Member Posts: 180 Silver Badge
    edited February 16 Accepted Answer

    Hi There

    Interesting. I have a tendency to want to "eat my own dog food" so I have done something similar in Intelligent Advisor in the past, with Intelligent Advisor doing the reading and sending of Office file contents to a back office. I've done it for Word and Excel since both XLS and DOCX are readable using JavaScript libraries (SheetJS and Docx.JS) . Obviously that is an extreme scenario where Intelligent Advisor reads its own file type.

    It depends how automated you want this to become. You have as I see it several challenges (bear with me)

    None of the Word or Excel files are easily accessible at runtime, so this is something you would need to do from the Oracle Policy Modeling or the desktop.

    So: you might use Word and Excel macros / VBA to do some simple scraping of files and copy that into whatever system you need by a REST or XML call. It would also be possible to use a console application to call via REST the Hub to download, then unzip, read and parse files on a schedule and send them nightly or whenever to the system

    But : even with that, you would be missing potentially important information about data model elements, names, that are in the data model XML file, or the XGEN files.

    But : Any form of parsing of those documents will only really lend itself to automation when the file has a rigidly maintained structure. For an Excel table for example it is easy to understand and maintain a fixed set of columns with defined meanings. Trying to do the same parsing in Word would be much harder.

    So : Given the above, it can make more sense to leverage the XGEN files for each intelligent Advisor rule document rather than the Word or Excel files themselves. The structure is XML, and lends itself to a decent parse since you have the format, the text, the type, the entity and so on in an obviously very structured file. Still, it's going to be a struggle to render the output into something readable at the other end. It depends on the use case / the why.

    But : Given that the Intelligent Advisor Hub Projects keeps a complete set of files for every version you create, is that not good enough since it is out of the box ?

    So : What is the business driver behind this? What is the benefit?

    Addendum : In the future, given that the Hub Authoring interface uses JSON based files, and is entirely Hub-based, it may become much easier to do something like this. But I have no control over that.

    Please feel free to respond.

    Richard

    Jasmine Lee-Oracle
  • User_DKTED
    User_DKTED Member Posts: 2 Green Ribbon
    edited February 16

    Thanks Richard for the swift response. I would like to get some clarification on the XGEN files, what are you referring to as the XGEN files?

    We realized this might be a somewhat complex custom solutions where we need to build something to parse and extract the business rules from Excel/Word rule files from OPM.

    A little bit of background/context: Our client target system is central repository for many of the business rules currently, there are multiple downstream applications that read the business rules in the target system to continue downstream processing (which includes a batch process). The goal is to eventually migrate the business rules from target system to OIA so business users can manage and change the rules more easily as compare to making changes to the business rules currently in the target system (as it take times and effort to update target system).

    Due to the complexities of the business rules contained within the target system, our project is planning to migrate a small subset of business rules to OIA. But this creates a set of challenges from the architectural standpoint. Because if the rules are maintained in OIA, any update and changes of the rules won't be synced to the target system, so the downstream process that utilizing the same set of business rules will not be accurate. Hence there is a requirements to sync the business rules from OIA to target system.

    I know in the newer version of the OIA, rule authors can write rules directly in the OIA hub, and you can export the business rules using REST API operation. However, the whole point for our client to adopt OIA is to be able to author business rules in Excel/Word, so authoring rules in OIA hub goes against the principles to where the OPM contains all the business rules or business rules should be within the same place.

    Hence we arrive to the situation where we need to sync the business rules from Excel/Word rule files from OPM.

  • Richard Napier
    Richard Napier Member Posts: 180 Silver Badge
    Accepted Answer

    Hi

    XGEN files can be found in the bin folder of your project, one file per document (Word or Excel):


    As mentioned previously, to get a complete picture of the project you would need more than these files (project data model xml file for example) , but they represent a handy structured version of the unstructured Word and Excel documents.

    Otherwise I fear that parsing Excel might be possible given the nature of the data, but a Word file would be a real challenge.

Sign In or Register to comment.