execute method randomly

can anyone answer for this please,i have to run the scenario based on rnd (doIfEqualsOrElse) number.is sounds correct ?
how can i use it if this is not a correct one.

 .doIfEqualsOrElse(session => session("rnd").as[Int], rnd > 2)
//( session.Session => (rnd > 2))
 exec(Read_HDAS_Data, Hdas_location, Hdas_Token).exec(WS_CreateXirgoException_SpeedImmidiate,idlingSummary,CreateSaraException_LowBattery)
val scn2= scenario("scnSaveAndGet1")
 exec(Read_HDAS_Data, Hdas_location, Hdas_Token).exec(WS_Zone_Exception,CreateSaraException_MainPowerDisconnected)

getting the below error while executing