|
View:
New views
9 Messages
—
Rating Filter:
Alert me
|
|
|
JESS: How to load a rule file in a remote RMI client.Hello, I am trying to integrate Jess with JavaSpace(RMI). Tasks(running rete.batch("rule.clp")) put into a JavaSpace got following exception on the remote machine: Jess reported an error in routine batch. Message: Cannot open file. at jess.Batch.findDocument(Batch.java:221) at jess.Batch.batch(Batch.java:122) at jess.Batch.batch(Batch.java:113) at jess.Batch.batch(Batch.java:75) at jess.Batch.batch(Batch.java:40) at jess.Rete.batch(Rete.java:2791) What are the options here to pass the rules file to remote rete engine? Thanks a lot, Andrew -- View this message in context: http://www.nabble.com/How-to-load-a-rule-file-in-a-remote-RMI-client.-tp25952603p25952603.html Sent from the Jess mailing list archive at Nabble.com. -------------------------------------------------------------------- To unsubscribe, send the words 'unsubscribe jess-users you@...' in the BODY of a message to majordomo@..., NOT to the list (use your own address!) List problems? Notify owner-jess-users@.... -------------------------------------------------------------------- |
|
|
|
|
|
|
|
|
RE: JESS: How to load a rule file in a remote RMI client.Thanks a lot for the quick reply! As a workaround, I did copy the xxx.clp over to the remote machine. However I want to make a generic remote worker who just takes a task from JavaSpace and execute task.execute(). My task is like: class task{ ... public Object execute(){ ... engine.batch("xxx.clp"); if (engine.run() > 1) { does something and return} } } Yes, I can read the xxx.clp into a string as a part of the task object which will be serialized to the remote host by RMI. After reading Jesp API and JIA book, I still could not figure out the Jesp syntax to do what I want to do. Can you please elaborate more? Thanks a lot, Andrew > From: ejfried@... > To: jess-users@... > Subject: Re: JESS: How to load a rule file in a remote RMI client. > Date: Fri, 23 Oct 2009 20:46:09 -0400 > > If you want a process on a remote machine to open a file by name, then > of course you'd need to transmit the file. But you can instead read > the file into a String and send the String around; then use a > StringReader and the jess.Jesp class to run the code on the remote > machines (see the Jess manual on how to use jess.Jesp to parse Jess > code.) > > > On Oct 18, 2009, at 10:41 PM, ameng wrote: > > > > > Hello, > > > > I am trying to integrate Jess with JavaSpace(RMI). Tasks(running > > rete.batch("rule.clp")) put into a JavaSpace got following > > exception on > > the remote machine: > > > > Jess reported an error in routine batch. > > Message: Cannot open file. > > at jess.Batch.findDocument(Batch.java:221) > > at jess.Batch.batch(Batch.java:122) > > at jess.Batch.batch(Batch.java:113) > > at jess.Batch.batch(Batch.java:75) > > at jess.Batch.batch(Batch.java:40) > > at jess.Rete.batch(Rete.java:2791) > > > > What are the options here to pass the rules file to remote rete > > engine? > > > > Thanks a lot, > > Andrew > > -- > > View this message in context: http://www.nabble.com/How-to-load-a-rule-file-in-a-remote-RMI-client.-tp25952603p25952603.html > > Sent from the Jess mailing list archive at Nabble.com. > > > > > > > > -------------------------------------------------------------------- > > To unsubscribe, send the words 'unsubscribe jess-users > > you@...' > > in the BODY of a message to majordomo@..., NOT to the list > > (use your own address!) List problems? Notify owner-jess-users@... > > . > > -------------------------------------------------------------------- > > --------------------------------------------------------- > Ernest Friedman-Hill > Informatics & Decision Sciences, Sandia National Laboratories > PO Box 969, MS 9012, Livermore, CA 94550 > http://www.jessrules.com > > > > > > > > -------------------------------------------------------------------- > To unsubscribe, send the words 'unsubscribe jess-users you@...' > in the BODY of a message to majordomo@..., NOT to the list > (use your own address!) List problems? Notify owner-jess-users@... |
|
|
Re: JESS: How to load a rule file in a remote RMI client.It's very easy. See
http://www.jessrules.com/jess/docs/71/library.html#jess.Jesp Follow the first example, but use a StringReader instead of the FileReader. On Oct 23, 2009, at 10:28 PM, Andrew Meng wrote: > > Thanks a lot for the quick reply! > > As a workaround, I did copy the xxx.clp over to the remote machine. > > > > However I want to make a generic remote worker who just takes a task > from JavaSpace and execute task.execute(). My task is like: > > > > class task{ > > ... > > public Object execute(){ > > ... > > engine.batch("xxx.clp"); > > if (engine.run() > 1) { does something and return} > > } > > } > > > Yes, I can read the xxx.clp into a string as a part of the task > object which will be serialized to the remote host by RMI. After > reading Jesp API and JIA book, I still could not figure out the Jesp > syntax to do what I want to do. > > > > Can you please elaborate more? > > > > Thanks a lot, > > Andrew > > >> From: ejfried@... >> To: jess-users@... >> Subject: Re: JESS: How to load a rule file in a remote RMI client. >> Date: Fri, 23 Oct 2009 20:46:09 -0400 >> >> If you want a process on a remote machine to open a file by name, >> then >> of course you'd need to transmit the file. But you can instead read >> the file into a String and send the String around; then use a >> StringReader and the jess.Jesp class to run the code on the remote >> machines (see the Jess manual on how to use jess.Jesp to parse Jess >> code.) >> >> >> On Oct 18, 2009, at 10:41 PM, ameng wrote: >> >>> >>> Hello, >>> >>> I am trying to integrate Jess with JavaSpace(RMI). Tasks(running >>> rete.batch("rule.clp")) put into a JavaSpace got following >>> exception on >>> the remote machine: >>> >>> Jess reported an error in routine batch. >>> Message: Cannot open file. >>> at jess.Batch.findDocument(Batch.java:221) >>> at jess.Batch.batch(Batch.java:122) >>> at jess.Batch.batch(Batch.java:113) >>> at jess.Batch.batch(Batch.java:75) >>> at jess.Batch.batch(Batch.java:40) >>> at jess.Rete.batch(Rete.java:2791) >>> >>> What are the options here to pass the rules file to remote rete >>> engine? >>> >>> Thanks a lot, >>> Andrew >>> -- >>> View this message in context: http://www.nabble.com/How-to-load-a-rule-file-in-a-remote-RMI-client.-tp25952603p25952603.html >>> Sent from the Jess mailing list archive at Nabble.com. >>> >>> >>> >>> -------------------------------------------------------------------- >>> To unsubscribe, send the words 'unsubscribe jess-users >>> you@...' >>> in the BODY of a message to majordomo@..., NOT to the list >>> (use your own address!) List problems? Notify owner-jess-users@... >>> . >>> -------------------------------------------------------------------- >> >> --------------------------------------------------------- >> Ernest Friedman-Hill >> Informatics & Decision Sciences, Sandia National Laboratories >> PO Box 969, MS 9012, Livermore, CA 94550 >> http://www.jessrules.com >> >> >> >> >> >> >> >> -------------------------------------------------------------------- >> To unsubscribe, send the words 'unsubscribe jess-users you@... >> ' >> in the BODY of a message to majordomo@..., NOT to the list >> (use your own address!) List problems? Notify owner-jess-users@... --------------------------------------------------------- Ernest Friedman-Hill Informatics & Decision Sciences, Sandia National Laboratories PO Box 969, MS 9012, Livermore, CA 94550 http://www.jessrules.com -------------------------------------------------------------------- To unsubscribe, send the words 'unsubscribe jess-users you@...' in the BODY of a message to majordomo@..., NOT to the list (use your own address!) List problems? Notify owner-jess-users@.... -------------------------------------------------------------------- |
|
|
RE: JESS: How to load a rule file in a remote RMI client.but the document says "Instances of Jesp are not serializable, as they hold a reference to a Reader." Therefore RMI can not serialize it to the remote host. And after run paser.parse(false), how do I get the result of engine.run(the number of rules fired)? Thanks, Andrew > From: ejfried@... > To: jess-users@... > Subject: Re: JESS: How to load a rule file in a remote RMI client. > Date: Fri, 23 Oct 2009 23:20:07 -0400 > > It's very easy. See > > http://www.jessrules.com/jess/docs/71/library.html#jess.Jesp > > Follow the first example, but use a StringReader instead of the > FileReader. > > > On Oct 23, 2009, at 10:28 PM, Andrew Meng wrote: > > > > > Thanks a lot for the quick reply! > > > > As a workaround, I did copy the xxx.clp over to the remote machine. > > > > > > > > However I want to make a generic remote worker who just takes a task > > from JavaSpace and execute task.execute(). My task is like: > > > > > > > > class task{ > > > > ... > > > > public Object execute(){ > > > > ... > > > > engine.batch("xxx.clp"); > > > > if (engine.run() > 1) { does something and return} > > > > } > > > > } > > > > > > Yes, I can read the xxx.clp into a string as a part of the task > > object which will be serialized to the remote host by RMI. After > > reading Jesp API and JIA book, I still could not figure out the Jesp > > syntax to do what I want to do. > > > > > > > > Can you please elaborate more? > > > > > > > > Thanks a lot, > > > > Andrew > > > > > >> From: ejfried@... > >> To: jess-users@... > >> Subject: Re: JESS: How to load a rule file in a remote RMI client. > >> Date: Fri, 23 Oct 2009 20:46:09 -0400 > >> > >> If you want a process on a remote machine to open a file by name, > >> then > >> of course you'd need to transmit the file. But you can instead read > >> the file into a String and send the String around; then use a > >> StringReader and the jess.Jesp class to run the code on the remote > >> machines (see the Jess manual on how to use jess.Jesp to parse Jess > >> code.) > >> > >> > >> On Oct 18, 2009, at 10:41 PM, ameng wrote: > >> > >>> > >>> Hello, > >>> > >>> I am trying to integrate Jess with JavaSpace(RMI). Tasks(running > >>> rete.batch("rule.clp")) put into a JavaSpace got following > >>> exception on > >>> the remote machine: > >>> > >>> Jess reported an error in routine batch. > >>> Message: Cannot open file. > >>> at jess.Batch.findDocument(Batch.java:221) > >>> at jess.Batch.batch(Batch.java:122) > >>> at jess.Batch.batch(Batch.java:113) > >>> at jess.Batch.batch(Batch.java:75) > >>> at jess.Batch.batch(Batch.java:40) > >>> at jess.Rete.batch(Rete.java:2791) > >>> > >>> What are the options here to pass the rules file to remote rete > >>> engine? > >>> > >>> Thanks a lot, > >>> Andrew > >>> -- > >>> View this message in context: http://www.nabble.com/How-to-load-a-rule-file-in-a-remote-RMI-client.-tp25952603p25952603.html > >>> Sent from the Jess mailing list archive at Nabble.com. > >>> > >>> > >>> > >>> -------------------------------------------------------------------- > >>> To unsubscribe, send the words 'unsubscribe jess-users > >>> you@...' > >>> in the BODY of a message to majordomo@..., NOT to the list > >>> (use your own address!) List problems? Notify owner-jess-users@... > >>> . > >>> -------------------------------------------------------------------- > >> > >> --------------------------------------------------------- > >> Ernest Friedman-Hill > >> Informatics & Decision Sciences, Sandia National Laboratories > >> PO Box 969, MS 9012, Livermore, CA 94550 > >> http://www.jessrules.com > >> > >> > >> > >> > >> > >> > >> > >> -------------------------------------------------------------------- > >> To unsubscribe, send the words 'unsubscribe jess-users you@... > >> ' > >> in the BODY of a message to majordomo@..., NOT to the list > >> (use your own address!) List problems? Notify owner-jess-users@... > > --------------------------------------------------------- > Ernest Friedman-Hill > Informatics & Decision Sciences, Sandia National Laboratories > PO Box 969, MS 9012, Livermore, CA 94550 > http://www.jessrules.com > > > > > > > > -------------------------------------------------------------------- > To unsubscribe, send the words 'unsubscribe jess-users you@...' > in the BODY of a message to majordomo@..., NOT to the list > (use your own address!) List problems? Notify owner-jess-users@... |
|
|
Re: JESS: How to load a rule file in a remote RMI client.You want to send the file contents as a String to the remote host, and
let the remote host parse it and run it. On Oct 24, 2009, at 12:01 AM, Andrew Meng wrote: > > but the document says "Instances of Jesp are not serializable, as > they hold a reference to a Reader." Therefore RMI can not serialize > it to the remote host. > > > > And after run paser.parse(false), how do I get the result of > engine.run(the number of rules fired)? > > > > Thanks, > > Andrew > > > > > > > >> From: ejfried@... >> To: jess-users@... >> Subject: Re: JESS: How to load a rule file in a remote RMI client. >> Date: Fri, 23 Oct 2009 23:20:07 -0400 >> >> It's very easy. See >> >> http://www.jessrules.com/jess/docs/71/library.html#jess.Jesp >> >> Follow the first example, but use a StringReader instead of the >> FileReader. >> >> >> On Oct 23, 2009, at 10:28 PM, Andrew Meng wrote: >> >>> >>> Thanks a lot for the quick reply! >>> >>> As a workaround, I did copy the xxx.clp over to the remote machine. >>> >>> >>> >>> However I want to make a generic remote worker who just takes a task >>> from JavaSpace and execute task.execute(). My task is like: >>> >>> >>> >>> class task{ >>> >>> ... >>> >>> public Object execute(){ >>> >>> ... >>> >>> engine.batch("xxx.clp"); >>> >>> if (engine.run() > 1) { does something and return} >>> >>> } >>> >>> } >>> >>> >>> Yes, I can read the xxx.clp into a string as a part of the task >>> object which will be serialized to the remote host by RMI. After >>> reading Jesp API and JIA book, I still could not figure out the Jesp >>> syntax to do what I want to do. >>> >>> >>> >>> Can you please elaborate more? >>> >>> >>> >>> Thanks a lot, >>> >>> Andrew >>> >>> >>>> From: ejfried@... >>>> To: jess-users@... >>>> Subject: Re: JESS: How to load a rule file in a remote RMI client. >>>> Date: Fri, 23 Oct 2009 20:46:09 -0400 >>>> >>>> If you want a process on a remote machine to open a file by name, >>>> then >>>> of course you'd need to transmit the file. But you can instead read >>>> the file into a String and send the String around; then use a >>>> StringReader and the jess.Jesp class to run the code on the remote >>>> machines (see the Jess manual on how to use jess.Jesp to parse Jess >>>> code.) >>>> >>>> >>>> On Oct 18, 2009, at 10:41 PM, ameng wrote: >>>> >>>>> >>>>> Hello, >>>>> >>>>> I am trying to integrate Jess with JavaSpace(RMI). Tasks(running >>>>> rete.batch("rule.clp")) put into a JavaSpace got following >>>>> exception on >>>>> the remote machine: >>>>> >>>>> Jess reported an error in routine batch. >>>>> Message: Cannot open file. >>>>> at jess.Batch.findDocument(Batch.java:221) >>>>> at jess.Batch.batch(Batch.java:122) >>>>> at jess.Batch.batch(Batch.java:113) >>>>> at jess.Batch.batch(Batch.java:75) >>>>> at jess.Batch.batch(Batch.java:40) >>>>> at jess.Rete.batch(Rete.java:2791) >>>>> >>>>> What are the options here to pass the rules file to remote rete >>>>> engine? >>>>> >>>>> Thanks a lot, >>>>> Andrew >>>>> -- >>>>> View this message in context: http://www.nabble.com/How-to-load-a-rule-file-in-a-remote-RMI-client.-tp25952603p25952603.html >>>>> Sent from the Jess mailing list archive at Nabble.com. >>>>> >>>>> >>>>> >>>>> -------------------------------------------------------------------- >>>>> To unsubscribe, send the words 'unsubscribe jess-users >>>>> you@...' >>>>> in the BODY of a message to majordomo@..., NOT to the list >>>>> (use your own address!) List problems? Notify owner-jess-users@... >>>>> . >>>>> -------------------------------------------------------------------- >>>> >>>> --------------------------------------------------------- >>>> Ernest Friedman-Hill >>>> Informatics & Decision Sciences, Sandia National Laboratories >>>> PO Box 969, MS 9012, Livermore, CA 94550 >>>> http://www.jessrules.com >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> -------------------------------------------------------------------- >>>> To unsubscribe, send the words 'unsubscribe jess-users you@... >>>> ' >>>> in the BODY of a message to majordomo@..., NOT to the list >>>> (use your own address!) List problems? Notify owner-jess-users@... >> >> --------------------------------------------------------- >> Ernest Friedman-Hill >> Informatics & Decision Sciences, Sandia National Laboratories >> PO Box 969, MS 9012, Livermore, CA 94550 >> http://www.jessrules.com >> >> >> >> >> >> >> >> -------------------------------------------------------------------- >> To unsubscribe, send the words 'unsubscribe jess-users you@... >> ' >> in the BODY of a message to majordomo@..., NOT to the list >> (use your own address!) List problems? Notify owner-jess-users@... --------------------------------------------------------- Ernest Friedman-Hill Informatics & Decision Sciences Phone: (925) 294-2154 Sandia National Labs PO Box 969, MS 9012 ejfried@... Livermore, CA 94550 http://www.jessrules.com -------------------------------------------------------------------- To unsubscribe, send the words 'unsubscribe jess-users you@...' in the BODY of a message to majordomo@..., NOT to the list (use your own address!) List problems? Notify owner-jess-users@.... -------------------------------------------------------------------- |
|
|
RE: JESS: How to load a rule file in a remote RMI client.I got that part, thanks a lot for helping me at weekend! And after executing paser.parse(false), how do I get the return value(the number of rules fired) of engine.run() method? > From: ejfried@... > To: jess-users@... > Subject: Re: JESS: How to load a rule file in a remote RMI client. > Date: Sat, 24 Oct 2009 10:52:22 -0400 > > You want to send the file contents as a String to the remote host, and > let the remote host parse it and run it. > > On Oct 24, 2009, at 12:01 AM, Andrew Meng wrote: > > > > > but the document says "Instances of Jesp are not serializable, as > > they hold a reference to a Reader." Therefore RMI can not serialize > > it to the remote host. > > > > > > > > And after run paser.parse(false), how do I get the result of > > engine.run(the number of rules fired)? > > > > > > > > Thanks, > > > > Andrew > > > > > > > > > > > > > > > >> From: ejfried@... > >> To: jess-users@... > >> Subject: Re: JESS: How to load a rule file in a remote RMI client. > >> Date: Fri, 23 Oct 2009 23:20:07 -0400 > >> > >> It's very easy. See > >> > >> http://www.jessrules.com/jess/docs/71/library.html#jess.Jesp > >> > >> Follow the first example, but use a StringReader instead of the > >> FileReader. > >> > >> > >> On Oct 23, 2009, at 10:28 PM, Andrew Meng wrote: > >> > >>> > >>> Thanks a lot for the quick reply! > >>> > >>> As a workaround, I did copy the xxx.clp over to the remote machine. > >>> > >>> > >>> > >>> However I want to make a generic remote worker who just takes a task > >>> from JavaSpace and execute task.execute(). My task is like: > >>> > >>> > >>> > >>> class task{ > >>> > >>> ... > >>> > >>> public Object execute(){ > >>> > >>> ... > >>> > >>> engine.batch("xxx.clp"); > >>> > >>> if (engine.run() > 1) { does something and return} > >>> > >>> } > >>> > >>> } > >>> > >>> > >>> Yes, I can read the xxx.clp into a string as a part of the task > >>> object which will be serialized to the remote host by RMI. After > >>> reading Jesp API and JIA book, I still could not figure out the Jesp > >>> syntax to do what I want to do. > >>> > >>> > >>> > >>> Can you please elaborate more? > >>> > >>> > >>> > >>> Thanks a lot, > >>> > >>> Andrew > >>> > >>> > >>>> From: ejfried@... > >>>> To: jess-users@... > >>>> Subject: Re: JESS: How to load a rule file in a remote RMI client. > >>>> Date: Fri, 23 Oct 2009 20:46:09 -0400 > >>>> > >>>> If you want a process on a remote machine to open a file by name, > >>>> then > >>>> of course you'd need to transmit the file. But you can instead read > >>>> the file into a String and send the String around; then use a > >>>> StringReader and the jess.Jesp class to run the code on the remote > >>>> machines (see the Jess manual on how to use jess.Jesp to parse Jess > >>>> code.) > >>>> > >>>> > >>>> On Oct 18, 2009, at 10:41 PM, ameng wrote: > >>>> > >>>>> > >>>>> Hello, > >>>>> > >>>>> I am trying to integrate Jess with JavaSpace(RMI). Tasks(running > >>>>> rete.batch("rule.clp")) put into a JavaSpace got following > >>>>> exception on > >>>>> the remote machine: > >>>>> > >>>>> Jess reported an error in routine batch. > >>>>> Message: Cannot open file. > >>>>> at jess.Batch.findDocument(Batch.java:221) > >>>>> at jess.Batch.batch(Batch.java:122) > >>>>> at jess.Batch.batch(Batch.java:113) > >>>>> at jess.Batch.batch(Batch.java:75) > >>>>> at jess.Batch.batch(Batch.java:40) > >>>>> at jess.Rete.batch(Rete.java:2791) > >>>>> > >>>>> What are the options here to pass the rules file to remote rete > >>>>> engine? > >>>>> > >>>>> Thanks a lot, > >>>>> Andrew > >>>>> -- > >>>>> View this message in context: http://www.nabble.com/How-to-load-a-rule-file-in-a-remote-RMI-client.-tp25952603p25952603.html > >>>>> Sent from the Jess mailing list archive at Nabble.com. > >>>>> > >>>>> > >>>>> > >>>>> -------------------------------------------------------------------- > >>>>> To unsubscribe, send the words 'unsubscribe jess-users > >>>>> you@...' > >>>>> in the BODY of a message to majordomo@..., NOT to the list > >>>>> (use your own address!) List problems? Notify owner-jess-users@... > >>>>> . > >>>>> -------------------------------------------------------------------- > >>>> > >>>> --------------------------------------------------------- > >>>> Ernest Friedman-Hill > >>>> Informatics & Decision Sciences, Sandia National Laboratories > >>>> PO Box 969, MS 9012, Livermore, CA 94550 > >>>> http://www.jessrules.com > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> -------------------------------------------------------------------- > >>>> To unsubscribe, send the words 'unsubscribe jess-users you@... > >>>> ' > >>>> in the BODY of a message to majordomo@..., NOT to the list > >>>> (use your own address!) List problems? Notify owner-jess-users@... > >> > >> --------------------------------------------------------- > >> Ernest Friedman-Hill > >> Informatics & Decision Sciences, Sandia National Laboratories > >> PO Box 969, MS 9012, Livermore, CA 94550 > >> http://www.jessrules.com > >> > >> > >> > >> > >> > >> > >> > >> -------------------------------------------------------------------- > >> To unsubscribe, send the words 'unsubscribe jess-users you@... > >> ' > >> in the BODY of a message to majordomo@..., NOT to the list > >> (use your own address!) List problems? Notify owner-jess-users@... > > --------------------------------------------------------- > Ernest Friedman-Hill > Informatics & Decision Sciences Phone: (925) 294-2154 > Sandia National Labs > PO Box 969, MS 9012 ejfried@... > Livermore, CA 94550 http://www.jessrules.com > > > > > > -------------------------------------------------------------------- > To unsubscribe, send the words 'unsubscribe jess-users you@...' > in the BODY of a message to majordomo@..., NOT to the list > (use your own address!) List problems? Notify owner-jess-users@... |
|
|
Re: JESS: How to load a rule file in a remote RMI client.If the "run" call is not in the file, then you'd get it however you get anything in JavaSpaces (I have no idea personally). So you must be thinking the "run" command would be the last line of the batched script? The "parse" function returns that value of the last evaluated expression, so if the file ends in (run), the return value of parse() will be the number of rules fired. On Oct 24, 2009, at 10:58 AM, Andrew Meng wrote: > > I got that part, thanks a lot for helping me at weekend! > > > > And after executing paser.parse(false), how do I get the return > value(the number of rules fired) of engine.run() method? > > >> From: ejfried@... >> To: jess-users@... >> Subject: Re: JESS: How to load a rule file in a remote RMI client. >> Date: Sat, 24 Oct 2009 10:52:22 -0400 >> >> You want to send the file contents as a String to the remote host, >> and >> let the remote host parse it and run it. >> >> On Oct 24, 2009, at 12:01 AM, Andrew Meng wrote: >> >>> >>> but the document says "Instances of Jesp are not serializable, as >>> they hold a reference to a Reader." Therefore RMI can not serialize >>> it to the remote host. >>> >>> >>> >>> And after run paser.parse(false), how do I get the result of >>> engine.run(the number of rules fired)? >>> >>> >>> >>> Thanks, >>> >>> Andrew >>> >>> >>> >>> >>> >>> >>> >>>> From: ejfried@... >>>> To: jess-users@... >>>> Subject: Re: JESS: How to load a rule file in a remote RMI client. >>>> Date: Fri, 23 Oct 2009 23:20:07 -0400 >>>> >>>> It's very easy. See >>>> >>>> http://www.jessrules.com/jess/docs/71/library.html#jess.Jesp >>>> >>>> Follow the first example, but use a StringReader instead of the >>>> FileReader. >>>> >>>> >>>> On Oct 23, 2009, at 10:28 PM, Andrew Meng wrote: >>>> >>>>> >>>>> Thanks a lot for the quick reply! >>>>> >>>>> As a workaround, I did copy the xxx.clp over to the remote >>>>> machine. >>>>> >>>>> >>>>> >>>>> However I want to make a generic remote worker who just takes a >>>>> task >>>>> from JavaSpace and execute task.execute(). My task is like: >>>>> >>>>> >>>>> >>>>> class task{ >>>>> >>>>> ... >>>>> >>>>> public Object execute(){ >>>>> >>>>> ... >>>>> >>>>> engine.batch("xxx.clp"); >>>>> >>>>> if (engine.run() > 1) { does something and return} >>>>> >>>>> } >>>>> >>>>> } >>>>> >>>>> >>>>> Yes, I can read the xxx.clp into a string as a part of the task >>>>> object which will be serialized to the remote host by RMI. After >>>>> reading Jesp API and JIA book, I still could not figure out the >>>>> Jesp >>>>> syntax to do what I want to do. >>>>> >>>>> >>>>> >>>>> Can you please elaborate more? >>>>> >>>>> >>>>> >>>>> Thanks a lot, >>>>> >>>>> Andrew >>>>> >>>>> >>>>>> From: ejfried@... >>>>>> To: jess-users@... >>>>>> Subject: Re: JESS: How to load a rule file in a remote RMI >>>>>> client. >>>>>> Date: Fri, 23 Oct 2009 20:46:09 -0400 >>>>>> >>>>>> If you want a process on a remote machine to open a file by name, >>>>>> then >>>>>> of course you'd need to transmit the file. But you can instead >>>>>> read >>>>>> the file into a String and send the String around; then use a >>>>>> StringReader and the jess.Jesp class to run the code on the >>>>>> remote >>>>>> machines (see the Jess manual on how to use jess.Jesp to parse >>>>>> Jess >>>>>> code.) >>>>>> >>>>>> >>>>>> On Oct 18, 2009, at 10:41 PM, ameng wrote: >>>>>> >>>>>>> >>>>>>> Hello, >>>>>>> >>>>>>> I am trying to integrate Jess with JavaSpace(RMI). Tasks(running >>>>>>> rete.batch("rule.clp")) put into a JavaSpace got following >>>>>>> exception on >>>>>>> the remote machine: >>>>>>> >>>>>>> Jess reported an error in routine batch. >>>>>>> Message: Cannot open file. >>>>>>> at jess.Batch.findDocument(Batch.java:221) >>>>>>> at jess.Batch.batch(Batch.java:122) >>>>>>> at jess.Batch.batch(Batch.java:113) >>>>>>> at jess.Batch.batch(Batch.java:75) >>>>>>> at jess.Batch.batch(Batch.java:40) >>>>>>> at jess.Rete.batch(Rete.java:2791) >>>>>>> >>>>>>> What are the options here to pass the rules file to remote rete >>>>>>> engine? >>>>>>> >>>>>>> Thanks a lot, >>>>>>> Andrew >>>>>>> -- >>>>>>> View this message in context: http://www.nabble.com/How-to-load-a-rule-file-in-a-remote-RMI-client.-tp25952603p25952603.html >>>>>>> Sent from the Jess mailing list archive at Nabble.com. >>>>>>> >>>>>>> >>>>>>> >>>>>>> -------------------------------------------------------------------- >>>>>>> To unsubscribe, send the words 'unsubscribe jess-users >>>>>>> you@...' >>>>>>> in the BODY of a message to majordomo@..., NOT to the >>>>>>> list >>>>>>> (use your own address!) List problems? Notify owner-jess-users@... >>>>>>> . >>>>>>> -------------------------------------------------------------------- >>>>>> >>>>>> --------------------------------------------------------- >>>>>> Ernest Friedman-Hill >>>>>> Informatics & Decision Sciences, Sandia National Laboratories >>>>>> PO Box 969, MS 9012, Livermore, CA 94550 >>>>>> http://www.jessrules.com >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -------------------------------------------------------------------- >>>>>> To unsubscribe, send the words 'unsubscribe jess-users you@... >>>>>> ' >>>>>> in the BODY of a message to majordomo@..., NOT to the list >>>>>> (use your own address!) List problems? Notify owner-jess-users@... >>>> >>>> --------------------------------------------------------- >>>> Ernest Friedman-Hill >>>> Informatics & Decision Sciences, Sandia National Laboratories >>>> PO Box 969, MS 9012, Livermore, CA 94550 >>>> http://www.jessrules.com >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> -------------------------------------------------------------------- >>>> To unsubscribe, send the words 'unsubscribe jess-users you@... >>>> ' >>>> in the BODY of a message to majordomo@..., NOT to the list >>>> (use your own address!) List problems? Notify owner-jess-users@... >> >> --------------------------------------------------------- >> Ernest Friedman-Hill >> Informatics & Decision Sciences Phone: (925) 294-2154 >> Sandia National Labs >> PO Box 969, MS 9012 ejfried@... >> Livermore, CA 94550 http://www.jessrules.com >> >> >> >> >> >> -------------------------------------------------------------------- >> To unsubscribe, send the words 'unsubscribe jess-users you@... >> ' >> in the BODY of a message to majordomo@..., NOT to the list >> (use your own address!) List problems? Notify owner-jess-users@... --------------------------------------------------------- Ernest Friedman-Hill Informatics & Decision Sciences Phone: (925) 294-2154 Sandia National Labs PO Box 969, MS 9012 ejfried@... Livermore, CA 94550 http://www.jessrules.com -------------------------------------------------------------------- To unsubscribe, send the words 'unsubscribe jess-users you@...' in the BODY of a message to majordomo@..., NOT to the list (use your own address!) List problems? Notify owner-jess-users@.... -------------------------------------------------------------------- |
| Free embeddable forum powered by Nabble | Forum Help |