I get this error
Element INSTANCE is undefined in VARIABLES.
I do not see the reason for the error!
This is my factory
<cfcomponent output="true" displayname="ObjectFactory">
<cffunction name="init" access="public" output="true" returntype="ObjectFactory">
<cfset variables.instance = structNew() />
<cfreturn this />
</cffunction>
<cffunction name="createObj" access="public" output="false" returntype="any">
<cfargument name="objName" type="string" required="true" />
<cfswitch expression="#arguments.objName#">
<cfcase value="abstractCollection">
<cfreturn createObject('component',"AbstractCollection").init() />
<cfbreak />
</cfcase>
<cfcase value="assignmentCollection">
<cfreturn createObject('component',"AssignmentCollection").init() />
<cfbreak />
</cfcase>
<cfcase value="salesmanBean">
<cfreturn createObject('component',"SalesmanBean").init(
salesmanHasThisDecorations = this.getInstance("assignmentCollection")) />
<cfbreak />
</cfcase>
</cfswitch>
</cffunction>
<cffunction name="getInstance" access="public" output="false" returntype="any">
<cfargument name="objName" type="string" required="true" />
<!--- Error occurs in the line below --->
<cfif not structKeyExists(variables.instance, arguments.objName)>
<cfset variables.instance[arguments.objName] = this.createObj(arguments.objName) />
</cfif>
<cfreturn variables.instance[arguments.objName] />
</cffunction>
</cfcomponent>