# US 12,001,898 B2 · Method and system for processing a stream of incoming messages sent from a specific input message source and validating each incoming message of that stream before sending them to a specific target system

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 12,001,898 B2
- Document ID: US12001898B2
- Status: Granted
- Kind: B2
- Application number: 18/060,417
- Filed: 2022-11-30
- Published: 2023-06-01
- Granted: 2024-06-04
- Earliest claimed: 2019-01-28
- Assignees: Salesforce, Inc.
- Applicants: Salesforce, Inc.
- Inventors: Steven Joseph Crouse; Charles Cox
- Web page: https://patentgrep.com/patent/US12001898B2

## CPC

- G06F 9/541: {via adapters, e.g. between incompatible applications}
- G06F 9/546: {Message passing systems or structures, e.g. queues}
- G06F 9/544: {Buffers; Shared memory; Pipes}
- H04L 51/212: using filtering or selective blocking
- H04L 63/0227: {Filtering policies (mail message filtering H04L51/212)}
- G06F 2209/547: Messaging middleware
- G06F 2209/548: Queue
- H04L 51/04: Real-time or near real-time messaging, e.g. instant messaging [IM]
- H04L 51/214: using selective forwarding
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

Methods and systems are provided for processing a stream of incoming messages sent from a specific input message source and validating each incoming message of that stream before sending them to a specific target system.

## Claims

### Claim 1

A method for processing a stream of incoming messages sent from a specific input message source and validating each incoming message of that stream at run-time via a declarative stream processing pipeline before sending processed message results to a specific target system, the method comprising:
providing a plurality of declaratively-defined, code-based validation rules that are to be applied to validate the stream of incoming messages from the specific input message source to the specific target system, wherein each of the plurality of declaratively-defined, code-based validation rules are declaratively-defined to specify a rule that an incoming message must comply with to be successfully validated; and
providing, at run-time, the plurality of declaratively-defined, code-based validation rules based on a message schema and a payload criterion for validation by a consumer;
wherein the schema comprises a field identification and a field value definition for use by the consumer.

### Claim 2 (depends on 1)

The method according to claim 1, wherein each incoming message that satisfies all of the validation rules is validated and output to a message handler, and wherein any incoming messages that fail to satisfy one or more of the validation rules is prevented from being output to the message handler.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the plurality of code-based validation rules are collectively used to validate a payload of each incoming message.

### Claim 4 (depends on 1)

The method according to claim 1, wherein at least one of the plurality of code-based validation rules is a schema validation rule used to specify a constraint about a schema of each incoming message that must be satisfied for that incoming message to be successfully validated, the method further comprising:
for each incoming message: evaluating a schema of that incoming message to ensure compliance with the schema validation rule, wherein the schema validation rule defines one or more of:
at least one field that is required to be present in each incoming message, at least one field that is allowed to be present in each incoming message, and at least one field that is not allowed to be present in each incoming message.

### Claim 5 (depends on 1)

The method according to claim 1, wherein at least one of the plurality of code-based validation rules is: a field value validation rule used to define a constraint about a value for at least one field of each incoming message that must be satisfied for that incoming message to be successfully validated, the method further comprising:
for each incoming message: evaluating a value for at least one field of that incoming message to ensure compliance with the field value validation rule.

### Claim 6 (depends on 1)

The method according to claim 1, wherein at least one of the plurality of code-based validation rules complies with:
an exact match schema that declares that schema of an incoming message must exactly match a schema defined by that validation rule for validation to be successful, wherein the schema defines a structure and type of contents for each data element within the incoming message.

### Claim 7 (depends on 1)

The method according to claim 1, wherein at least one of the plurality of code-based validation rules complies with:
an at least schema that declares that an incoming message must include fields defined in the validation rule for validation of the incoming message to be successful, and that the incoming message is permitted to include other fields not defined in the validation rule while still allowing for validation of the incoming message to be successful.

### Claim 8 (depends on 1)

The method according to claim 1, wherein at least one of the plurality of code-based validation rules complies with:
an at most schema that declares that any fields in an incoming message must exist in and conform to the validation rule for validation of the incoming message to be successful, and that not all fields declared in the validation rule are required to exist in the incoming message for validation of the incoming message to be successful.

### Claim 9

A system comprising at least one hardware-based processor and memory, wherein the memory comprises processor-executable instructions encoded on a non-transitory processor-readable media, wherein the processor-executable instructions, when executed by the hardware-based processor, cause the system to:
provide a plurality of declaratively-defined, code-based validation rules that are to be applied to validate a stream of incoming messages from a specific input message source to a specific target system, wherein each of the plurality of declaratively-defined, code-based validation rules are declaratively-defined to specify a rule that an incoming message must comply with to be successfully validated; and
provide, at run-time, the plurality of declaratively-defined, code-based validation rules based on a message schema and a payload criterion for validation by a consumer;
wherein the schema comprises a field identification and a field value definition for use by the consumer.

### Claim 10 (depends on 9)

The system according to claim 9, wherein at least one of the plurality of code-based validation rules is a schema validation rule used to specify a constraint about a schema of each incoming message that must be satisfied for that incoming message to be successfully validated, and wherein the processor-executable instructions, when executed by the hardware-based processor, cause the system to:
for each incoming message: evaluate a schema of that incoming message to ensure compliance with the schema validation rule, wherein the schema validation rule defines one or more of:
at least one field that is required to be present in each incoming message, at least one field that is allowed to be present in each incoming message, and at least one field that is not allowed to be present in each incoming message.

### Claim 11 (depends on 9)

The system according to claim 9, wherein at least one of the plurality of code-based validation rules is: a field value validation rule used to define a constraint about a value for at least one field of each incoming message that must be satisfied for that incoming message to be successfully validated, and wherein the processor-executable instructions, when executed by the hardware-based processor, cause the system to:
for each incoming message: evaluate a value for at least one field of that incoming message to ensure compliance with the field value validation rule.

### Claim 12 (depends on 9)

The system according to claim 9, wherein at least one of the plurality of code-based validation rules complies with:
an exact match schema that declares that schema of an incoming message must exactly match a schema defined by that validation rule for validation to be successful, wherein the schema defines a structure and type of contents for each data element within the incoming message.

### Claim 13 (depends on 9)

The system according to claim 9, wherein at least one of the plurality of code-based validation rules complies with:
an at least schema that declares that an incoming message must include fields defined in the validation rule for validation of the incoming message to be successful, and that the incoming message is permitted to include other fields not defined in the validation rule while still allowing for validation of the incoming message to be successful.

### Claim 14 (depends on 9)

The system according to claim 9, wherein at least one of the plurality of code-based validation rules complies with:
an at most schema that declares that any fields in an incoming message must exist in and conform to the validation rule for validation of the incoming message to be successful, and that not all fields declared in the validation rule are required to exist in the incoming message for validation of the incoming message to be successful.

### Claim 15

A non-transitory, computer-readable medium containing instructions thereon for processing a stream of incoming messages sent from a specific input message source and validating each incoming message of that stream before sending processed message results to a specific target system, wherein the instructions, which, when executed by one or more hardware processors are configurable to perform a method comprising:
providing a plurality of declaratively-defined, code-based validation rules that are to be applied to validate the stream of incoming messages from the specific input message source to the specific target system, wherein each of the plurality of declaratively-defined, code-based validation rules are declaratively-defined to specify a rule that an incoming message must comply with to be successfully validated; and
providing, at run-time, the plurality of declaratively-defined, code-based validation rules based on a message schema and a payload criterion for validation by a consumer;
wherein the schema comprises a field identification and a field value definition for use by the consumer.

### Claim 16 (depends on 15)

The non-transitory, computer-readable medium according to claim 15, wherein at least one of the plurality of code-based validation rules is a schema validation rule used to specify a constraint about a schema of each incoming message that must be satisfied for that incoming message to be successfully validated, the method further comprising:
for each incoming message: evaluating a schema of that incoming message to ensure compliance with the schema validation rule, wherein the schema validation rule defines one or more of:
at least one field that is required to be present in each incoming message, at least one field that is allowed to be present in each incoming message, and at least one field that is not allowed to be present in each incoming message.

### Claim 17 (depends on 15)

The non-transitory, computer-readable medium according to claim 15, wherein at least one of the plurality of code-based validation rules is: a field value validation rule used to define a constraint about a value for at least one field of each incoming message that must be satisfied for that incoming message to be successfully validated, the method further comprising:
for each incoming message: evaluating a value for at least one field of that incoming message to ensure compliance with the field value validation rule.

### Claim 18 (depends on 15)

The non-transitory, computer-readable medium according to claim 15, wherein at least one of the plurality of code-based validation rules complies with:
an exact match schema that declares that schema of an incoming message must exactly match a schema defined by that validation rule for validation to be successful, wherein the schema defines a structure and type of contents for each data element within the incoming message.

### Claim 19 (depends on 15)

The non-transitory, computer-readable medium according to claim 15, wherein at least one of the plurality of code-based validation rules complies with:
an at least schema that declares that an incoming message must include fields defined in the validation rule for validation of the incoming message to be successful, and that the incoming message is permitted to include other fields not defined in the validation rule while still allowing for validation of the incoming message to be successful.

### Claim 20 (depends on 15)

The non-transitory, computer-readable medium according to claim 15, wherein at least one of the plurality of code-based validation rules complies with:
an at most schema that declares that any fields in an incoming message must exist in and conform to the validation rule for validation of the incoming message to be successful, and that not all fields declared in the validation rule are required to exist in the incoming message for validation of the incoming message to be successful.
