Allow creating an action from the selected section of a flow. The action would get the required inputs and outputs, and the flow from where it was extracted should automatically fill the action parameters with the local variables it was using
Not sure if this is new, but have been in my head in a long time now.
In some good IDE's there is an option that allows developers to better write code by not allowing it to be very big, at least at screen level actions.
This feature should allow you to:
- select a sub-set from our logic flow,
- create a new Server action with the selected flow inside;
- All the unreachable variables inside that action, should becamean Input variable;
- All the needed variables (in the original flow) should becomethe Output variables from the new screen action and the variables replaced bythose Output vars from the action;
That will provide us with a much faster refactoring with noErrors, allowing every developer to properly follow the best practices andsimplify the logic inside the actions and screen actions.
This is the idea:
https://refactoring.com/catalog/extractMethod.html
It would be nice when I have a bigger action, that I can select some if-clauses, queries etc, press right mouse click 'Create subaction' and that it create a subaction with that logic.
It would be even better if it automatically generates the right input and output parameters.
Hi Hans,
This idea is the same as: http://www.outsystems.com/ideas/106/select-part-of-an-action-flow-and-refactor-to-action
Sometimes you want to extract certain logic into a reusable server action.
It would be nice if there was an option in the designer context menu that would allow this.
The following should happen when the option is selected:
This idea is the same as https://www.outsystems.com/ideas/106/select-part-of-an-action-flow-and-refactor-to-action.
Thanks Pedro. I did do a search but couldn't find any existing ideas
Moderators, please merge with this idea.
Great idea.
Hi guys,
As promised in our Service Studio's gifts post, I'm happy to announce that a new Extract to Action command was introduced in 10.0.0.716 version. It will allow you to extract and reuse complicated logic that you created in a different place. Just select the piece of logic and click! Your action is now reusable :)
Hope you enjoy the feature :)
Thanks a lot for your feedback, please keep influencing and improving the product. Also, thanks to the MVPs that pre-tested the feature!
Really cool and handy!
Yesterday we found a bug in Extract to Action feature, even after being tested and validated by dozens of Beta users, including some of our MVPs... Unfortunately, these things happen :(
We removed 10.0.0.716 version from the download list and there is already a new version (10.0.0.717) with this problem fixed (available here: https://www.outsystems.com/home/downloads/)
Please, go get it (and sorry for the inconvenience).
Hell yeah!
I believe that is long overdue. I think that is a core feature for everyone that wishes to enforce encapsulation and good architecture in a Low Code platform.
Well done!
Hey José,
Glad you enjoyed the feature ;)
Oh heck, yes!
I've been itching to use this for the past week, and today, I had something with giant actions that could really do with refactoring. Perfect!
If I may make one small suggestion: place the End where the next node after the refactoring was...
The new End gets put here:
It would be nice - if it's possible - to put it where the next node after the split was, e.g.