exec ChainBuilder does not generate a request

I have a scenario that

`

val scen = scenario(“View”)
.feed(userFeeder)
.exec(session => ViewScript.init(session))
.repeat(1)
{
exec(session => {
ViewScript.createURL(session)
})
// .exec(session => {
// val execCmd = ViewScript.execute(session)
// exec(execCmd)
// session
})
.exec(ViewCommand.execCmd)
}

`

and the last .exec(ViewCommand.execCmd) works where that is defined as

`

val execCmd = exec(http("${tx}").get("${url}"))

`

As above, the code generates a request to a page with the exec(ViewCommand.execCmd), but what I am trying to do is make that execCmd a variable dependent on some state in the session, which is returned by the commented ViewScript.execute(), i.e. the code in comments, however, although it compiles and seemingly runs, there are no requests generated to the URL…

What am I missing?

http://gatling.io/docs/2.2.3/general/scenario.html?highlight=runtime#exec

I had read that page many times and that warning stood out, but I couldn’t bring myself to believe that what I am trying to do is not possible.

I am converting an existing Java set of approx 10 scripts where each single Java script handles a large number of scenarios and I am struggling to work out whether Gatling can do the job in the same way. As a simple overview, we have 8 different ‘channels’ where each script supports all channels and where the logic is slightly different for each of those channels, e.g. different headers/cookies are set, depending on channel, different request parameters for GETs, different paths, different response objects to be parsed. A reasonable amount of this can be done by setting things in session, but there are some things I can get my head around and at this point it looks like my few Java components may blow out into many static chainbuilder statements

For example one channel requires 3 http requests to perform the action, whereas others require only 1. Would I have to have two scenarios in this case?

Also how can I handle different checks and parsing of response objects in a channel agnostic way or is it really the case that I have to hard code static scenarios (albeit with some element of session params/EL and conditinal logic) for each of my scenarios?