Multiple lines should work, IIRC. You might try doing a .replaceAll(“\n”,” ”) on it9.
The bigger problem is that you don’t have the terms in the right place. From the documentation, if you want to define instance level properties, you need 5 total terms. That means you would need 8 total #’s in your line:
instance5_id##instance5_name##instance5_description####auto.fooProperty=somevalue&auto.barProperty=anothervalue
instance6_id##instance6_name##instance6_description####auto.fooProperty=thisvalue&auto.barProperty=thatvalue
The first term (before the first ##’s) defines the unique id of the instance.
The second term (after the first ##’s and before the 2nd ##’s) defines the display name. Often this can be the same as the first term.
The third term (after the 2nd ##’s and before the 3rd ##’s) defines the description. You can leave this blank if you want, but it’s handy since it shows up in the resource tree in smaller text under the instance display name.
The fourth term (after the 3rd ##’s and before the 4th ##’s) is the “wildvalue2” which is used only in certain cases. Most often you will leave it blank as they have done in these two examples.
The fifth term is the query parameter like list of instance level properties.
So, it would seem your output line needs to look like this:
println("${it1}##${it1}######blocked_spid=${it1}&blocked_by_spid=${it2}&dbname=${it3}&loginame=${it5}&lastbatch=${it6}&cmd=${it7}&program=${it8}&Text=${it9}")