Here are all the actual test exam dumps for IT exams. Most people prepare for the actual exams with our test dumps to pass their exams. So it's critical to choose and actual test pdf to succeed.

Exam InsuranceSuite-Developer Topic 1 Question 4 Discussion

Actual exam question for Guidewire's InsuranceSuite-Developer exam
Question #: 4
Topic #: 1
Given the following code sample:
gw.transaction.Transaction.runWithNewBundle(\newBundle - > {
var targetCo = gw.api.database.Query.make(ABCompany)
targetCo.compare(ABCompany#Name, Equals, " Acme Brick Co. " )
var company = targetCo.select().AtMostOneRow
company.Notes = " some value "
}, " su " )
What two items should be added or changed to follow best practices? (Select two)

Suggested Answer: A,C Vote an answer

This scenario highlights critical aspects of Bundle Management and transaction handling in Guidewire. The first and most significant issue is the modification of the company entity. In Guidewire, entities retrieved via a Query are typically " read-only " in their initial state. To modify an existing entity within a transaction, it must be explicitly associated with the current bundle. The instruction company = newBundle.add(company) clones the entity into the newBundle, making it editable. Without this step, attempting to set company.Notes would result in a runtime exception because the object is not " in the bundle. " Secondly, although the snippet shows " su " , the best practice for runWithNewBundle is to always ensure a valid, non-null user is passed to provide the necessary security context for the transaction. In many development scenarios, hardcoding " su " (Super User) is considered a placeholder, and production-ready code should dynamically resolve the appropriate user or ensure the execution context is valid.
Regarding the other options: Option B is incorrect because runWithNewBundle automatically handles the commit() operation at the end of the code block; manually calling it is redundant and can cause errors. Option E is a technical misunderstanding of the API, as the Query object (targetCo) is a tool used to find data and is never " added " to a database bundle. By following the pattern of adding the entity to the bundle and ensuring proper user context, the developer adheres to the core principles of Gosu Bundle Management and data integrity.

by Andy at Jun 14, 2026, 08:37 AM

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Nick name: Submit Cancel
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.