Solved

Switch inside a State Machine in O365

  • 22 April 2015
  • 4 replies
  • 13 views

Badge +9

Hi,

I was excited about the new Switch action in O365.

I have tried to add it inside a State Machine

70953_pastedImage_0.png

But when I want to save, here is the error I receive.

70954_pastedImage_1.png

If I remove the 3 Change State, I can save. I have selected a State in the 3 Chaneg State

Regards,

Christophe

icon

Best answer by hardyj 24 April 2015, 06:04

View original

4 replies

Badge +3

Hi Christophe,

Thank you for bringing this to our attention, and sorry to have to put your excitement on hold. But good news, our team has investigated and resolved this issue. Please feel free to try again, it should work as expected.

Jon Hardy - Nintex Product Manager

Badge +9

Hi Jon,

I do not have the issue of saving, but the Change State 1 does not happen.

It by-passes the Change State 1 and runs the first action after the Switch.

May I ask you if you can reproduce the issue?

Same screenshot applies, except the error.

Regards,

Christophe

Badge +3

Hi Christophe,

So sorry you are still having a problem and I appreciate your feedback. I will get our developers and testers right on to it, to see if they can reproduce it. If they can then to make corrections and test thoroughly the scenarios with Switch within a state machine.

Thank you once again for your time and trouble.

Regards

Jon.

Badge +3

Hi Christophe,

We could not replicate the problem but believe we can see what you were referring to. I have answered this specific case in more detail directly to you.

For others that are following this trail, I would like to highlight a few a few points (documented in the help file):

  • A state Machine will only evaluate the the change in state from a "Change State" action at the end of the State Machine and not immediately after the Change State action i.e. any actions after the Change State action but before the end of the State Machine will execute.
  • The Switch action behaviour in NW365 has changed in comparison with the on-premises version. If there is not a valid value of the Switch variable And the "Other" branch has not been selected then the workflow will suspend with error and optional error message.
  • If you wish to replicate the on-premises behaviour and effectively bypass the Switch Action then select the "Other branch" but leave the "Other branch" empty (no actions).

Why have we done this? It leads to safer Workflow design in that any unexpected non-valid value is trapped or the behaviour of ignoring the Switch Action on an invalid switch variable value is explicitly intended by the designer.

Regards

Jon

Reply