I'm working with Guidewire (GOSU) and I noticed there is not much information on the internet for this language. Trying my luck here.
I am creating a GX Model in guidewire studio and i am trying to map a property. But I keep getting an exception saying:
Exception stack trace: gw.xml.gx.GxException: Could not map property PolicyContactRoles[]
Caused by: java.lang.IllegalArgumentException: Cannot traverse in window mode
Does anyone have an idea on what this exception means?
Thanks!!
All effective dated objects in Guidewire can either be in slice or window mode.
Slice - Contains the version of the object at a specific point in time, such as the effective date of the job. This is the mode that most people interact with.
Window - Contains the data for all the versions of the object for the life of the policy term.
If the bean is not sliced, then we can slice it using the below code.
period.getSlice(period.EditEffectiveDate)
In addition to the recommendation of Aravind and Edgar, You can also use AsOf for arrays and version lists
Example:
var asOf = policyPeriod.EditEffectiveDate
var covs = policyPeriod.PolicyLine.CoveragesAsOf(asOf)
for (c in covs) {
// iterate over effective items
}
var v = vehicleVersionList.AsOf(asOf) // single-slice entity from a version list
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With