Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 4 Rules and Functions : Startup and Shutdown Rule Functions

Startup and Shutdown Rule Functions
Startup and shutdown rule functions are rule functions that are configured to execute during normal system startup and shutdown, respectively.
Startup and shutdown rule functions take no arguments and their Validity setting must be Action (meaning they can’t be used in conditions or queries).
See Appendix B, Engine Startup and Shutdown Sequence in TIBCO BusinessEvents Administration for a useful reference that helps you understand what you can do in startup and shutdown actions.
Startup Rule Functions
Startup rule functions are optional and are used to initialize the system. For example they can provide initial values for scorecards. Startup rule functions can be used to perform more "expensive" operations so that the system is more efficient at runtime. For example, in a startup rule function you might load specified entities from the backing store to the cache.
Startup rule functions may trigger rule actions. However, note that TIBCO BusinessEvents executes all startup rule functions before it begins the first RTC cycle, which completes when all rules eligible to execute have executed and no more actions remain.
Shutdown Rule Functions
Shutdown rule functions are optional and are used to perform various actions during a normal shutdown, for example, they can send events to external systems.
When Startup Rule Functions Execute
Startup rule functions execute on startup of an active node.
In recovery situations, startup rule functions execute on failback to a failed node that has restarted.
However, if recovery is from a situation that does not involve node failure, then startup actions do not execute. For example, the network connection goes down. The agent becomes inactive and fails over to another node. The connection is restored. The agent becomes active again, but does not restart. Startup functions do not execute on the node that became active again.
If you want to execute startup rule functions on only one node in a deployment, use programming logic to do so.
Creating Entities With a Startup Action in a Multi-Engine Project
Startup (and shutdown) rule functions execute in all active agents. When multi-engine (multi-agent) functionality is used, ensure that multiple agents do not attempt to create the same entity. See Designing for Concurrency for more information.
ActiveMatrix BusinessWorks Containers
In ActiveMatrix BusinessWorks integration projects, if ActiveMatrix BusinessWorks is running as the container, do not specify any startup actions that result in starting or invoking an ActiveMatrix BusinessWorks process.
Note that after the ActiveMatrix BusinessWorks engine is initialized, processes that invoke TIBCO BusinessEvents rule functions will fail if the TIBCO BusinessEvents engine has not finished starting up. For example, an ActiveMatrix BusinessWorks process that listens to a JMS queue may attempt to invoke a TIBCO BusinessEvents rule function before the TIBCO BusinessEvents engine has started up.

Copyright © TIBCO Software Inc. All Rights Reserved