error in mendix academy picture

1
In crash course 8.5.1, should not be the decision paths inverted for the decision to delete an account ? exists => delete not exists => do nothing / end   or the caption of the decision changed to ‘Account empty ?’  
asked
2 answers
0

Dear Sanjay Kushwah,

Your explanation is confusing, because in the Academy course the microflow says if Account is empty then delete it, if not empty then do nothing. but in your post, in your second image, you are saying the opposite of the content of the Academy course, from were you got this image? it is not in the tutorial, maybe you draw it yourself.

 

I also believe this part of the microflow is wrong, by default all HasAccount are false, but the microflow runs once the user changes its value to “yes” which is true, in this case it should be true from the beginning of the flow.

but if it this employee had an account then the value should be true, then the user will only have the option to change it from Yes to No, if user did so, then the new value “No” is pared to the flow and the flow runs with “HassAccount”=false but with associated Account object is not empty because this employee as agreed has already an account, then if account is not empty, delete it, but if it is not empty do nothing, but the flow do vice versa, if account is empty delete it!! and if it is not empty then do nothing.

 

I used the debugger to make sure of the values and it was as I said.

 

regardless of the above explanation, the microflow says clearly, if account is empty then delete it !! how can we delete an empty object ?!!

 

 

answered
-1

you have to just understand it 

has account is a boolean datatype attribute and by default it is false so has account is false 

so when someone click it as true or yes 

then condition of the microflow goes true where we are checking account needed or not $Employee/HasAccount and go to the next decision 

but if someone click on not account needed condition is false 

and microflow comes at account exists decision so we have fetched data over association

Now we check in decision in account exists or not in account entity here we put the condition  $Account= empty if account is empty (means not available) then it will go to true 

else on false we have put delete account activity

now to go to main flow of microflow account needed if account needed check true or yes (second picture of my answer) now again we check $Account object is empty or not  in create account decision after account needed decision  if it is empty then condion is true and we proceed to create account activity.

 

I hope it will help you

answered