Where and what is Id attribute in System.UserRole

3
In the microflow retrieve activity, the following xpath constraint is given, Entity: System.UserRole XPath constraint: [id = '[%UserRole_Employee%]'] What is the id property? It is not there in the UserRole entity. What is the [%UserRole_Employee%] Note: there is a generalization between User and Employee entities.
asked
2 answers
4

Every Mendix object has a unique, immutable id attribute. This attribute is hidden in the domain model to make the model more legible and less cluttered. Referring to the id is a simple way of saying you want that specific object and no others.

The [%UserRole_<user role="" name="">%] token is automatically generated by the modeler for every user role in your model. Every user role in the model, both default and those created by a developer, will generate such a token. These tokens allow developers to refer to user roles in UI constraints without having to resort to needlessly convoluted constructions.

answered
4

Every Mendix object has it's own id. For user roles you have extra tokens to retrieve a specific user role. The XPath above retrieves the user role Employee so you can add for instance this user role in a microflow to an account.

Regards,

Ronald

answered