question

Lucas Klein avatar image
0 Likes"
Lucas Klein asked Lucas Klein commented

Module SDK - ProcessFlow travel task

Hello,

I am trying to create a custom ProcessFlow activity that is pretty similar to the default "TE travel" that the token must wait until the end of the task, but I'm struggling to figure out how to identify when my task is done so I can release the token. Just to contextualize, my whole process is executed at a treenode in the model and I wish to let my activity know when my process finishes so it can release the token to the next activity.

@jordan.johnson has told me that I should use the "Blocking Activity" class when I wish the token to be stopped at the activity until the process ends, so I'm using it and I also identified the Blockstates, but don't know how to use or manipulate them.

At first, I've imagined that the ProcessFlow activities could receive messages, therefore I could send a message when finished my task, but there is no "OnMessage" trigger at ProcessFlow activities. So if someone could help me to figure out how can I make this "return" to the ProcessFlow activity, I'll be very appreciated.


FlexSim 20.2.2
processflowflexsim 20.2.2module sdkdevelopmentactivity
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Matthew Gillespie avatar image
1 Like"
Matthew Gillespie answered Lucas Klein commented

The TETask object has a callbackNode variable that links to the TETask_onTaskFinished function in the Process Flow DLL:

That function just calls finish() to let the token move on:

That callbackNode is used in the onBlockingStart function of the TETask object when it creates the task sequence:

So it adds a NodeFunction task to the end of the task sequence that calls the callbackNode to let the token move on.



1601048624952.png (13.3 KiB)
1601049376767.png (22.8 KiB)
1601049388522.png (5.1 KiB)
1601049481656.png (7.2 KiB)
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Lucas Klein avatar image Lucas Klein commented ·

Thanks @matthew.gillespie ! This also helps me in another question about how to use the "objectAs()" method.

0 Likes 0 ·