<cffunction name="getWorkflow"
access="public"
returntype="struct"
output="No">
<cfargument name="RequestID" type="any" required="yes">
<cfscript>
//Set up our instance only vars
var PreviousWorkflowID = '';
var CurrentWorkflowID = '';
var NextWorkflowID = '';
var WorkflowPath = '';
var WorkflowPathLen = '';
var CurrentWorkFlow = '';
var CurrentIndex = '';
var ReturnStruct = StructNew();
</cfscript>
<!--- Get workflow info for the requestID --->
<cfquery name="getWorkflow" datasource="#Request.g_DSN#">
...
</cfquery>
<cfscript>
//Populate some vars for use later on
WorkflowPath = getWorkflow.WorkflowPath;
WorkflowPathLen = ListLen(WorkflowPath);
CurrentWorkFlowID = getWorkflow.CurrentWorkflow;
CurrentIndex = ListFind(WorkflowPath,CurrentWorkFlowID);
//Get Previous WorkflowID if there is one
if (CurrentIndex NEQ 1) {
PreviousWorkflowID = ListGetAt(WorkflowPath,CurrentIndex-1);
}
//Get Next WorkflowID if there is one
if (CurrentIndex NEQ WorkflowPathLen) {
NextWorkflowID = ListGetAt(WorkflowPath,CurrentIndex+1);
}
//Populate struct for return
ReturnStruct.PreviousWorkflowID = PreviousWorkflowID;
ReturnStruct.CurrentWorkflowID = CurrentWorkflowID;
ReturnStruct.NextWorkflowID = NextWorkflowID;
</cfscript>
<cfreturn ReturnStruct>
</cffunction>
And here's the first part of the second, it bombs out in the first cfscript block
<cffunction name="getNextTasks"
access="public"
returntype="struct"
output="No"
hint="This method returns the next workflow for a specific request">
<cfargument name="RequestID" type="any" required="yes">
<cfscript>
//Set up our instance only vars
var NodeList = '';
var CurrentGroup = '';
var CurrentOrder = '';
var WorkflowEntryIDList = '';
var WorkflowStruct = '';
var WorkflowID = '';
var NextWorkflowID = '';
var ReturnStruct = StructNew();
//Grab struct from our Workflow object
WorkflowStruct = getWorkflow(arguments.RequestID);
WorkflowID = WorkflowStruct.CurrentWorkflowID;
NextWorkflowID = WorkflowStruct.NextWorkflowID;
ReturnStruct.WorkflowID = WorkflowID;
ReturnStruct.WorkflowEntryIDList = '';
</cfscript>
.....
</cffunction>
-----Original Message-----
From: Raymond Camden [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 26, 2003 2:13 PM
To: CF-Talk
Subject: RE: Calling another function within a function (CFC)
I've seen this in the past where a user accidently created a variable with
the same name as the method. Can you show us the full code for both methods?
_____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

