tracker issue : CF-3154883

select a category, or use search below
(searches all categories and all time range)
Title:

CF cannot update task w/in its handler (b/c it forces handler verification)

| View in Tracker

Status/Resolution/Reason: To Fix//

Reporter/Name(from Bugbase): Aaron Neff / Aaron Neff (Aaron Neff)

Created: 04/01/2012

Components: Scheduler

Versions: 2016,11.0,10.0

Failure Type: Enhancement Request

Found In Build/Fixed In Build: Public Beta /

Priority/Frequency: Major / Some users will encounter

Locale/System: English / Win All

Vote Count: 0

CF cannot update a task w/in its handler. (Actually, CF cannot update a task from *anywhere* else, if the task uses the eventhandler attribute and is updated via result from action="list".)

The issue is b/c it cannot resolve the dot-notated path from inside the handler (nor if cfschedule is called from any other directory).  This verification should be optional.

Thus, once action="list" is fixed to return the dot-notated path, we still cannot use the returned path to update a task w/in the handler (or by calling cfschedule from any other directory).

What I was trying to do was: W/in handler's onError(), increase task’s frequency.

Suggestion: <cfschedule action="update" eventhandler="#dotPathReturnedFromListAction#" verifyhandler="false" ../>

Default for verifyhandler would be true.  When false, it would prevent attempt to resolve the eventhandler path.  This way we can update the task from w/in the handler (or from any other directory).

(AND, CF Admin should use this for the new "[x]Skip handler verification" checkbox that hopefully will be added beneath the "event handler" input field.  As per #3148745.)

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3154883

External Customer Info:
External Company:  
External Customer Name: itisdesign
External Customer Email:

Attachments:

Comments:

Related thread: http://prerelease.adobe.com/r/?69f76ff05cb14fd8b619d130c3c5d45f
Comment by External U.
19828 | April 01, 2012 12:08:04 PM GMT
Repro: index.cfm ----------- <cfschedule action="update" mode="server" task="MYTASK" startdate="1/1/2012" starttime="12:00 AM" interval="once" url="http://a" onmisfire="invokehandler" onexception="invokehandler" eventHandler="path.to.MyCFC" /> (basically, just create any task) MyCFC.cfc ----------- W/in any method, run the same code above. exception said: ________________________________________ Error: Eventhandler path.to.MyCFC does not implement required interface ________________________________________
Comment by External U.
19829 | April 01, 2012 12:09:33 PM GMT
Aaron, I checked this without a webserver and it worked just fine. I remember that you were using multiple IIS sites. Can you please check this from the default webroot and let me know if it works? Meanwhile i will check this on an IIS site.
Comment by Himavanth R.
19830 | April 03, 2012 01:24:29 AM GMT
Hi Himavanth, Yes, I'm using IIS sites. Here is a repro, from default webroot, which also fails: Repro: 1) Place index.cfm and MyCFC.cfc in C:\inetpub\wwwroot 2) Call http://localhost 3) See only "MYTASK1" was created, but not MYTASK2 4) In MyCFC.cfc, remove 'eventHandler="MyCFC"' 5) Call http://localhost 6) See "MYTASK1" and "MYTASK2" were both created index.cfm ----------- <cfschedule action="update" mode="server" task="MYTASK1" startdate="1/1/2012" starttime="12:00 AM" interval="monthly" url="http://a" onmisfire="invokehandler" onexception="invokehandler" eventHandler="MyCFC" /> MyCFC.cfc ----------- <cfcomponent implements="cfide.scheduler.ITaskEventHandler"> <cffunction name="onTaskStart" returntype="boolean"> <cfargument name="context" type="struct" required="no" /> <cfreturn true /> </cffunction> <cffunction name="onMisfire" returntype="void"> <cfargument name="context" type="struct" required="no" /> <cfschedule action="update" mode="server" task="MYTASK2" startdate="1/1/2014" starttime="12:00 AM" interval="monthly" url="http://b" onmisfire="invokehandler" onexception="invokehandler" eventHandler="MyCFC" /> </cffunction> <cffunction name="onTaskEnd" returntype="void"> <cfargument name="context" type="struct" required="no" /> </cffunction> <cffunction name="onError" returntype="void"> <cfargument name="context" type="struct" required="no" /> </cffunction> <cffunction name="execute" returntype="void"> </cffunction> </cfcomponent> Thanks, -Aaron
Comment by External U.
19831 | April 03, 2012 07:09:00 AM GMT