IP Library › Granted Patent US 12,572,826
Granted Patent B2
US 12,572,826 · App. 17/993,761 · Granted Mar 10, 2026

Asynchronous rule compilation in a multi-tenant environment

Inventors: Parth Vijay Vaishnav (San Francisco, CA); Mitchell Christensen (San Francisco, CA); Kevin Han (San Francisco, CA)
Assignee: Salesforce, Inc.
G06N5/025G06F9/4881
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,572,826
App. No.
17/993,761
Granted
Mar 10, 2026
Kind
B2
Abstract

Implementation of a guided rules editor includes a rule compilation process comprising receiving, by an event handler, a compile rules event from a process external to the rule compiler. A set of rules is retrieved from a database and loading the set of rules into a memory by the event handler. Responsive to identifying any template rules, data is bound to the template rules. Both the template rules and any non-template rules are translated into a rules language specification. A rule compilation process is performed asynchronously from a rule execution process to translate the rule language specification into a knowledge base that is to be used as input by a rule execution process. A compile completion event is emitted at compile completion.

Claims (46)

1 . A computing device, comprising:

one or more processors; and

a non-transitory machine-readable storage medium that provides instructions that, if executed by the one or more processors, are configurable to cause the computing device to compile rules for a rules engine by:

receiving, by an event handler, a compile rules event from a process external to a rule compiler;

retrieving a set of rules from a database;

loading the set of rules into a memory, wherein the set of rules includes template rules and non-template rules;

fetching data from a data source, wherein placeholder variables included in the template rules are replaced with the fetched data;

generating a rules language specification based on the template rules and the non-template rules;

executing a compilation thread on the rules language specification to generate compiled rules;

asynchronously executing an execution thread concurrently with the compilation thread to perform a rule execution process;

storing a serialized knowledge base in a database for use by the rules engine during a subsequent rule execution process, wherein the serialized knowledge base includes serialized compiled rules; and

outputting a compile completion event.

2 . The computing device of claim 1 , wherein the compilation thread is on a tier lower than the execution thread.

3 . The computing device of claim 1 , wherein the compilation thread is executed in a multi-tenant infrastructure servicing multiple organizations, and wherein concurrency of compilation thread execution is set to one per organization so that only one compilation thread runs is executed at a time per organization.

4 . The computing device of claim 1 , further comprising a retry mechanism, which responsive to a non-blocking recoverable error, a rule compilation process is re-enqueued after a period of time to provide infrastructure time to recover.

5 . The computing device of claim 1 , further comprising a failure handling mechanism, which responsive to a non-recoverable failure, stops a compilation process and sends a failure event to a user explaining the failure.

6 . The computing device of claim 1 , further comprising configuration guardrails to prevent excessive resource utilization, the configuration guardrails including maximum limits on a number of rules per rule set, a number of template rules per rule set, and an overall size of a compiled knowledge base.

7 . A non-transitory machine-readable storage medium that provides instructions that, if executed by a set of one or more processors, are configurable to cause the set of one or more processors to perform operations comprising:

receive, by an event handler, a compile rules event from a process external to a rule compiler;

retrieve a set of rules from a database; load the set of rules into a memory, wherein the set of rules includes template rules and non-template rules;

fetch data from a data source, wherein placeholder variables included in the template rules are replaced with the fetched data;

generate a rules language specification based on the template rules and the non-template rules;

execute a compilation thread on the rules language specification to generate compiled rules;

asynchronously execute an execution thread concurrently with the compilation thread to perform a rule execution process;

store a serialized knowledge base in a database for use by a rules engine during a subsequent rule execution process, wherein the serialized knowledge base includes serialized compiled rules; and

output a compile completion event.

8 . The non-transitory machine-readable storage medium of claim 7 , wherein the compilation thread is on a tier lower than the execution thread.

9 . The non-transitory machine-readable storage medium of claim 7 , wherein the compilation thread is executed in a multi-tenant infrastructure servicing multiple organizations, and wherein concurrency of compilation thread execution is set to one per organization so that only one compilation thread is executed at a time per organization.

10 . The non-transitory machine-readable storage medium of claim 7 , further comprising a retry mechanism, which responsive to a non-blocking recoverable error, a rule compilation process is re-enqueued after a period of time to provide infrastructure time to recover.

11 . The non-transitory machine-readable storage medium of claim 7 , further comprising a failure handling mechanism, which responsive to a non-recoverable failure, stops a compilation process and sends a failure event to a user explaining the failure.

12 . The non-transitory machine-readable storage medium of claim 7 , further comprising configuration guardrails to prevent excessive resource utilization, the configuration guardrails including maximum limits on a number of rules per rule set, a number of template rules per rule set, and an overall size of a compiled knowledge base.

13 . A method comprising:

receiving, by an event handler, a compile rules event from a process external to a rule compiler;

retrieving a set of rules from a database;

loading the set of rules into a memory, wherein the set of rules includes template rules and non-template rules;

fetching data from a data source, wherein placeholder variables included in the template rules are replaced with the fetched data;

generating a rules language specification based on the template rules and the non- template rules;

executing a compilation thread on the rules language specification to generate compiled rules;

asynchronously executing an execution thread concurrently with the compilation thread to perform a rule execution process;

storing a serialized knowledge base in a database for use by a rules engine during a subsequent rule execution process, wherein the serialized knowledge base includes serialized compiled rules; and

outputting a compile completion event.

14 . The method of claim 13 , wherein the compilation thread is on a tier lower than the execution thread.

15 . The method of claim 13 , wherein the compilation thread is executed in a multi-tenant infrastructure servicing multiple organizations, and wherein concurrency of compilation thread execution is set to one per organization so that only one compilation thread is executed at a time per organization.

16 . The method of claim 13 , further comprising a retry mechanism, which responsive to a non-blocking recoverable error, a rule compilation process is re-enqueued after a period of time to provide infrastructure time to recover.

17 . The method of claim 13 , further comprising a failure handling mechanism, which responsive to a non-recoverable failure, stops a compilation process and sends a failure event to a user explaining the failure.

18 . The method of claim 13 , further comprising configuration guardrails to prevent excessive resource utilization, the configuration guardrails including maximum limits on a number of rules per rule set, a number of template rules per rule set, and an overall size of a compiled knowledge base.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 20, 2023
From: VAISHNAV, PARTH VIJAY; CHRISTENSEN, MITCHELL; HAN, KEVIN
To: SALESFORCE, INC.
Reel/Frame 062435/0629 →
Continuity (1)
Related Publication 20240169219A1 · May 23, 2024
References Cited (230)
US 5577188A · Zhu · 1996 [cited by applicant]
US 5608872A · Schwartz et al. · 1997 [cited by applicant]
US 5649104A · Carleton et al. · 1997 [cited by applicant]
US 5694603A · Reiffin · 1997 [cited by examiner]
US 5715450A · Ambrose et al. · 1998 [cited by applicant]
US 5761419A · Schwartz et al. · 1998 [cited by applicant]
US 5819038A · Carleton et al. · 1998 [cited by applicant]
US 5821937A · Tonelli et al. · 1998 [cited by applicant]
US 5831610A · Tonelli et al. · 1998 [cited by applicant]
US 5873096A · Lim et al. · 1999 [cited by applicant]
US 5918159A · Fomukong et al. · 1999 [cited by applicant]
US 5963953A · Cram et al. · 1999 [cited by applicant]
US 5983227A · Nazem et al. · 1999 [cited by applicant]
US 6092083A · Brodersen et al. · 2000 [cited by applicant]
US 6161149A · Achacoso et al. · 2000 [cited by applicant]
US 6169534B1 · Raffel et al. · 2001 [cited by applicant]
US 6178425B1 · Brodersen et al. · 2001 [cited by applicant]
US 6189011B1 · Lim et al. · 2001 [cited by applicant]
US 6216133B1 · Masthoff · 2001 [cited by applicant]
US 6216135B1 · Brodersen et al. · 2001 [cited by applicant]
US 6233617B1 · Rothwein et al. · 2001 [cited by applicant]
US 6236978B1 · Tuzhilin · 2001 [cited by applicant]
US 6266669B1 · Brodersen et al. · 2001 [cited by applicant]
US 6288717B1 · Dunkle · 2001 [cited by applicant]
US 6295530B1 · Ritchie et al. · 2001 [cited by applicant]
US 6324568B1 · Diec et al. · 2001 [cited by applicant]
US 6324693B1 · Brodersen et al. · 2001 [cited by applicant]
US 6336137B1 · Lee et al. · 2002 [cited by applicant]
US D454139S · Feldcamp et al. · 2002 [cited by applicant]
US 6367077B1 · Brodersen et al. · 2002 [cited by applicant]
US 6393605B1 · Loomans · 2002 [cited by applicant]
US 6405220B1 · Brodersen et al. · 2002 [cited by applicant]
US 6411949B1 · Schaffer · 2002 [cited by applicant]
US 6434550B1 · Warner et al. · 2002 [cited by applicant]
US 6446089B1 · Brodersen et al. · 2002 [cited by applicant]
US 6535909B1 · Rust · 2003 [cited by applicant]
US 6549908B1 · Loomans · 2003 [cited by applicant]
US 6553563B2 · Ambrose et al. · 2003 [cited by applicant]
US 6560461B1 · Fomukong et al. · 2003 [cited by applicant]
US 6574635B2 · Stauber et al. · 2003 [cited by applicant]
US 6577726B1 · Huang et al. · 2003 [cited by applicant]
US 6601087B1 · Zhu et al. · 2003 [cited by applicant]
US 6604117B2 · Lim et al. · 2003 [cited by applicant]
US 6604128B2 · Diec et al. · 2003 [cited by applicant]
US 6609150B2 · Lee et al. · 2003 [cited by applicant]
US 6621834B1 · Scherpbier et al. · 2003 [cited by applicant]
US 6654032B1 · Zhu et al. · 2003 [cited by applicant]
US 6665648B2 · Brodersen et al. · 2003 [cited by applicant]
US 6665655B1 · Warner et al. · 2003 [cited by applicant]
US 6684438B2 · Brodersen et al. · 2004 [cited by applicant]
US 6711565B1 · Subramaniam et al. · 2004 [cited by applicant]
US 6724399B1 · Katchour et al. · 2004 [cited by applicant]
US 6728702B1 · Subramaniam et al. · 2004 [cited by applicant]
US 6728960B1 · Loomans et al. · 2004 [cited by applicant]
US 6732095B1 · Warshavsky et al. · 2004 [cited by applicant]
US 6732100B1 · Brodersen et al. · 2004 [cited by applicant]
US 6732111B2 · Brodersen et al. · 2004 [cited by applicant]
US 6754681B2 · Brodersen et al. · 2004 [cited by applicant]
US 6763351B1 · Subramaniam et al. · 2004 [cited by applicant]
US 6763501B1 · Zhu et al. · 2004 [cited by applicant]
US 6768904B2 · Kim · 2004 [cited by applicant]
US 6772229B1 · Achacoso et al. · 2004 [cited by applicant]
US 6782383B2 · Subramaniam et al. · 2004 [cited by applicant]
US 6804330B1 · Jones et al. · 2004 [cited by applicant]
US 6826565B2 · Ritchie et al. · 2004 [cited by applicant]
US 6826582B1 · Chatterjee et al. · 2004 [cited by applicant]
US 6826745B2 · Coker · 2004 [cited by applicant]
US 6829655B1 · Huang et al. · 2004 [cited by applicant]
US 6842748B1 · Warner et al. · 2005 [cited by applicant]
US 6850895B2 · Brodersen et al. · 2005 [cited by applicant]
US 6850949B2 · Warner et al. · 2005 [cited by applicant]
US 6907566B1 · McElfresh et al. · 2005 [cited by applicant]
US 6925431B1 · Papaefstathiou · 2005 [cited by examiner]
US 7062502B1 · Kesler · 2006 [cited by applicant]
US 7069231B1 · Cinarkaya · 2006 [cited by applicant]
US 7069497B1 · Desai · 2006 [cited by applicant]
US 7100111B2 · McElfresh et al. · 2006 [cited by applicant]
US 7181758B1 · Chan · 2007 [cited by applicant]
US 7269590B2 · Hull et al. · 2007 [cited by applicant]
US 7289976B2 · Kihneman et al. · 2007 [cited by applicant]
US 7340411B2 · Cook · 2008 [cited by applicant]
US 7356482B2 · Frankland et al. · 2008 [cited by applicant]
US 7373599B2 · McElfresh et al. · 2008 [cited by applicant]
US 7401094B1 · Kesler · 2008 [cited by applicant]
US 7406501B2 · Szeto et al. · 2008 [cited by applicant]
US 7412455B2 · Dillon · 2008 [cited by applicant]
US 7454509B2 · Boulter et al. · 2008 [cited by applicant]
US 7508789B2 · Chan · 2009 [cited by applicant]
US 7599935B2 · La Rotonda et al. · 2009 [cited by applicant]
US 7603331B2 · Tuzhilin et al. · 2009 [cited by applicant]
US 7603483B2 · Psounis et al. · 2009 [cited by applicant]
US 7620655B2 · Larsson et al. · 2009 [cited by applicant]
US 7644122B2 · Weyer et al. · 2010 [cited by applicant]
US 7668861B2 · Steven · 2010 [cited by applicant]
US 7698160B2 · Beaven et al. · 2010 [cited by applicant]
US 7730478B2 · Weissman · 2010 [cited by applicant]
US 7747648B1 · Kraft et al. · 2010 [cited by applicant]
US 7779039B2 · Weissman et al. · 2010 [cited by applicant]
US 7779475B2 · Jakobson et al. · 2010 [cited by applicant]
US 7827208B2 · Bosworth et al. · 2010 [cited by applicant]
US 7853881B1 · Aly Assal et al. · 2010 [cited by applicant]
US 7945653B2 · Zukerberg et al. · 2011 [cited by applicant]
US 8005896B2 · Cheah · 2011 [cited by applicant]
US 8014943B2 · Jakobson · 2011 [cited by applicant]
US 8015495B2 · Achacoso et al. · 2011 [cited by applicant]
US 8032297B2 · Jakobson · 2011 [cited by applicant]
US 8073850B1 · Hubbard et al. · 2011 [cited by applicant]
US 8082301B2 · Ahlgren et al. · 2011 [cited by applicant]
US 8095413B1 · Beaven · 2012 [cited by applicant]
US 8095531B2 · Weissman et al. · 2012 [cited by applicant]
US 8095594B2 · Beaven et al. · 2012 [cited by applicant]
US 8103611B2 · Tuzhilin et al. · 2012 [cited by applicant]
US 8150913B2 · Cheah · 2012 [cited by applicant]
US 8209308B2 · Rueben et al. · 2012 [cited by applicant]
US 8209333B2 · Hubbard et al. · 2012 [cited by applicant]
US 8275836B2 · Beaven et al. · 2012 [cited by applicant]
US 8316309B2 · Bartek et al. · 2012 [cited by applicant]
US 8457545B2 · Chan · 2013 [cited by applicant]
US 8484111B2 · Frankland et al. · 2013 [cited by applicant]
US 8490025B2 · Jakobson et al. · 2013 [cited by applicant]
US 8504945B2 · Jakobson et al. · 2013 [cited by applicant]
US 8510045B2 · Rueben et al. · 2013 [cited by applicant]
US 8510664B2 · Rueben et al. · 2013 [cited by applicant]
US 8566301B2 · Rueben et al. · 2013 [cited by applicant]
US 8646103B2 · Jakobson et al. · 2014 [cited by applicant]
US 9563422B2 · Cragun et al. · 2017 [cited by applicant]
US 9740743B2 · Jagota et al. · 2017 [cited by applicant]
US 9817677B2 · Pessoa et al. · 2017 [cited by applicant]
US 10152497B2 · Doan et al. · 2018 [cited by applicant]
US 10235476B2 · Vaishnav et al. · 2019 [cited by applicant]
US 10387388B2 · Doan et al. · 2019 [cited by applicant]
US 10733613B2 · Vaishnav et al. · 2020 [cited by applicant]
US 10802660B1 · Krivopaltsev et al. · 2020 [cited by applicant]
US 10901996B2 · Doan et al. · 2021 [cited by applicant]
US 10949395B2 · Doan et al. · 2021 [cited by applicant]
US 11138222B2 · Semlani et al. · 2021 [cited by applicant]
US 11244238B2 · Jagota et al. · 2022 [cited by applicant]
US 11442989B2 · Dvinov et al. · 2022 [cited by applicant]
US 11544124B1 · Degioanni · 2023 [cited by examiner]
US 12106131B2 · Vaishnav et al. · 2024 [cited by applicant]
US 12136114B2 · Vaishnav et al. · 2024 [cited by applicant]
US 12235849B2 · Vaishnav et al. · 2025 [cited by applicant]
US 12260434B2 · Vaishnav et al. · 2025 [cited by applicant]
US 20010044791A1 · Richter et al. · 2001 [cited by applicant]
US 20020072951A1 · Lee et al. · 2002 [cited by applicant]
US 20020082892A1 · Raffel et al. · 2002 [cited by applicant]
US 20020107754A1 · Stone · 2002 [cited by examiner]
US 20020129352A1 · Brodersen et al. · 2002 [cited by applicant]
US 20020140731A1 · Subramaniam et al. · 2002 [cited by applicant]
US 20020143997A1 · Huang et al. · 2002 [cited by applicant]
US 20020162090A1 · Parnell et al. · 2002 [cited by applicant]
US 20020165742A1 · Robbins · 2002 [cited by applicant]
US 20030004971A1 · Gong · 2003 [cited by applicant]
US 20030018705A1 · Chen et al. · 2003 [cited by applicant]
US 20030018830A1 · Chen et al. · 2003 [cited by applicant]
US 20030066031A1 · Laane et al. · 2003 [cited by applicant]
US 20030066032A1 · Ramachandran et al. · 2003 [cited by applicant]
US 20030069936A1 · Warner et al. · 2003 [cited by applicant]
US 20030070000A1 · Coker et al. · 2003 [cited by applicant]
US 20030070004A1 · Mukundan et al. · 2003 [cited by applicant]
US 20030070005A1 · Mukundan et al. · 2003 [cited by applicant]
US 20030074418A1 · Coker et al. · 2003 [cited by applicant]
US 20030120675A1 · Stauber et al. · 2003 [cited by applicant]
US 20030151633A1 · George et al. · 2003 [cited by applicant]
US 20030159136A1 · Huang et al. · 2003 [cited by applicant]
US 20030184585A1 · Lin et al. · 2003 [cited by applicant]
US 20030187921A1 · Diec et al. · 2003 [cited by applicant]
US 20030189600A1 · Gune et al. · 2003 [cited by applicant]
US 20030204427A1 · Gune et al. · 2003 [cited by applicant]
US 20030206192A1 · Chen et al. · 2003 [cited by applicant]
US 20030225730A1 · Warner et al. · 2003 [cited by applicant]
US 20040001092A1 · Rothwein et al. · 2004 [cited by applicant]
US 20040010489A1 · Rio et al. · 2004 [cited by applicant]
US 20040015981A1 · Coker et al. · 2004 [cited by applicant]
US 20040027388A1 · Berg et al. · 2004 [cited by applicant]
US 20040128001A1 · Levin et al. · 2004 [cited by applicant]
US 20040186860A1 · Lee et al. · 2004 [cited by applicant]
US 20040193510A1 · Catahan et al. · 2004 [cited by applicant]
US 20040199489A1 · Barnes-Leon et al. · 2004 [cited by applicant]
US 20040199536A1 · Barnes-Leon et al. · 2004 [cited by applicant]
US 20040199543A1 · Braud et al. · 2004 [cited by applicant]
US 20040249854A1 · Barnes-Leon et al. · 2004 [cited by applicant]
US 20040260534A1 · Pak et al. · 2004 [cited by applicant]
US 20040260659A1 · Chan et al. · 2004 [cited by applicant]
US 20040268299A1 · Lei et al. · 2004 [cited by applicant]
US 20050050555A1 · Exley et al. · 2005 [cited by applicant]
US 20050091098A1 · Brodersen et al. · 2005 [cited by applicant]
US 20070150820A1 · Salvo · 2007 [cited by applicant]
US 20080208785A1 · Trefler et al. · 2008 [cited by applicant]
US 20080249972A1 · Dillon · 2008 [cited by applicant]
US 20080313556A1 · Zhang · 2008 [cited by examiner]
US 20090063382A1 · Proctor · 2009 [cited by examiner]
US 20090063415A1 · Chatfield et al. · 2009 [cited by applicant]
US 20090100342A1 · Jakobson · 2009 [cited by applicant]
US 20090177744A1 · Marlow et al. · 2009 [cited by applicant]
US 20090287617A1 · Schmidt · 2009 [cited by examiner]
US 20110099494A1 · Yan et al. · 2011 [cited by applicant]
US 20110185294A1 · Binder et al. · 2011 [cited by applicant]
US 20110218958A1 · Warshavsky · 2011 [cited by applicant]
US 20110247051A1 · Bulumulla · 2011 [cited by applicant]
US 20120005592A1 · Shrinivas · 2012 [cited by applicant]
US 20120042218A1 · Cinarkaya · 2012 [cited by applicant]
US 20120143812A1 · Proctor · 2012 [cited by examiner]
US 20120191865A1 · Duff et al. · 2012 [cited by applicant]
US 20120233137A1 · Jakobson et al. · 2012 [cited by applicant]
US 20120290407A1 · Hubbard et al. · 2012 [cited by applicant]
US 20130212497A1 · Zelenko et al. · 2013 [cited by applicant]
US 20130218948A1 · Jakobson · 2013 [cited by applicant]
US 20130218949A1 · Jakobson · 2013 [cited by applicant]
US 20130218966A1 · Jakobson · 2013 [cited by applicant]
US 20130247216A1 · Cinarkaya · 2013 [cited by applicant]
US 20140122406A1 · Xia · 2014 [cited by examiner]
US 20140359537A1 · Jackobson et al. · 2014 [cited by applicant]
US 20170139903A1 · Small · 2017 [cited by examiner]
US 20170293629A1 · Doan et al. · 2017 [cited by applicant]
US 20180096003A1 · Vaishnav et al. · 2018 [cited by applicant]
US 20180129686A1 · Vaishnav · 2018 [cited by applicant]
US 20180183671A1 · Dvinov et al. · 2018 [cited by applicant]
US 20190236184A1 · Dvinov et al. · 2019 [cited by applicant]
US 20190370363A1 · Hersans et al. · 2019 [cited by applicant]
US 20200311267A1 · Klonowski · 2020 [cited by examiner]
US 20210241300A1 · Vaishnav et al. · 2021 [cited by applicant]
US 20210241301A1 · Christensen et al. · 2021 [cited by applicant]
US 20210241328A1 · Christensen et al. · 2021 [cited by applicant]
US 20210241329A1 · Christensen et al. · 2021 [cited by applicant]
US 20210241330A1 · Vaishnav et al. · 2021 [cited by applicant]
US 20210326311A1 · Ker et al. · 2021 [cited by applicant]
US 20210406936A1 · Christensen et al. · 2021 [cited by applicant]
Red Hat, “Red Hat JBoss BRMS 6.4 Getting Started Guide”, pp. 1-32; May 13, 2019. [cited by applicant]
Red Hat JBoss BRMS 6.4, The User Guide for Red Hat JBoss BRMS, 2019 Red Hat, Inc https://access.redhat.com/documentation/en-us/red_hat_jboss_brms/6.4/html/user_guide/index. [cited by applicant]