guidewire

Making Document Entity Destination Non Safe-Ordered in PolicyCenter


I have a destination configured in the messaging-config.xml file that listens to document entities, specifically document creation events, in PolicyCenter. This destination is set as safe-ordered at the account level by default. We want to change this configuration so that all documents are sent without considering the account, making the destination non safe-ordered. As I understand it, in PolicyCenter, the default safe ordering is at the account level, and the only alternate primary entity option available is Contact. Is there a way to configure this destination as non safe-ordered?


Solution

  • Yes, you can do this, but be careful and do it knowing that you're not getting safe ordering for anything using this event fired rule. To achieve this, you simply null out all of the possible primary objects for this message. In PolicyCenter, this is Account and Contact. So add these two lines to your event fired rule, as in the example below:

    message.Account = null

    message.Contact = null

    package rules.EventMessage.EventFired_dir
    
    @gw.rules.RuleName("TestRuleSet")
    internal class TestRuleSet {
      static function doCondition(messageContext : entity.MessageContext) : boolean {
    /*start00rule*/
    return true
    /*end00rule*/
    }
    
      static function doAction(messageContext : entity.MessageContext, actions : gw.rules.Action) {
    /*start00rule*/
        var message = messageContext.createMessage("Test Payload")
        message.Account = null
        message.Contact = null
    /*end00rule*/
      }
    }