Attempting to use this code and I don't seem to be receiving the
unsolicited call back? Is this still working for others?
On Oct 27, 1:28 am, "yariv.snapir" <
yariv.sna...@gmail.com> wrote:
> Indeed it helped!
>
> Do you know of a way I can pass these IDs from the robot's code to the
> embed JS API (event listeners perhaps) - I need a way to save the ID
> of the newly created wave in my application...
>
> Thanks
>
> On Oct 26, 10:42 pm, Peter Svedberg <
peter.o.s.svedb...@gmail.com>
> wrote:
>
>
>
> > Hi all,
>
> > Yes you will get the ids with a self added event, but you don't get a
> > self added event when youcreateawavelet(wave) with a robot.
>
> > Here's how tocreatea wave with a robot in java (assuming you have a
> > handle on the currentwavelet):
> >WaveletnewWave =wavelet.createWavelet(wavelet.getParticipants(),
> > "");
>
> > After you submit the operations you will get an unsolicitied
> > DOCUMENT_CHANGED event. I say unsolicited as you don't have to specify
> > it in the capabilities.xml file.
>
> > Look for the event in the servlet:
> > for (Event e : bundle.getEvents()) {
> > switch (e.getType()) {
> > ...
> > case DOCUMENT_CHANGED:
> > processNewIds();
> > break;
> > ...
> > }
> > }
>
> > public void processNewIds() {
> > if (wavelet.hasDataDocument("_new_ids_")) {
> > String newIds =wavelet.getDataDocument("_new_ids_");
> > // do whatever with the new ids
> > }
> > }
>
> > newIds looks like this:
> > :
wavesandbox.com!w+Sxz7uLZkCxk
wavesandbox.com!conv+root b+Sxz7uLZkCxl
> > \n
> > strip the colon and split on " " and you have waveId, waveletId and
> > rootBlipId
>
> > If we had specified a name for the writeback instead of the empty
> > string it would have shown up before the colon.
>
> > If you set the default logging level to INFO you'll see the event and
> > the new ids data document in app engine's Logs view.
>
> > Hope this helps
> > -Peter
>
> > On Oct 26, 7:58 pm, dLux <
d...@dlux.hu> wrote:
>
> > > Just an idea to try, I'm not sure it works: add your robot to the
> > >wavelet, and then you'll get back a SELF_ADDED event. Then you'll have
> > > the ID. You can relay information with data documents of the main
> > > blip. Let me know if it works. (I'll probably need it soon also :) ).
>
> > > On Oct 25, 4:29 pm, David Nesting <
da...@fastolfe.net> wrote:
>
> > > > On Sun, Oct 25, 2009 at 6:25 AM,yariv.snapir <
yariv.sna...@gmail.com>wrote:
>
> > > > > produced the type of ID I need... (I got 'TBD0.8622343911850655' where
> > > > > the ID needed looks more like: 'w+iFA2MNGuP'... I wonder what is the\
>
> > > > The methods you use to respond to an event notification do not have
> > > > immediate results. The operations are all batched up and sent back to the
> > > > server when you're done handling the event. So, until that happens, all of
> > > > the IDs generated as youcreatenew blips/wavelets are "TBD". I don't