Deciphering what I built (object decision and cast)
Hi all, I’ve been one of our apps to improve how it runs, rebuilding things that I have since learnt to build more efficiently (quite a fun exercise, seeing how I built things when I first started and improving it!). I am currently working on the CustomUserProviosning microflow in the SAML Module. One of the first actions in this is: I’m not sure I fully understand how cast object works – and whether it’s really necessary at the start. From my understanding, the object type decision is confirming what entity is generalizing to System.User, following the Administration.Account path, it then Casts account. Is this even needed? Thinking as I type, the microflow does change the “Account” object, which the returned object from the Cast is used for. Just looking for some general advice on what this all means and whether it’s set up correctly. I am just missing some information on what makes the cast action necessary.
Yes it is needed at the start. As you can see from your domain model Account inherits from User. So every Account is a user but not every user might have an account. Now in the above microflow you want to work with an Account object. So when the current user is also an Account you want to procede but if not you go the other route to give LoginFeedback.