2 Replies Latest reply: Feb 6, 2013 12:23 PM by user394204 RSS

    Customized scripts within the Deployment Template environment

    Stéphane
      Hello,

      In the endeca documentation I see that "The sample scripts provided with the Deployment Template control the Endeca operational tasks through the EAC. You can use these scripts, or create custom scripts based on them. The scripts typically run such processes as routine baseline and partial updates. You can also add specific scripts that run before the Dgraph is stopped or after it is started."

      I would like to call a .bat before the DGraph is stopped or after it is started, but I can't find where.
      I think it's in the AppConfig.xml file, right? Could you give me an example?

      Thanks,
      Stephane
        • 1. Re: Customized scripts within the Deployment Template environment
          Brett R-Oracle
          Hi Stéphane

          Take a look at http://docs.oracle.com/cd/E29586_01/DeploymentTemplateUsageGuide.pdf , page 41 to see how to declare and define a pre-shutdown-script and post-startup-script.

          Best
          Brett
          • 2. Re: Customized scripts within the Deployment Template environment
            user394204
            1st Declare your action. Here is a sample that manually calls the set data ready flag...

            <shell id="SetDataReadyFlag" host-id="ITL_Local" >
            <command>${ENDECA_PROJECT_DIR}\control\set_baseline_data_ready_flag.bat</command>
            </shell>

            then in your custom tasks (or even the tasks that are part of the deploy template), you can call it....
            <script id="BaselineBuildDataFiles">
                 <bean-shell-script>
                 <![CDATA[
                     // Get data
                        ...
                        // Verify Data
                        ...
                        // Set endeca data ready flag
                     SetDataReadyFlag.run();
                        ...
                 ]]>
                 </bean-shell-script>
            </script>

            The only thing I don't think you can do is get a response from the external call that you make. In that case I usually have my .bat, .exe, etc Write out a result file and then I read and parse the results from that.

            Hope this helps