skip to main content
Corticon Server: Integration & Deployment Guide : Inside Corticon Server : State : Reactor state

Try Corticon Now
Reactor state
A Reactor is an executable instance of a deployed Ruleflow/Decision Service. Corticon Server acts as the broker to one or more Reactors for each deployed Ruleflow. During Ruleflow execution, the Reactor is a stateless component, so all data state must be maintained in the message payloads flowing to and from the Reactor.
If a deployed Ruleflow contains multiple Rulesheets, state is preserved across those Rulesheets as the Rulesheets successively execute within the Ruleflow. However, no interaction with the client application occurs between or within Rulesheets. After the last Rulesheet within the Ruleflow is executed, the results are returned back to the client as a CorticonResponse message. Upon sending the CorticonResponse message, the Reactor is nulled out (garbage collection will remove it from memory). A new Reactor will be created for the next incoming CorticonRequest.
As an integrator, you must keep in mind that there are only two ways for you to retain state upon completion of a Ruleflow or Decision Service execution:
1. Receive and parse the data from within the CorticonResponse message. In the case of integration Option 1 or 2, the data is contained in the XML document payload or string/JDOM argument. In the case of Option 3, the data consists of Java business objects in a collection or map.
2. Persist the results of a Decision Service execution to an external database.
Once a Decision Service execution has completed, the Reactor itself does not remember anything about the data it just processed.