In nearly all cases, business logic is transactional - it operates in response to inserts, updates and delete of Domain Objects. ABL also provides support for Direct Logic Invocation, so that clients can invoke Logic Class Methods without requiring attribute changes, for example:
LogicContext provides services to address these requirements as described below, illustrated in
Invoke the desired Logic Class Method using the invokeAction as shown on the highlit line. Note the first argument designates the name of the Logic Method to invoke.
You can register a listener for obtaining the return object as shown by the comment Logic Class Method return object.
You can pass arguments to the Logic Method by supplying an Object array as shown by the comment Logic Class Method parameters. An exception will be raised if the number and types do not match the target method.
Your Logic Class Method can make updates, which are subjected to the usual business logic. Your client code can determine what changes occurred using the transaction by registering a listener as shown below:
Direct Invocation is for methods in your Logic Class, as shown here for PurchaseorderLogic. Observe you must provide the @Invocable annotation. Also observe your Logic Method has the usual context beans (here