How can we write generic microflow which can be used accross the application and not mapped to any field or entity.

0
  Hello, I want to make generic microflow which will work as Util and can be called from any screen. Example:  Microflow to convert a given String to Upper Case Microflow to check if the object exist in database and show message accordingly before creating new record? Microflow to check difference between 2 dates ?  Microflow to update Created By, Modified By as “System” and Creation Date Time, Modification Date Time as CurrentUTC when ever called for any given object.   Question 2 : When we create a microflow it take the page entity as input. How can I change it to take a string from textbox and return another parameter. Example: Simple example of UpperCase  I have Add course page, I want to convert entered Course name to UpperCase on Change event.  I have Add Trainee page, I want to convert entered Trainee name to UpperCase on Change event.   So I wish to have a generic microflow which takes the String as input and return the upperCase result which would be assigned automatically back to the input string. Kindly advise.  
asked
1 answers
0

Hi Abishek, 

In Mendix, you can always create microflows that accept primitive types as parameters and/or return primitives as results. However, I’d argue that only #1 and #3 in your list of use cases actually fit this. #2 and #4 both depend on certain attributes being present in the object you’re operating on (or depend on the object type itself!). 

When triggering microflows from the client (pages, buttons, lists, etc) the microflow is bound to the page context, to enforce data integrity in the execution.

To achieve what you’re asking about, you should create some generic microflows for #1 and #3, and then call your new microflows from another microflow that is bound to page context.

answered