To enable an ActiveMatrix BusinessWorks process to call a BusinessEvents rule function, you configure one or more Invoke RuleFunction activities according to your needs. For ActiveMatrix BusinessWorks containers only, you also configure one RuleServiceProvider Configuration resource.See Feature Summary for an introduction to the integration features.
● See Avoiding Threading Issues for important information about avoiding deadlock.
● Be careful in using the ThreadLocal variable because the thread of execution may not be same as that in the prior activity.
● Concepts passed to the rule function are not automatically asserted into working memory. Similarly, events passed to the rule function are not automatically asserted into working memory. You must assert them explicitly.
● Object support is not provided. You can't set Object in the scope of the rule function or as its return value. You must specify a specific type of BusinessEvents object or a primitive (other than Object).All BusinessEvents primitives (except Object) are supported. Appropriate boxing and unboxing of XML primitive types to BusinessEvents primitive types is handled. For more details, refer to the Datatypes chapter in TIBCO BusinessEvents Language Reference.You can pass null values. Select the argument in the Activity Input panel of the Input tab. Click the Edit Statement (exclamation point) button. In the Edit Statement dialog, Content tab, check the Set Explicit Nil checkbox. If xsi:nil==true, then a null is passed as the argument.Base Concept and Base Event are supported as argument types. You must map a specific type to the base concept or base event. Open the Edit Statement dialog, and in the Type tab, check the Type Substitution check box. In the Type field, select XML Type Reference. Select a Schema and a Type.Execution is synchronous. The process waits for the rule function to return a value. The rule function acquires a lock on BusinessEvents working memory until the RTC cycle completes and then returns a value to the process.You can use more than one Invoke RuleFunction activity in a process only if each references a different rule session. See Avoiding Threading Issues for more details.By default the working memory is locked during the invocation (that is, the value is true). You can change this behavior by setting the lockWM parameter to false.
● The results of the rule function execution are applied to working memory after acquiring a lock on working memory.
Set the lockWM parameter to false for optimization purposes only and use with care. Set it to false only if the call does not modify the working memory in any way. For example, use it to perform stateless calls or calculations, or to create new concept instances or events, or for lookups and so on.To override the rule function at runtime, enter a global variable as the value for rulefunction in the input tab. At runtime, you can specify a rule function with a different name but the same signature as the one specified in the activity's Configuration tab. You can only use rule functions that are in the TIBCO Designer project and in the BusinessEvents EAR file deployed for the integration project.
Copyright © TIBCO Software Inc. All Rights Reserved.