Uhm, why did you uncomment the example?
Anyway, the function "BIS_fnc_taskHandler" appears several times in the campaign (it's called from "C1_IntoTheStorm.Chernarus\grpMain.fsm" for example). So it might be worth to take a look at this file and see how the function is used.