Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

 

Code Block
languagexml
<report>
    ...  
    <postReportScript>
        <macro>
            <name>file</name>
            <asIs/>
        </macro>
        <macro>
            <name>name</name>
            <script>
                <code>
                    object.getName().origgetOrig()
                </code>
            </script>
        </macro>
        <executionMethod>shell</executionMethod>
        <code>cp %file% /tmp/%name%.pdf</code>
    </postReportScript>
</report>

There are two macros defined. The first one is the file macro. It will contain the value of expression variable file. When this macro is applied to a command-line then the %file% string will be replaced by the name of the file that contains report output. Second macro is a bit more complex. This is the name macro. It takes name of the report from the report object (ReportType). The string %name% in the command-line will be replaced by the result of the macro expression, which is a name of the report.

Error reporting

The information about errors which could occur during script execution will be present in the result section of the task created for generating the script. If any such message is returned by the process error stream than it will be recorded in this section.  The amount of information on a particular error can differ with the used environment. For additional debugging the following logger can be used.

Logger nameLog level
com.evolveum.midpoint.repo.common.commandlineTRACE

 

 

Info

The report will be generated even if there is an error during the execution of the post report script.

 

See Also