Invalid triggering event on local/internal list

Invalid triggering event on local/internal list

mail7WJMZ
Collaborator Collaborator
206 Views
6 Replies
Message 1 of 7

Invalid triggering event on local/internal list

mail7WJMZ
Collaborator
Collaborator

[ FlexSim 20.2.3 ]

Hello,

In process flow, use Event-Triggered Source to listen local/internal list causing exception. But if's fine to listen global list.

0 Likes
Accepted solutions (1)
207 Views
6 Replies
Replies (6)
Message 2 of 7

joerg_vogel_HsH
Mentor
Mentor

@steven.chen, that is absolutely normal. Many features are only available with global lists. Global lists are treenode bound and local/internal lists aren’t. Local lists exists only as data but you can’t explore them with a table.query either. If you need tree bound features of a list, you must use global lists.

0 Likes
Message 3 of 7

joerg_vogel_HsH
Mentor
Mentor
Accepted solution

You can think about a local / internal list with a scope restricted to the function or source code where she exists. Then you can not reference the pointer from an external scope. The list declaration must be global to get access to a list. You can compare this with a declared variable in a for-loop statement block that you can not get access to from outside of this block.

Message 4 of 7

jason_lightfootVL7B4
Autodesk
Autodesk

In a simple case there's no problem with this - as shown in the attached model.

So there must be something else happening. If you've instanced process flows I can image that might cause issues - but if you could share your model that would help us understand what's happening.


EventTriggeredSourceListensToInternalList.fsm

0 Likes
Message 5 of 7

mail7WJMZ
Collaborator
Collaborator

As jason.lightfoot said, it's ok to listen event-triggered source in general process flow. But causing exception in object/instance process flow. The reason may be Jörg Vogel explained, the local list is inside scope of instance, since the instance is not instantiated so the list doesn't exists at design time, so it can't be referenced by event-triggered source. Does I understand it right?

0 Likes
Message 6 of 7

jason_lightfootVL7B4
Autodesk
Autodesk

The instances of object process flows exist when members objects are added, so you should be able to listen to them but this is not supported currently that I can see, and certainly not through the standard acitivity options.

The solution is to may the internal list type global and use partitions by instance and match the listening event to the partition (current)

Message 7 of 7

mail7WJMZ
Collaborator
Collaborator

Awesome! I didn't think of partition can solve my question.

0 Likes