Putting QAT ReFactor to Work

By Alex Barros

QAT Refactor
If you develop in AllFusion Gen like I do, I’d predict you’re often faced with the task of changing views and the associated code within action blocks.  Of course, if the views being changed are of the same type (i.e. they reference the same Work Set, Entity and Attribute), Gen provides a nice feature called Substitute View that will automatically change all the code to reference the new view.  However, if you are required to change existing code that references one view so it will reference an unlike view (i.e. a different Entity, Work Set or Attribute View), the Substitute View doesn’t help and you must manually modify every line of code.

This is a very common developer task and consumes countless hours during the development and maintenance of an application.
For example, a data model change may impact many action blocks across the model and require all references to one attribute to reference an attribute from a different entity.  Another example being when you need to copy some code or an entire action block, but the new code needs to reference a different set of views.  How about when a developer needs to make a quick change, but didn’t have the necessary protection to modify a view, so they decided to create a new view.  All these events, and many more, require us to spend too much time changing existing code to reference different views.  Of course, the task becomes even more time consuming when it affects a chain of Action Blocks and associated view matching.

QAT ReFactor is a new plug-in for AllFusion Gen that automates these time consuming developer activities. The primary function of QAT ReFactor is to change (refactor) existing code that references one view to reference any other view.  You can even select the scope of the change to include 1) A single view within an action block, 2) All views within an action block, 3) All views across an entire chain of action blocks or 4) All views across an entire model.  It also allows these changes to be applied to a local model or directly against the encyclopedia.  It even allows views to be mapped that aren’t of the same domain.  For example, it will allow code that references a numeric attribute to be changed so it references a text attribute.  Now, this always surprises people when they first hear this.  However, keep in mind that Gen will allow the domain of an attribute to be changed before the code is actually changed, which results in potentially invalid code.  In this case, the developer must manually change every line of code that references numeric functions.  The same is true when this is done with QAT ReFactor.  The developer must be aware of what’s happening so they can adjust the numeric specific code, but QAT ReFactor will save the time required to change all the other generic statements to reference the new view and this can be quite significant depending on the scope of the change (View, Action Block, Chain of Action Blocks or Entire Model).  All this happens in a very simple five step process within a single page graphical interface.

QAT ReFactor provides the straightforward process and the flexibility needed for the AllFusion Gen developer to achieve a high degree of productivity when changing or copying existing Action Diagram code. What used to be a manually intensive task can now be automated quickly so the developer can concentrate on the business requirements. The amount of time saved could range from a couple of minutes, in the case of a single Action Block, to dozens or hundreds of hours in the case of action block chains or an entire model.  It’s a highly productive tool and it eliminates so much of the mundane activities associated with coding tasks.  I hope you’ll give it a go!

QAT ReFactor

QAT ReFactor User Interface

For more information, please visit QAT ReFactor.