Code Template Contexts
Similar to how a code template library can be included only on specific channels, code templates can further be isolated to specific scripts. This can be helpful for ensuring that there are no conflicts between function names, and also for better memory usage, since not all code templates need to be compiled in with all scripts across your entire server. The script contexts are organized into groups, allowing you to easily include a code template in, for example, all global scripts, in a single select. The following groups are displayed:
- Global Scripts: The global deploy/undeploy/preprocessor/postprocessor scripts, not specific to any particular channel. For additional information, see Edit Global Scripts View.
- Channel Scripts: The channel-level deploy/undeploy/preprocessor/postprocessor scripts (more info here) , as well as the JavaScript Attachment Handler and JavaScript Batch Adapter (for additional information, see Data Types) .
- Source Connector: The source filter/transformer script, and any script associated with the source connector. Examples of this include the JavaScript Reader, Database Reader (in JavaScript mode), and the JavaScript HTTP Authentication script.
- Destination Connector: The destination filter/transformer script, the response transformer, and any script associated with the destination connector. Examples of this include the JavaScript Writer and Database Writer (in JavaScript mode).