Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

This code template provides the source code with all attached code templates and internal logic that is added by Mirth

License

Notifications You must be signed in to change notification settings

odoodo/RuntimeSourceCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Extracts the source code of a deployed channel component from the script cache of Mirth

Purpose:
This code template provides the source code with all attached code templates and internal logic that is added by Mirth. This can be used to understand the internal working, gain an overview of the complete transformer code and of course for debugging. Line numbers are identical to the ones indicated by mirth in case of an exception.

How to use:
simply import the code template and call it in a code block. To get the source code of the current component:

var sourceCode = getSourceCode();

To get the source code with line numbers

var sourceCodeWithLineNumbers = getSourceCode(true);

How it works:
The reference to the current script is not accessible. However, when a Rhino exception is thrown, it contains the reference to the current script. Thus, an exception is provoked, the reference is read from the exception and the source code is taken from the code cache.

About

This code template provides the source code with all attached code templates and internal logic that is added by Mirth

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published