0 Replies Latest reply on Nov 26, 2014 7:17 PM by MarkSmith_FDM

    CalcMgrCmdLineLauncher.cmd - FDM cannot launch Planning rules after Load

    MarkSmith_FDM

      We are on FDM 11.1.2.1 and we are using FDM to load data to Planning.


      We have a batch file that FDM kicks off after the Load (part of aftload event script) that calls the CalcMgrCmdLineLauncher to launch Planning calculations (Planning utilities are installed on the FDM server to accomodate this).

       

      When the batch file is run by FDM as part of the AftLoad event script, the CalcMgr launches, then begins to run the Business Rule in Planning, while writing to a log file on the FDM server.

       

      A ups and java process (for calcmgr) start up, but the JAVA PROCESS IMMEDIATELY HANGS AND THE PLANNING BUSINESS RULES DON'T LAUNCH.   

       

      This process worked fine for a few months but suddenly stopped working a little while back.     ALSO, the script runs fine in our TEST environment.

       

      We checked all the environment variables on the FDM server and they all seem correct.

       

      A strange thing is that we can run run the batch file manually and everything works fine (runs all run successfully).   The HBRs just hang up when FDM launches the batch file, OR when we try to run the batch file via Windows Scheduler.    In otherwords we double click the batch fiel and it runs.  We run it automatically and its starts to run then hangs.

       

      Do anyone know what might cause the Calc Mgr Calculations to fail when launched via the FDM aftload script ?    Could it be an issue with how the Planning utilites are installed on this server (but then why would it work fine when we launch the batch file manually? 

       

      Below  is an AftLoad script that creates the batch file on the fly (to specify calcs to be run based on the data that was just loaded), then executes the batch file.    When this is done, the CalcMgrCmdLineLauncher begins to execute, then immediately fails while trying to run the first business rule.

      brbatscript="Call " & VarCmdLaunchDir & "CalcMgrCmdLineLauncher.cmd -f:" & VarConnDir & "adminpass.txt /A:" & EssAppName & " /U:custadmin /D:" & EssDbName & " /R:" & Chr(34) & strBR_NAME & Chr(34) & " /F:" & Chr(34) & tempbrxmlstrpath & Chr(34)

       

      Example of BATCH FILE that is created and run:

      Call D:\pdlph7\Hyperion\user_projects\epmsystem_vmhoddlphp11\Planning\planning1\CalcMgrCmdLineLauncher.cmd

      -f:D:\FDMCon\adminpass.txt /A:FPAREL1 /U:custadmin /D:FPAREL1 /R:"FPAREL1_Aggregate_Actual_E" /F:"D:\pdlph7\custom\FDMApps\FFPAREL1\Outbox\Logs\ELIM_OUTBOUND_WORKING_HFMACT_FPAREL1_Aggregate_Actual_E_7.xml">>D:\pdlph7\custom\FDMApps\FFPAREL1\Outbox\Logs\HBR_ELIM_OUTBOUND_WORKING_HFMACT_1017174348.log

       

      Example of AftLoad script that creates the batch file and executes it.

      'Creates a brxml files which will be used in the execution of Business Rules

          objTextStream.write Now() & " Creating HBR xml file and writing the runtime prompts to the xml file" & Chr(13) & Chr(10)

                tempbrxmlfile=strFDM_LOC & "_" & strFDM_PER & "_" & strFDM_CAT & "_" & strBR_NAME & "_" & strBR_ORDER & ".xml"

                 

            tempbrxmlstrpath=strpath & tempbrxmlfile

          Set fbrxml=fso.CreateTextFile(tempbrxmlstrpath,True)

          fbrxml.Writeline strRTPS_NAME_N_VALUE

          fbrxml.Close

          objTextStream.write Now() & " Creating a HBR bat file with HBR and RTP for execution." & Chr(13) & Chr(10)

          fbrbat.writeline " " & Chr(13)

          If (strBR_ORDER = "1") Then

          'RK Added on 10/17/2014

          brbatscript="D:" & Chr(13) & Chr(10)

        brbatscript=brbatscript & "cd %1"

        fbrbat.writeline brbatscript

          'RK commented on 10/17/2014

                     'brbatscript="Call " & VarCmdLaunchDir & "CalcMgrCmdLineLauncher.cmd -f:" & VarConnDir & "adminpass.txt /A:" & EssAppName & " /U:custadmin /D:" & EssDbName & " /R:" & Chr(34) & strBR_NAME & Chr(34) & " /F:" & Chr(34) & tempbrxmlstrpath & Chr(34) & ">" & brlogfile

                     brbatscript="Call " & VarCmdLaunchDir & "CalcMgrCmdLineLauncher.cmd -f:" & VarConnDir & "adminpass.txt /A:" & EssAppName & " /U:custadmin /D:" & EssDbName & " /R:" & Chr(34) & strBR_NAME & Chr(34) & " /F:" & Chr(34) & tempbrxmlstrpath & Chr(34)

                    'brbatscript="Call " & VarCmdLaunchDir & "CalcMgrCmdLineLauncher.cmd -f:D:\FDMCon\adminpass.txt /A:" & EssAppName & " /U:custadmin /D:" & EssDbName & " /R:" & Chr(34) & strBR_NAME & Chr(34) & " /F:" & Chr(34) & tempbrxmlstrpath & Chr(34)

                    fbrbat.writeline brbatscript & Chr(13)

                 

                  Else

                  'brbatscript="Call " & VarCmdLaunchDir & "CalcMgrCmdLineLauncher.cmd -f:D:\FDMCon\adminpass.txt /A:" & EssAppName & " /U:custadmin /D:" & EssDbName & " /R:" & Chr(34) & strBR_NAME & Chr(34) & " /F:" & Chr(34) & tempbrxmlstrpath & Chr(34)

                  'RK commented on 10/17/2014

                  'brbatscript="Call " & VarCmdLaunchDir & "CalcMgrCmdLineLauncher.cmd -f:" & VarConnDir & "adminpass.txt /A:" & EssAppName & " /U:custadmin /D:" & EssDbName & " /R:" & Chr(34) & strBR_NAME & Chr(34) & " /F:" & Chr(34) & tempbrxmlstrpath & Chr(34) & ">>" & brlogfile

                  brbatscript="Call " & VarCmdLaunchDir & "CalcMgrCmdLineLauncher.cmd -f:" & VarConnDir & "adminpass.txt /A:" & EssAppName & " /U:custadmin /D:" & EssDbName & " /R:" & Chr(34) & strBR_NAME & Chr(34) & " /F:" & Chr(34) & tempbrxmlstrpath & Chr(34)

                  fbrbat.writeline brbatscript

              End If

                  'MA End If

            rs.MoveNext()

          Loop

        End If

        fbrbat.close

        rs.close

       

        Set wsshell=CreateObject("wscript.shell")

        objTextStream.write Now() & " Running HBR " & brbatfile  & "bat file with HBR and RTP for execution." & Chr(13) & Chr(10)

          errtrap=wsshell.run(brbatfile,1,True)

          'of the batch file not hbr

       

          If (errTrap = 0) Then

                objTextStream.write Now() & " brbatfile " & " ran sucessfully " & errtrap & Chr(13) & Chr(10)

                strMsg="Calculations ran sucessfully!"

      ' objR.intResult = RES.FDMTrue

      '     objR.blnIsErr = RES.FDMTrue

      ' objR.strErrDesc = "HBR's ran sucessfully!"

      ' objR.lngErrCode = 0