In a state machine transition line between states contains a trigger section. How is this used? In the examples I’ve seen and in the REFramework the trigger section is blank and there are conditions which take you to different states but I’m not sure how the trigger section works (not sure is a bit over optimistic, no idea is more accurate).
In all honesty I’ve never used the trigger section and the need has never arisen to use it. I don’t really know how it works either, I would assume it would be a condition that once fulfilled at any point in the workflow triggers the transition (rather than waiting till the end) but I don’t think it works in quite that way - and besides, the same can be achieved by surrounding the state in a try catch.
I wouldn’t worry too much about not knowing how to use it.
.Thanks for the reply @KEntwistle.
Just saw it and wondered why? I’m not going to lose any sleep over it though (maybe a couple of minutes at most).
If its running successfully then there is no need to worry about that, this is right. But in case of errors during the transition between states you can not even recover gracefully from error but you can do some stuff in between like closing a file in use or copying file to somewhere else or logging or anything else which can handle situation very well and keep your program stable even while error occurs. Something like this -
You can do more. Even I want to know more about these actions
Thanks @PrankurJoshi for the info, I’m not sure that I understand why you do stuff in the trigger section rather than the action area within the error section can’t you just drop a sequence in there to do whatever it was that you were going to do in the trigger area.
Still thanks for trying to educate me (it is an uphill battle!)