[Seaside] isolate

Jonathan van Alteren jvalteren at objectguild.com
Wed Nov 20 08:58:11 UTC 2019


Hi Philippe,

Thanks for your reply.

I think I need some more help understanding your suggestions. I'm still learning Seaside and have only the code comments and documentation + books to go on.

Can you elaborate what you mean by the following?

	Override "the right methods" and add a check to the flag. Just make sure you don't backtrack this flag.


What do you mean by 'the right methods'?
And can you explain to me how I can prevent backtracking? Unfortunately I still haven't been able to find a good explanation for that.

And perhaps you can tell me which version of Seaside still had the #isolate: behavior? That way I can investigate myself.

The transactional behavior I want to isolate represents very high business value, so I need to make absolutely certain that it cannot be performed more than once.


Cheers,
Jonathan
On 17 Nov 2019, 09:30 +0100, Philippe Marschall <philippe.marschall at gmail.com>, wrote:
> Hello Jonathan
>
> Implementing #isolate: may not be the ideal starter issue but maybe
> you can solve your issue without implementing isolate.
> I have two ideas on top of my head, maybe they work:
> - A boolean completed flag in your task class. On completion of the
> task set the flag to true. Override "the right methods" and add a
> check to the flag. Just make sure you don't backtrack this flag.
> - On completion of the task add a decoration that prevents is from
> being executed again, or simply renders "the task is expired". I know
> this is not very specific.
>
> I hope these are enough to get you started.
>
> Cheers
> Philippe
>
> On Fri, Nov 15, 2019 at 2:26 PM jvalteren at objectguild.com
> <jvalteren at objectguild.com> wrote:
> >
> > Hi all,
> >
> > I found this post from 22/06/2015 using forum.world.st, and I'm having the
> > same problem. I (think I) need the #isolate: method's behavior to prevent
> > backtracking a WATask that has a transactional step in its flow.
> >
> > All the documentation I could find mention the #isolate: method. After
> > searching for quite a bit, I haven't found a clear example of how to work
> > around this in a different way.
> >
> > @Philippe: Unfortunately, I do not understand what you are saying here:
> >
> >
> > Philippe Marschall wrote
> > > A flag that's not backtracked. If you want to get fancy you can also
> > > store the last not expired continuation / state snapshot (again not
> > > backtracked) and redirect to this.
> >
> > Can anyone help me with this? I have the feeling that a possible solution
> > might be found in overriding the #states method, but I don't understand
> > enough of how that should work. I'm missing clear examples and/or
> > documentation here.
> >
> > Thanks in advance!
> >
> > Best,
> > Jonathan
> >
> >
> >
> > --
> > Sent from: http://forum.world.st/Seaside-General-f86180.html
> > _______________________________________________
> > seaside mailing list
> > seaside at lists.squeakfoundation.org
> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/seaside/attachments/20191120/c8a66962/attachment.html>


More information about the seaside mailing list