how to iterate a object/method based on random number

hi,

 i want to iterate the below logout based on random number if rand > 5 logout else another method... can any one help on this
**whether i can do with objects or have to change to method**

object obj_sendtask_logout {

//  val scn =
//    scenario("GM_PTI_WS_Logout")

  val headers = Map(
    "Accept-Encoding" -> """gzip,deflate""",
    "Content-Type" -> """text/xml;charset=UTF-8""")

  val sendtask_logout_call = exec(http("GM_PTI_WS_Logout")

    .post("https://abc.com/services/FieldService?wsdl")
    .headers(headers)
    .body(StringBody( """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="http://tri.com/mrm/servicetypes/worker/v1" xmlns:v11="http://tri.com/mrm/datatypes/coretypes/geolocation/v1" xmlns:v12="http://tri.com/mrm/datatypes/coretypes/businessextension/v1">
                              <soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
                                <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
                                  <wsse:UsernameToken wsu:Id="UsernameToken-1" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
                                    <wsse:Username></wsse:Username>
                                    <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">${D_Pin}</wsse:Password>
                                    </wsse:UsernameToken>
                                    </wsse:Security>
                                  <wsa:Action>urn:logout</wsa:Action>
                                </soapenv:Header>
                                <soapenv:Body>
                                    <v1:logoutDriverRequest>
                                        <v1:resourceId>${Resource_ID}</v1:resourceId>
                                        <v1:deviceId>${Device_Serial}</v1:deviceId>
                                        <v1:dateTimeGMT>"""+get_common_items.loDate+"""</v1:dateTimeGMT>
                                        <v1:coordinate>
                                            
                                        </v1:coordinate>
                                        <v1:odometer>43</v1:odometer>
                                    </v1:logoutRequest>
                                </soapenv:Body>
                            </soapenv:Envelope>"""))
    .check(regex( """<worker:status>true</worker:status>""")))

Can any one help in this

Check out randomSwitch http://gatling.io/docs/2.1.7/general/scenario.html?highlight=randomswitch#randomswitch