1.5.x & doIf() syntax -- can't seem to find the right expression


I’m trying to use doIf() to execute a single step in the scenario once. Unfortunately, the documented syntax is not working. No doubt, I’ve missed something obvious…

Compiler error:

Error:(21, 9) not found: value exec
exec( Doorman.configs.generate.httpPost )

package com.taketwo.mytwok.gatling.simulations

import com.excilys.ebi.gatling.core.Predef._
import com.excilys.ebi.gatling.http.Predef._
import com.taketwo.mytwok.gatling.core.{AppContext, Common, Properties}
import com.taketwo.mytwok.gatling.services.{Sso, Doorman}

class EchoSimulation extends Simulation {
val url = Common.Url(Properties.entitlements.url)
val name = “grants.echo”

def echo = {
Common.httpPost(name, url, AppContext())

.feed( Sso.platformFeeder )
.doIf( (session: Session) => { ! session.isAttributeDefined(“access_token”) } ) {
exec( Doorman.configs.generate.httpPost )
.exec( echo )


import bootstrap._

Well, that did it. Thanks!