TaskExecuter::onFinishTask isn't executed when the task is preempted

TaskExecuter::onFinishTask isn't executed when the task is preempted

amerloQ2XZU
Not applicable
5 Views
2 Replies
Message 1 of 3

TaskExecuter::onFinishTask isn't executed when the task is preempted

amerloQ2XZU
Not applicable

[ FlexSim 22.0.1 ]

Hi,

today I discovered that the trigger "OnFinishTask" isn't executed when the task is preempted. I believe that it isn't a software issue, but it is by design. Could someone explain the reason? I would suggest to execute "OnFinishTask" also when the task is preempted.

In my model I am logging all OnBeginTask and OnFinishTask and some record missing when the task is preempted.

I attached a very simple example to show the problem.

onfinishtask.fsm

1645690714232.png

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

jason_lightfootVL7B4
Autodesk
Autodesk
Accepted solution

Alessio you can detect the preemption and resumption using a process flow (example attached). I think OnStartTask and OnFinishTask are doing what they're meant to - if you'd like to suggest adding OnPrempted and OnResumed then feel free to put a feature request here or sent to the dev email.

onfinishtask_jl2.fsm

0 Likes
Message 3 of 3

amerloQ2XZU
Not applicable
Thanks jason for your support!
0 Likes