aolint - BAO Compensation Static Analysis, Workflow QA and cross-reference tool

Version 30

    The attached perl script, is a lint' tool for BAO modules. It will inspect a set of roar files looking for workflow that might cause compensation or other problems.


    It looks for:


    - unused context items.

    - uninitialized context items.

    - missing required parameters.

    - xml content in a string value.

    - missing/undefined processes

    - unused or undefined tokens in transforms.

    - context items with similar names (eg 'host name' and 'hostname' )

    - badly formed XML in input boxes.

    - use of transformations on process calls (not best practice)

    - use of Ad-Hoc Query and string concatenation

    - modules that are co-dependent (suggest refactoring)

    - dev studio version differences

    - check unused/unset globals


    It accelerates the testing cycle, resulting in more robust workflow.


    The Cross Reference report is useful for impact analysis reporting on module dependancy, process dependency and use of global context items.




    To run it you will need


    - perl (any platform) - on Windows I use Active Perl. 64 bit Cygwin Perl didnt seem to have all required modules available.

    - the perl XML:SAX::Expat module. (install via perl package manager 'ppm' or linux package manager or  manually from )

    - since v1.4 - the perl XML::LibXML module (install via ppm , linux package manager or from )




    perl module1.roar module2.roar ....


    or for more diagnostics...


    perl INFO module1.roar module2.roar ....


    for a cross reference of Processes and Modules


    perl XREF module1.roar module2.roar ....




    $ ./ Test.roar

    Pass 1: Check local context items ...


    module: Test.roar


    process: :Test:Assign:


           WARNING:Text might be XML ? [<string>



           ERROR  :context item [context_undefined] used but not set.assign[1]:assignment[3]


    process: :Test:SwitchTest:


           ERROR  :context item [set on case1 only] might not be initialised at assign[2]:assignment[2]

                   set at switch[1]:sequence[2]:assign[1]:assignment[2]


    process: :Test:TestCompensation:


           ERROR  :context item [b] might not be initialised at end[1]

                   set at switch[1]:sequence[2]:assign[1]:assignment[1]


    Pass 2: Check Processcalls...


           ERROR: Required parameter [two] missing calling :Test:called





    For more diagnostics use./ INFO ... or ./ XREF ...


    ps If you get a message saying ‘ParserDetails.ini’ doesn’t exist see


    pps Use at your own risk.


    Any feedback appreciated




    v1.7 - Fix HASH ref error in Cross Reference report

    v1.6 - Skip concepts (not processed), report on Configs used across modules.

    v.1.5 - Check unused or unset globals.

    v1.4b - Fix to use Perl 5.10 + avoid using (Thanks to Gordon McKeown)

    v1.4 - check directly inputted XML that contains Context or Config refs, for well formedness - uses LibXML::XML

    v1.3 - allow script to run from any folder

    v1.2 - bugfix - for-loop context item checks


    - use of '//' in stylesheets (though quite common in BAO workflow, generally not good)

    - unsused for-loop context item

    - disable-output-escaping=yes (usually wrong most of the time)

    - hide messages from certain modules but still parse them to check processes are called correctly ( -h flag).

    It can help speed up testing and be used for QA reports.