Toad World® Forums

TDP Inheritance and Code Reusability

We've been using TDP for a few years and our workflow would be greatly improved if there was some degree of inheritance between objs so that we could create things once and not have to duplicate them, rather augment portions of them. Most of our automation processes have to be duplicated to create different versions and while we do link most sql scripts there are times when we can't and have to copy a script.

Just wondering if we're missing any features that would improve our workflow such as passing parameters to an automation script or passing parameters to a chain of run automation script objs within a master script. We already use parameters within the scripts, but ideally the ability to build a process and schedule it with external parameters would be ideal.

Maybe this already is possible and we just need to know where to find the documentation.

1 Like

Very good point! I was also asking for support to pass input parameters to our workflows to make them generic enough, driven by parameters, etc. I have hundreds of reports that follow the same, identical logical workflow but because I can't use input parameters (and can't refer to external SQL files by parameters, instead you have to pick the file specifically which now is hardcoded in your workflow) I now have to create hundreds of identical workflows instead of one generic workflow just because I need to hardcode some values which could have been easily passed in as parameters. I could definitely see the value of inheritance for workflows so, I'm hoping that Quest is considering and implementing your idea soon!

1 Like

Have you looked at Setting/passing variables into your scripts? Whether you would like to be prompted for those input parm values at runtime, or take them from an input file or database table, throwing in a "Set Variables" task up front will likely get you closer to your end goal.

In the example below, I define a group of variables in the first "Set Variables" task. Although you can't see it, the "Loop Data" task reads in values from a (Excel) input file, and iterates through each row, assigning some of the row's values to each of my variables. Those variables modify a report query that's different for each row of input processed. The result is that I can generate literally hundreds of data results/reports, and even have them sent via e-mail to different users... all in the same workflow.

BTW, the "Run Automation Script" task allows you to call other Toad Automation workflows within a parent workflow, and there's no reason why you can't use variables from the parent workflow to called workflows. Hope this helps.

1 Like

I see your point. Externalize the input params using a file that can be changed between uses. I'll have to see if that would satisfy some of our situations for now. Thanks.