# recursive value scn needs type and type mismatch error when using Gatling.bat

**URL:** <https://community.gatling.io/t/recursive-value-scn-needs-type-and-type-mismatch-error-when-using-gatling-bat/4842>\
**Category:** Gatling (Open-Source)\
**Created:** [February 26, 2019, 11:02am UTC](https://community.gatling.io/t/recursive-value-scn-needs-type-and-type-mismatch-error-when-using-gatling-bat/4842 "2019-02-26T11:02:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mohini\_Nemade](https://avatars.discourse-cdn.com/v4/letter/m/5f9b8f/32.png) [@Mohini\_Nemade](https://community.gatling.io/u/Mohini_Nemade)\
**Post date:** [February 26, 2019, 11:02am UTC](https://community.gatling.io/t/recursive-value-scn-needs-type-and-type-mismatch-error-when-using-gatling-bat/4842/1 "2019-02-26T11:02:05Z")

</div>

Hi,  
I have recorded script with HAR, and have used grouping in the script like,  
val scn = scenario(“Scenario Name”)

.group(“Navigate To URL”){  
exec(http(“request\_0”)  
.get(“sampleUrl.asp”)  
.headers(headers\_0)  
.resources(http(“request\_1”)  
.get(“sampleUrl.js?\_v=4.10.0.17”)  
.headers(headers\_1),  
http(“request\_2”)  
.get(“sampleUrl.js?\_v=4.10.0.17”)  
.headers(headers\_1)}

When i run gatling.bat, following errors are displayed

---

<div class="post-metadata">

**Author:** ![Mohini\_Nemade](https://avatars.discourse-cdn.com/v4/letter/m/5f9b8f/32.png) [@Mohini\_Nemade](https://community.gatling.io/u/Mohini_Nemade)\
**Post date:** [February 26, 2019, 11:46am UTC](https://community.gatling.io/t/recursive-value-scn-needs-type-and-type-mismatch-error-when-using-gatling-bat/4842/2 "2019-02-26T11:46:07Z")

</div>

Also, when i run script in reports i am not able to see requests grouped…

---

<div class="post-metadata">

**Author:** ![G\_Madhana\_Mohana\_Red](https://avatars.discourse-cdn.com/v4/letter/g/b38774/32.png) [@G\_Madhana\_Mohana\_Red](https://community.gatling.io/u/G_Madhana_Mohana_Red)\
**Post date:** [February 27, 2019, 3:13am UTC](https://community.gatling.io/t/recursive-value-scn-needs-type-and-type-mismatch-error-when-using-gatling-bat/4842/3 "2019-02-27T03:13:12Z")

</div>

Can you please try the below code. You seems to be something missing in your code.

object scenario1{  
val scenario1 =  
group(“Navigate To URL”){  
exec(http(“request\_0”)  
.get(“sampleUrl.asp”)  
.headers(headers\_0)  
.resources(http(“request\_1”)  
.get(“sampleUrl.js?\_v=4.10.0.17”)  
.headers(headers\_1),  
http(“request\_2”)  
.get(“sampleUrl.js?\_v=4.10.0.17”)  
.headers(headers\_1)))}  
}

val scn =scenario(“scenario name”){exec(scenario1.scenario1)}

It will group the requests and group name is displayed and expanding the group name will give transaction inside the group .

---

<div class="post-metadata">

**Author:** ![Mohini\_Nemade](https://avatars.discourse-cdn.com/v4/letter/m/5f9b8f/32.png) [@Mohini\_Nemade](https://community.gatling.io/u/Mohini_Nemade)\
**Post date:** [February 27, 2019, 6:11am UTC](https://community.gatling.io/t/recursive-value-scn-needs-type-and-type-mismatch-error-when-using-gatling-bat/4842/4 "2019-02-27T06:11:17Z")

</div>

Ok, i did changes that you suggested, but getting error for line

val scn =scenario(“scenario name”){exec(scenario1.scenario1)}

---

<div class="post-metadata">

**Author:** ![Mohini\_Nemade](https://avatars.discourse-cdn.com/v4/letter/m/5f9b8f/32.png) [@Mohini\_Nemade](https://community.gatling.io/u/Mohini_Nemade)\
**Post date:** [February 27, 2019, 8:59am UTC](https://community.gatling.io/t/recursive-value-scn-needs-type-and-type-mismatch-error-when-using-gatling-bat/4842/5 "2019-02-27T08:59:59Z")

</div>

Hi well i solved this error,  
But can anyone please give me snippest for how can i use grouping inside object

Thanks
