2 Replies Latest reply on Jun 30, 2011 2:50 PM by tse020673

    Newbie custom agent question

    Ozpeng

      I have inherited systems with Adone Central Output Server 5.5.

       

      I have searched the forum and cannot find anything that seems to help so now I will ask.

       

      I need to create a custom agent to read data and change the @user1 parameter with a value for a logo to use.

       

      My first job is to create a simple custom agent that does little or nothing so I can understand how to create a custom agent. Here is what I have got so far.

       

      jfserver.ini

       

      [Processes]

      ARW_TEST=A test routine

       

      [ARW_TEST]
      ExePath=C:\Adobe\Central\Bin
      IniFileName=C:\Adobe\Central\Server\trapped.ini

       

       

      jfserver.jmd

       

      !f ERApartsinv_RPT * * * 1 T ARW_TEST * * C *

       

      !x ARW_TEST * trapped.bat """@InFile.""" "Test to see what data it is dealing with."

       

      (obviously there is lot more entries but these are the only ones that are concerned with the custom agent and the custom agent is the only thing being used for this job)

       

       

      trapped.bat

       

      @echo off
      echo %~dpnx %1 > trappedbat.out
      echo %1 >> trappedbat.out
      echo ^field status > jetform.rsp
      echo 0 >> jetform.rsp
      echo ^field message >> jetform.rsp
      exit /B 0

       

       

      When I submit a job for this I get an error

      [313]*** Spawn of agent may have failed ***
      2010/10/20 10:55:42 C:\Adobe\Central\Bin\jfserver.exe: [306]Processing file 'PartsInvoice.dat', '^JOB ERApartsinv_RPT -zSPGP1FM'.
      2010/10/20 10:55:42 C:\Adobe\Central\Bin\jfserver.exe: [307]Launching task '"trapped.bat" "C:\Adobe\Central\Server\Data\PartsInvoice.dat"'.
      2010/10/20 10:55:42 C:\Adobe\Central\Bin\jfserver.exe: [314]Agent exit message: [313]*** Spawn of agent may have failed ***

       

      The batch file runs without a problem from command line. Any ideas? Where and what do I look at next?

       

      Thanks.

        • 1. Re: Newbie custom agent question
          Ozpeng Level 1

          And after all of that I put the old broken bat file for you to look at. Try this one;

           

          @echo off
          echo %1 > trappedbat.out
          echo ^field status > jetform.rsp
          echo 0 >> jetform.rsp
          echo ^field message >> jetform.rsp
          exit /B 0

           

          Thanks.

          • 2. Re: Newbie custom agent question
            tse020673

            Maybe you already figured it out...but...

             

            I could be wrong, but I don't think you can fire a batch file from Central.


            Another developer and I have developed TONS of custom agents for Central Server; we've created .EXE's using VB6 and now VB.NET.  I would recommend creating a small EXE that opens the .DAT file and adds some text to it.  You don't necessarily need an INI file, either.