Title: Message
Lee, we have the ability to do what you want by calling the FB recursively (you can even call it recursively using multiple fuses in the FuseQ). That's covered in one of the chapters in John and my book and I'm sure Nat and Jeff cover it in their book.
 
John and I went over this very process of immediately executing an added fuseaction to the queue, but since the PRESENT fuseaction would have to be terminated, the code you show couldn't work (without a recursive call to the FB).
 
I've found that using FuseQ is extremely helpful in implementing Model-View-Controller architecture as well as abstracting common functionality to a parent. For example, if I have this circuit structure:
 
Employee
   SalariedEmployee
   HourlyEmployee
   ContractEmployee
 
and if I then want to create a new employee (either salaried, hourly, or contract), I probably have some similar things I do for each of them. Rather than having duplicate code in each of the three employee types, I can abstract this to the Employee circuit and then use this code:
 
<cfcase value="new">
   <cfset SuperQ() />
   <cfinclude template="act_DoThis" />
</cfcase>
 
If I need the SuperQ to execute immediately, I can do this:
 
<cfcase value="new">
   <cfset SuperQ() />
   <cfset AddToQ( 'SalariedEmployee.doNew' )>
</cfcase>
 
I don't know about the "atomic" argument, either, but the other stuff in FuseQ is sure nice.
-----Original Message-----
From: Lee Borkman [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 17, 2002 9:15 AM
To: [EMAIL PROTECTED]
Subject: Re: FuseQ and XFAs

It sure looks like it to me, JohnF.  You build up requests by throwing entire fully-qualified fuseactions onto the Queue (FIFO).  Each fuseaction gets executed in its turn, and as far as I can see, each fuseaction's internal workings (eg XFAs) are its own business.

What I'm trying to get my head around is how to make use of the way the fuseactions are queued to be executed further on down the processing track.  That means you can't really mix up "immediate" code with FuseQ calls.  That's a little weird to me right now, because I have always mixed conditional code, etc directly into my fuseactions.  For example, this wouldn't work the way you might hope:

<cfset addToQ(person.validate)>
<cfif isValid>
  <cfset addToQ(person.insert)>
</cfif>

I'm also grappling with the concept of "making fuseactions more atomic".  Is that a good thing to do?  Do I really want to create fuseactions in order to package up a single fuse worth of code?

Obviously I'm looking forward to seeing some more examples.  I know Q was quite a hit up in the Arctic.

See ya,

LeeBB

----- Original Message -----

 

Does fuseQ still use XFAs?

Thanks,

John
==^================================================================
This email was sent to: [email protected]

EASY UNSUBSCRIBE click here: http://topica.com/u/?bUrFMa.bV0Kx9
Or send an email to: [EMAIL PROTECTED]

T O P I C A -- Register now to manage your mail!
http://www.topica.com/partner/tag02/register
==^================================================================

Reply via email to