This site uses cookies to bring you the best experience. Find out more
Skip to main content

blog

Part 3 - Our Learning Quest on Actor Framework

Introduction

So far in the series we have covered an overview of the Actor Framework, explained the Message class, covered how to launch actors and how to send messages between them.

This part of the series will go over in more detail the Actor class that your actors inherit from. If you need to take a step back and get introduced to Actor Framework, check the intro blog post.

Inside an Actor

Remember the class hierarchy of an actor; they all inherit from a base class called Actor. Actor then exposes eight override methods that can be overridden to customise your actor behaviour.

Remember how Launch Root Actor and Launch Nested Actor are used to launch an actor? They do this by calling another VI, Launch Actor Core, which then launches an actor by using dynamic dispatch methods – this causes the new actor to run asynchronously to the calling program.

When Launch Actor Core launches an actor, it launches the Actor class base method, Actor. Actor is not an override method, but it directly and indirectly calls all of the actor methods, including the eight override methods listed above.

The above diagram shows where each of the override methods sit in the Actor method that is launched by Launch Root Actor Core. Handle Last Ack Core and Substitute Actor are sat outside of Actor because these are methods that are not directly invoked by Actor but can be sent as messages and processed by Receive Message.

Actor Overrides

The eight override methods do not need to be overridden to make a successful actor. However, it is common practice to modify some of them in order to tailor your actor behaviour.

When overriding the actor methods, the overrides are normally used in conjunction with Call Parent Class Method so that the original actor method runs along with your override e.g. your override extends the existing method functionality.

And that wraps up AF Overrides! If you have any questions about this or want to discuss this in a bit more detail, we are always keen to chat, so get in touch!

Back to Blog listings

ARGENTA IS A LEADING PROVIDER OF PRODUCT RELIABILITY AND PROCESS IMPROVEMENT SOLUTIONS.

Call 0121 514 2290 to discuss your requirements