Model output function used only for transition

Hi!

Let’s consider this case: I have a state machine with states INIT and END.
There is a transition from INIT to END that is triggered by the boolean MyBool
MyBool is the output of a logical function MyFunc that is allocated to state INIT.

The Problem: MyFunc is essential to calculate MyBool to perform the transition, however MyBool is its only output and the only use of MyBool is for the transition. Therefore there is no function that takes MyBool as input and it is not possible to model MyBool as function exchange.

I can’t find a way to model it, is there something wrong with this approach?
Any suggestion?

Thanks!