Jerry,

On Fri, Jun 17, 2011 at 11:55 AM, Gerald Weir <malleth...@verizon.net>wrote:

>
> First, my apologies to all if this is a duplicate post. I seem to be having
> trouble posting.  Anyway,....
>
> Hello All,
>
> Thanks for your input. Ray, you are correct in that I needed to pass in the
> session scope variables correctly.
>
> In my original post it is clear that a) I was not passing in the session
> scope vars (the array) correctly; and b) I had not indicated the path
> correctly.  Now I've fixed those items and am mostly successful as in the
> following:
>
> <cffunction name="onSessionEnd" returntype="void">
>        <cfargument name="SessionScope" type="struct" required="true" />
>        <cfargument name="ApplicationScope" type="struct" required="true" />
>
>        <cfinvoke component="lib.components.jobState"
> method="writeJobStepArray" returnvariable="isSuccess">
>                <cfinvokeargument name="theJobStepArray"
> value="#Arguments.SessionScope.jobStepArray#">
>        </cfinvoke>
>
>        <cflog file="#This.Name#" type="Information" text="Session ended
> with success.  Array Evaluation is #isSuccess#">
>
>        <cfreturn />
> </cffunction>
>
> I had tried the / paths because it had appeared to me that the onSessionEnd
> was not finding the component but what I see now is that there is an error
> in the CFC regarding an application scope variable that I had not seen so
> naturally it was erroring out - not that it couldn't find the cfc.
>
> I definitely learned a lot about using CFLOG for debugging in this one.
>  But, there is one other small issue and that is I tried to pass in the
> application scope var as follows and it didn't seem to work (so I've
> hard-coded for the time being):
>
> In application.cfc I have defined a datasource structure:
>  application.database = structNew()
>
> The database is:  application.database.dsn
>
> I tried to pass this to the CFC in onSessionEnd like this:
>
> <cfinvokeargument name="theDatasourceToUse"
> value="#Arguments.ApplicationScope.application.database.dsn#">
>
> ...but it didn't work.  What is the correct syntax for this?
>
>
You'd only need:

<cfinvokeargument name="theDatasourceToUse"
value="#Arguments.ApplicationScope.database.dsn#">

-Dan

-- 
Dan G. Switzer, II
dswit...@pengoworks.com
http://blog.pengoworks.com/

█▀▀▀▀▀█ ▄▀ ▄█▄▄█  █▀▀▀▀▀█
█ ███ █ ▀███▀ █▀  █ ███ █
█ ▀▀▀ █ █▄ ▄  ▀██ █ ▀▀▀ █
▀▀▀▀▀▀▀ █▄▀ █ █ ▀ ▀▀▀▀▀▀▀
█▀▄█▄▄▀▀  █▄▀██ █▄█▀▀ ▀▀▄
 ▄▀█▄▀▀▀▄▀▀▄▄▄█ ▄█▄▀▀  ▀▀
▀▀▄▄▀▀▀▀█▄▄▀▀█ ▀▀██▄ █▄▀█
▀▄ ▄▀ ▀  ▀▀█▄█▄▄▄ █▄▀▄▀▄▀
▀▀ ▀▀ ▀ █▀ ██▄ ▄█▀▀▀███ ▄
█▀▀▀▀▀█ ▀▄█ ▄▀█▀█ ▀ █▄▄▀█
█ ███ █ ▄▀▀ █▀ ▄▀█▀██ ▄▀
█ ▀▀▀ █ ▄ █▄ ▄▄ ▄▄▄ ▀█▀ ▀
▀▀▀▀▀▀▀ ▀▀  ▀▀ ▀▀  ▀   ▀▀


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345399
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to