Jump to content

Using 'Perform Script on Server' to execute a script on slave computer?


HALBURN
 Share

This topic is 2840 days old. Please don't post here. Open a new topic instead.

Recommended Posts

We have a FileMaker 13 Server and a dedicated slave computer that we want to use to execute RemoteScripter tasks.

 

The slave computer is at IP address 10.1.10.169 and we have reserved port 7244.

 

Our goal is to trigger 'Perform Script on Server' scripts from FileMaker Pro and FMGO clients and then have the server send the requests to the slave computer via RemoteScripter.

 

I have upload the RemoteScripter demo file to our FileMaker 13 Server and I opened it from both the slave computer and the FileMaker Pro client that I am using to trigger the script. I have modified the demo script so it points to the slave IP address and port number. When I try to run the script it returns the following error: "The host’s capacity was exceeded, try again later."

 

Can you please provide an example script of how this is done? I can be something really simple like telling the slave computer to execute a script that creates a new record.

 

What's confusing me about the demo file and the instructions are all of the references to IWP. If I am using FMP and FMGO clients how does IWP factor into this workflow?

 

Our ultimate goal is to use the slave computer to push invoices and customer payments to QuickBooks via the FMBooks Connector plugin.

 

Thanks.

 

 

 

Here is the script that I modified:

Commit Records/Requests []
If [Demo::Are we in IWP]
    Set Field [Demo::_gMessage display[]; RemoteScripterTrigger(
"10.1.10.169" ;
"7244";
"param"
 )]
    If [Demo::_gMessage display = "ERROR"]
        Set Field [Demo::_gMessage display[]; RemoteScripterLastError]
    Else
        Set Field [Demo::Fake field[]; Get ( CurrentTimeStamp )
        Commit Records/Requests []
    End If
Else
    Perform Script ["Generate PDF"]
End If

I just noticed that the script is not running on the server and I am unable to enable it.

 

15858709264_b5c48f2627_o.png

Link to comment
Share on other sites

Another option could be to create a queue table in the DB, and create records for every invoice you want pushed into QB. Then the slave computer can simply run a looping script that checks the queue every 5 minutes (or however often you like) and export the invoices to QB?

Link to comment
Share on other sites

Another option could be to create a queue table in the DB, and create records for every invoice you want pushed into QB. Then the slave computer can simply run a looping script that checks the queue every 5 minutes (or however often you like) and export the invoices to QB?

 

Thanks for the suggestion but the entire reason for using RemoteScripter was push the record immediately and to avoid having to use a script on a repeating timer.

Link to comment
Share on other sites

I just noticed that the script is not running on the server and I am unable to enable it.

 

15858709264_b5c48f2627_o.png

 

You mean the plugin, not the script.

That would be the first thing to fix.  Make sure you have the right version of the plugin, it has to be 64-bit.

 

The script that you posted, is that the script that you run through PSoS or the script that you want to have run on the robot machine?

Link to comment
Share on other sites

The .fmplugin file for OS X contains both 32 bit and 64 bit versions, so you should be good in that regard. However, our plugins do require a 32 bit version of Java, which unfortunately isn't provided by Oracle. The only available 32 bit version of Java for OS X is Apple-provided at http://support.apple.com/kb/DL1572. If you install that version of Java and restart your FMSE, your plug in should load. I suspect this failure to load the plugin is problem also causing your "host capacity is exceeded" message, which in my experience, typically indicates that the FMSE has crashed in this situation (likely due to the failure to load the plugin).

 

Regarding the references to IWP in the docs, RemoteScripter is often used to trigger a script on a slave machine from IWP, CWP, or WebDirect. Your use case of triggering it from a PSoS should work fine, although you may also be able to trigger the slave machine directly from your FMPro clients, unless there's a particular reason you'd like to do it from FMS

Link to comment
Share on other sites

  • 2 weeks later...

The .fmplugin file for OS X contains both 32 bit and 64 bit versions, so you should be good in that regard. However, our plugins do require a 32 bit version of Java, which unfortunately isn't provided by Oracle. The only available 32 bit version of Java for OS X is Apple-provided at http://support.apple.com/kb/DL1572. If you install that version of Java and restart your FMSE, your plug in should load. I suspect this failure to load the plugin is problem also causing your "host capacity is exceeded" message, which in my experience, typically indicates that the FMSE has crashed in this situation (likely due to the failure to load the plugin).

 

Regarding the references to IWP in the docs, RemoteScripter is often used to trigger a script on a slave machine from IWP, CWP, or WebDirect. Your use case of triggering it from a PSoS should work fine, although you may also be able to trigger the slave machine directly from your FMPro clients, unless there's a particular reason you'd like to do it from FMS

 

Thanks. Updating to the Java version provided by Apple resolved the problem.

You mean the plugin, not the script.

That would be the first thing to fix.  Make sure you have the right version of the plugin, it has to be 64-bit.

 

The script that you posted, is that the script that you run through PSoS or the script that you want to have run on the robot machine?

 

 Thanks Wim. Yes, I meant to say 'Plugin'. We had the 64bit version of the plugin installed but we did not have the correct version of Java installed.

Link to comment
Share on other sites

This topic is 2840 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.