I am not sure if it is still in order to ask a question here but I do have a problem similar to this one but for some reasons I was not able to digest John Arrowwood’s explanation. I need to create a scenario with at least four workflows in it. The first one been the one I am showing here below. The tokenId is returning nothing. What am I doing wrong here? Ideally this tokenId will be used in the next workflow which will be getting admin credentials. Here is what i have so far:
val workflow1Header = Map("username" -> "username", "password" -> "password", "Content-Type" -> "application/json")
val tokenId = "" //workflow1 return tokenId which I would like to use for my workflow2
//Do I need to initialize session variable here? such as tokenIdSession?
val workflowScn = scenario("Admin token")
.exec(http("Workflow1")
.post("/admin token endpoint")
.headers(workflow1Header)
.check(regex("token: (\\d+)").find.saveAs("tokenId"))
)
//I tried to use session here but I kept on getting errors and my scenario is returning this error message "ailed: regex(token: (\d+)).find.exists, found nothing"
setUp(workflowScn.inject(atOnceUsers(1)))
.protocols(newAcctHttpConf)