You can only use BusinessEvents resources that are included in the BusinessEvents EAR file referenced in the RuleServiceProvider Configuration resource.
BusinessEvents generates its own threads to execute the rule function that the ActiveMatrix BusinessWorks process calls through the Invoke RuleFunction activity. Then the ActiveMatrix BusinessWorks thread is released and the process is set to a pending state. When the rule function returns, the ActiveMatrix BusinessWorks process resumes its Ready state.
It is possible to configure a complex execution path in your project, for example, one in which BusinessEvents invokes an ActiveMatrix BusinessWorks process, which in turn invokes a BusinessEvents rule function, and so on.
The BusinessWorks.InvokeProcess() rule function and the Invoke RuleFunction activity both operate synchronously. Both attempt to acquire a lock on the BusinessEvents RTC.
Check your execution path carefully to ensure that there are no threading issues leading to deadlock. In general, make sure that no action in the entire execution path attempts to use the same working memory that is already locked.
For example, if you execute BusinessWorks.InvokeProcess() function in BusinessEvents, then in the ActiveMatrix BusinessWorks process it calls, you cannot use an Invoke RuleFunction activity to invoke a rule function in the same agent. You could invoke a rule function running in a different agent, however.
The engine used as the container is responsible for state and object management, fault tolerance, and logging. The contained engine delegates management of these features to the container. The main points to keep in mind are listed below.
When BusinessEvents is the container, ActiveMatrix BusinessWorks checkpointing can be used in a limited way. Do not use ActiveMatrix BusinessWorks checkpointing in any process that is called by
startProcess() or
invokeProcess(), or in any process called by such processes.
When an active BusinessEvents processing unit (PU) fails, standby agents in other processing units become active and take over for the agents that failed. The newly active agents (which are of the same agent class) start the ActiveMatrix BusinessWorks engine as needed.