Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 38 ActiveMatrix BusinessWorks Integration : Design Considerations

Design Considerations
This section presents some considerations to keep in mind when you are designing your integration project.
Integration Scope
You can only use TIBCO BusinessEvents resources that are included in the TIBCO BusinessEvents EAR file referenced in the RuleServiceProvider Configuration resource.
TIBCO BusinessEvents and ActiveMatrix BusinessWorks must be installed on the same machine.
Thread Management
TIBCO 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.
Avoiding Threading Issues
It is possible to configure a complex execution path in your project, for example, one in which TIBCO BusinessEvents invokes an ActiveMatrix BusinessWorks process, which in turn invokes a TIBCO 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 TIBCO 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 TIBCO 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.
Design Considerations Related to Container
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.
Fault Tolerance With a TIBCO BusinessEvents Container
When TIBCO 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 TIBCO 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.
On failback, agents of lower priority become standbys. During deactivation they stop the ActiveMatrix BusinessWorks engine they were running.
Tips for Working With ActiveMatrix BusinessWorks Containers
Keep the following points in mind when designing your project.
Do not execute any action in a TIBCO BusinessEvents startup rule function that results in use of BusinessWorks.invokeProcess() or BusinessWorks.startProcess() functions. The ActiveMatrix BusinessWorks engine may not be fully initialized when these functions are executed in a startup rule function (or in any rule in the RTC cycle of a startup rule function).

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved