Build Automated Code Review Tool for Appian Application

Hi Team,

I know Appian covering most of best practices in Heath Check Report itself.

If I want to develop automated code review tool,I have do depend on XML files of downloaded patch/Zip of Application.

Could you please clarify below questions:

are XML files following standard structure?
XML structures will change based on version of Appian?
is there any other best way i can automate best practices of application?

Thanks in Advance,
Ramanji

  Discussion posts and replies are publicly visible

  • 0
    Certified Lead Developer

    Appian has started to do this, but work is still being done.

    The problem with the XML files is that they are practically incomprehensible, regardless of version.

    To answer your questions:

    1.  All XML has to follow standard structure to be well-formed or it can't be processed by a parser.

    2.  I don't know the structure of the XML to change in any really significant ways based on version, but I think you'll find the very minor differences more problematic anyway.

    3.  You would need a way to examine expression language code well enough to determine that the best practices weren't being followed.  First, you'd have to convert the expression language to text.  You'd have to find a way to parse the names of all objects into text to evaluate them against naming conventions.  You'd need a way to convert process models into something that could understand and evaluate whether best practices were followed.  How?  For years almost the entire Appian product was a thing that could understand a process model and what the developer who drew it intended by it.  However you slice it, any of these would be really, really, really, really hard.  Appian has been working on this for years, and it may be years before they're done if they ever are.  Really, really, really, really, really, really, really, really hard, regardless of platform or language, which is why absolutely NONE I can think of have ever done it.  Like the kind of thing people get Nobel Prizes for hard!

    Also, keep in mind that not all best practices are BEST practices.  Many mutually exclusive things claim to be best practices, so which among them is really the best?  Do we even know?  Can we know?  Maybe, when we say "best practices", we really mean is "how I like to run things." If you go through all the effort, the insane possibly years long effort, to automate your "best practices", what happens if they change as soon as you're done?

    My real advice:  Don't automate.  Hold developers accountable for not following best practices.  Make them do it intentionally; make them think about best practices and do them deliberately.  Automation would make your developers not think.

  • I've been looking at exactly this for a little while now. I think there's likely an 80:20 rule here, where 80% of the standards could be automated,leaving 20% to be "eye-balled" through a Peer-Review process. Some really simple examples would be: 

    1. objects should follow a naming convention e.g. start with the Project Prefix
    2. CDTs should have the correct namespace
    3. Security should be set of an object (it may not be correct, but it shouldn't be absent!!)

    I sympathise with the accountability statement, but let's not NOT use automation when it would save a lot of dull and tedious reviewing of the code.

  • 0
    Certified Lead Developer
    in reply to Stewart Burchell

    Another key point is that I wouldn't want to spend years duplicating Appian Corporation's own efforts needlessly.

    I know, for instance, you've already implemented automation of the third standard you mention.

  • Hello,

    There is a tool with the same functionality has been developed by Incessant Technologies. Please refer below link for the same.

    https://community.appian.com/b/appmarket/posts/virtual-application-review

    Thanks,

    Shiva