show inserts from batchprocessor to another solution

Questions, tips and tricks and techniques for scripting in Servoy

show inserts from batchprocessor to another solution

Postby Hans Nieuwenhuis » Fri Aug 20, 2010 12:06 pm

Hi,

I have a batchproces that generates records and releated records.
EDIT : this a Servoy Batch Processor !

I want to notify the user that is looking at the same tables in another solution that there
are new records and/or show them to him.

Can this be done ? and how ?

Regards,
Hans Nieuwenhuis
Betagraphics
http://www.deltics.nl
http://www.betagraphics.nl

Servoy Version 7.3.1
Java version 1.7.0.x
Database Oracle 11g
User avatar
Hans Nieuwenhuis
 
Posts: 1026
Joined: Thu Apr 12, 2007 12:36 pm
Location: Hengelo, The Netherlands

Re: show inserts from batchprocessor to another solution

Postby jcompagner » Fri Aug 20, 2010 2:47 pm

you could use the ondatabroadcast event for that.

Let the batchprocessor trigger also something that all clients do look at
and that will be data for a client to look at.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: show inserts from batchprocessor to another solution

Postby Hans Nieuwenhuis » Fri Aug 20, 2010 3:00 pm

you could use the ondatabroadcast event for that.

Let the batchprocessor trigger also something that all clients do look at
and that will be data for a client to look at.


Thanks Johan,

Do you mean update some database column that is shown in all clients ? or ?

Regards,
Hans Nieuwenhuis
Betagraphics
http://www.deltics.nl
http://www.betagraphics.nl

Servoy Version 7.3.1
Java version 1.7.0.x
Database Oracle 11g
User avatar
Hans Nieuwenhuis
 
Posts: 1026
Joined: Thu Apr 12, 2007 12:36 pm
Location: Hengelo, The Netherlands

Re: show inserts from batchprocessor to another solution

Postby jcompagner » Fri Aug 20, 2010 3:14 pm

yes
so that clients do listen to those changes
and you can use that row/column to push data so that you know what to do in the client
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: show inserts from batchprocessor to another solution

Postby Hans Nieuwenhuis » Fri Aug 20, 2010 3:18 pm

I set an onDataBroadCast.

I never useed this before, but it does not seem to get fired ( i just put in some log output )

EDIT : I got it working the client that gets data broadcasted to it gets the event, not the sending one :oops:

Regards,
Hans Nieuwenhuis
Betagraphics
http://www.deltics.nl
http://www.betagraphics.nl

Servoy Version 7.3.1
Java version 1.7.0.x
Database Oracle 11g
User avatar
Hans Nieuwenhuis
 
Posts: 1026
Joined: Thu Apr 12, 2007 12:36 pm
Location: Hengelo, The Netherlands

Re: show inserts from batchprocessor to another solution

Postby Hans Nieuwenhuis » Fri Aug 20, 2010 3:58 pm

Great !!! that onDataBroadcast.

One question left : is there a table of the action type returned ? ( I've seen 2 and 3 )

Could'nt find it in the wiki.

Regards,
Hans Nieuwenhuis
Betagraphics
http://www.deltics.nl
http://www.betagraphics.nl

Servoy Version 7.3.1
Java version 1.7.0.x
Database Oracle 11g
User avatar
Hans Nieuwenhuis
 
Posts: 1026
Joined: Thu Apr 12, 2007 12:36 pm
Location: Hengelo, The Netherlands

Re: show inserts from batchprocessor to another solution

Postby jcompagner » Fri Aug 20, 2010 4:23 pm

thats a good one, this is the list:

DELETE_ACTION = 1;
INSERT_ACTION = 2;
UPDATE_ACTION = 3;

And the doc tells me that:

@param {Number} action see ACTION constants

but i dont see that Constant class at all. (at least i cant find it also)
can you create a case for that?
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: show inserts from batchprocessor to another solution

Postby Hans Nieuwenhuis » Fri Aug 20, 2010 4:25 pm

Thanks Johan,

I'll create a cased. (case = 314328)

Regards,
Hans Nieuwenhuis
Betagraphics
http://www.deltics.nl
http://www.betagraphics.nl

Servoy Version 7.3.1
Java version 1.7.0.x
Database Oracle 11g
User avatar
Hans Nieuwenhuis
 
Posts: 1026
Joined: Thu Apr 12, 2007 12:36 pm
Location: Hengelo, The Netherlands


Return to Methods

Who is online

Users browsing this forum: No registered users and 3 guests