Solved

What is the use of multiple templates within a control procedure?

  • 13 November 2020
  • 3 replies
  • 76 views

Userlevel 3
Badge +5

I always thought that there could be one template to a control procedure, but just saw that it actually is possible to have more than one template to a control procedure.
Hope that someone tell me why they use multiple templates within the same control procedure. I'd like to know the advantages of using multiple templates.

icon

Best answer by Erwin Ekkel 13 November 2020, 12:04

View original

This topic has been closed for comments

3 replies

Userlevel 6
Badge +16

This can be used if you have the same objects but you need some templates only in a certain object. Example: If you have insert/update and delete trigger on a table you can have template A, B and C. 

Update trigger has template A + B

Insert trigger has template   B + C

delete trigger has template  C

Now you need only 1 proc to house all the templates and you assign the necessary templates to the objects. Instead of 3 procs that you assign to multiple objects. 

One advantage is that you have all available templates in the same control proc. Otherwise you would have to switch between control procs. And you can keep the naming more object focused something like triggers_table_A instead of trigger_check_for_duplicates. Making the search for the template to amend easier. 

It's like you said it adds more structure if done correctly. 

Userlevel 5
Badge +12

I also discovered this way late. I did merge all my seperate procs to one, and made different templates.

Not sure if this is better technically. However, is creates a lot more structure/overview.

 

 

Userlevel 3
Badge +5

Thank you Blommetje & Erwin,

Thanks to your replies, I'm starting to use this feature more often. For instance with process flows. Instead of having each task/process in its own control procedure I now have just one control procedure (or two if I have both tasks and processes) with all associated templates. This is much easier to keep them organized, plus I can generate and deploy them at the same time.