Actor Framework Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

nested actors in AF

Solved!
Go to solution

Hi,

If there is already a list of nested actors in the caller actor, is there a simple method for me to access this list? I could not find one. Otherwise, I still need to create private data for my caller actor in order to actually communicate with the nested actor, which seems a bit redundant to me. So what am I missing?

Thanks,

Danielle

"Wisdom comes from experience. Experience is often a result of lack of wisdom.”
― Terry Pratchett
Message 1 of 5
(4,695 Views)

I was curious about the same thing. If you go into the Launch Nested Actor VI, there is a sub VI in there that creates an array of launched nested actors, but it doesnt appear that you have access to that list. Would be good information if we could get it 😃

0 Kudos
Message 2 of 5
(3,255 Views)
Solution
Accepted by topic author dsavir

The reason you don't get access to this data is that it is just an array of enqueuers.  You have no way of knowing which enqueuer goes to which actor.  In the context in which we are using this data, this isn't a problem.  We are just trying to provide some generic mechanism to make it easy to stop all of your actors without having to explicitly send them stop messages.

Problem is, if you want to be able to address one specific actor out of the set, you still need to create your own private date.  The best we could do is maintain some kind of registry and lookup mechanism, but you'd still have to provide the keys.  But that's too sloppy for a lot of use cases.

An enqueuer isn't a very big data type, and you don't ever have to maintain synchronization with the array stored in Actor.lvclass, so making you store a duplicate seemed the lesser evil. 

0 Kudos
Message 3 of 5
(3,255 Views)

OK, makes sense to me. Thanks for explaining

Danielle

"Wisdom comes from experience. Experience is often a result of lack of wisdom.”
― Terry Pratchett
0 Kudos
Message 4 of 5
(3,255 Views)

I'm launching my nested actors with the "Auto Stop" set to the default of "TRUE". But when the caller is stopped and stop messages are sent to the nested actors in my parent Stop method, all actors are still running and I have to abort the project. I have to override Stop Core, store the enqueuers for the three nested actors and send them a Stop message myself before they actually stop.

I'm installing the service pack for LV2014 to make sure I'm up to date and then try it again.

0 Kudos
Message 5 of 5
(3,255 Views)