guidewire

Do rules in Guidewire applications like ContactManager run when data changes are submitted via API call?


The title of the question says it all, really. Working in Guidewire ContactManager, we have a number of custom rules in config\Rule Sets\Preupdate\ABContactPreupdate that run just fine when we do things in the UI. Question is, if we submit edits to a contact record via API instead of via UI, will these rules (.grs files) be executed at that time to validate the submitted change? For example, one of our custom rules is that no Home Office office type can have a Home Office itself. Ie, the rule is that any given Home Office is the top of the hierarchy of office types. We have other rules that exclude offices from having a Home Office, too, etc. But we are wondering if we submit an API call for a given contact that tries to assign a Home Office to a Home Office (as a home office), will the attempt to do so fail?

If anyone knows or has any idea about this possibility or issue, please comment. A conjecture or an argument one way or another is useful too, even if you don't have a pat and firm answer.


Solution

  • Matt is correct, preupdate rules are triggered whenever an entity with a rule is committed using a bundle and the CONDITION evaluates to true. The API's use bundles to do database updates so the preupdate rules fire in a similar fashion to the internal updates.

    Note: if your rule depends upon the context in which the update is running, there will be differences between PCF updates and API updates, i.e. the currentUser can be different.