To add or remove a processor for a resolver, within the resolver definition, click the hamburger menu in the upper-right corner and choose Add Processing or Remove Processing.

For information about how to define a processor, see Value processing.

The following examples show how you might use these resolvers.

If you expect responses from different resolved sources to vary, you can add a processor to the resolvers to normalize the output. In this example, the attribute's value can come from one of the following resolvers:
  • A service named GET User Profile

    With this resolver, if the Cache is Valid attribute is false, the resolver calls the GET User Profile service and uses a JSON Path processor to extract the key from the profile JSON.

  • An attribute named Key

    In the second resolver, the attribute value comes from the Key attribute, and the value requires no processing.

The following image shows the resolvers. The resolvers apply in the order shown.

Screen capture of two resolvers. The first is a service with a condition and a post-resolution value process that outputs a value. The second is an attribute that captures and stores a value without conditions or processing.

This example uses a condition and a processor together to resolve an attribute that might have a prefix. The attribute has two resolvers:
  • The first resolver has a condition to check whether the Client ID attribute has a prefix of 002. If so, the value processor removes the prefix.
  • The second resolver has no condition and passes the Client ID attribute value through with no processing.

The following image shows the resolvers. The resolvers apply in the order shown.

Screen capture of two resolvers. The first is an attribute with a condition and a post-resolution value process that outputs a value. The second is an attribute that captures and stores a value without conditions or processing.

Adding value processors directly to resolvers, rather than to the attribute itself, can be useful when pulling data from distinct sources that require different formatting.

For example, consider a bank that wants to pull in user information either from a modern system or a legacy system to authorize transactions. These systems are represented by the Account Details System and Legacy Account Details System HTTP services, respectively. With the following resolver configuration, the decision service calls to the Account Details System service if the user ID is above 10000 (indicating a new user), or to the Legacy Account Details System service if the user ID is less than or equal to 10000 (indicating a legacy user):

Screen capture of the Account Details resolver defined with a condition holding if Request.User ID is greater than 10000, a resolver type of Service, and an Extract Total Balance JSON value processor
Screen capture of the Legacy Account Details resolver defined with a condition holding if Request.User ID is less than or equal to 10000, a resolver type of Service, and an Extract Total Balance XML value processor

Data collected from the Account Details System service is formatted as JSON and requires a JSON Path processor defined on the Account Details resolver to extract a new user's total balance:

Screen capture of the Extract Total Balance JSON value processor, with a processor type of JSON Path and a path value of $.balance

Data collected from the Legacy Account Details System service is formatted as XML and requires an X Path processor defined on the Legacy Account Details resolver to extract a legacy user's total balance:

Screen capture of the Extract Total Balance XML value processor, with a processor type of X Path and an X Path value of /legacy/xyz/balance

After the decision service pulls in user data from either service, common value processing might be required regardless of where the data comes from. For example, suppose the bank has a 500 USD minimum for an active account and anything above that is available for transfers. The following SpEL processor subtracts 500 from the result of resolver processing to obtain the user's available balance for transfers:

Screen capture of the Obtain User's Available Balance for Transfers processor, with a processor type of SpEL and a processor value of #this.balance - 500