Event in microflow

0
Hi Mendix enthusiast, Can anyone help me for micro-flows: Is it possible to check or listen to button click in microwflow ? if I have clicked registration button---->Show Page→ listen to button click--->if clicked— show page 1---else—show page 2. problem i am facing I am not able to listen to event in microflow. and suppose my microflow have 2 show pages then it is showing the last page in microflow its skipping the middle one. Thanks in advance.
asked
1 answers
1

Hi Anushree, welcome to Mendix.

What you are describing is exactly the way microflows operate:

  • During execution, they do not listen to events. They only get triggered by them.
  • A ‘show page'-activity will always get executed as the last activity in the flow, also if it is placed earlier on.
  • Only one ‘show page'-activity will get executed since this means leaving the microflow.

 

Microflow can not:

  • have any customer action during execution. 
  • have a ‘Are you sure’ popup during execution. Only before the start, see microflow-setting "Confirmation”
  • halt, wait for an event, continue

 

So those are the obstacles.

To get what you want:

  • create a first microflow which ends with calling a page
  • have that page contain the button that the user can click.
  • have that button trigger a second microflow
  • have that microflow show page1 if choice is 1 and page2 if choice is 2

 

Your example is even more complex because apparently you want page1 to get shown if the user clicks the button, but page2 to get shown if the user does not click the button. To get that you would need to add the microflow timer addon from the AppStore.

answered