Select part of an action flow and "Refactor to action"

By Gonçalo Borrêga on 13 May 2010
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
J.13 May 2010
That would be a nice refactoring tool,



like this option!
PG@Jumar20 Jul 2010

Nice - perhaps it could be called the 'refactoring rubberband?'
Thumbs up! : )

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



Merged from '"Extract flow to Action" operation that allows faster encapsulation of logic' (idea created on 2017-02-23 10:59:09 by José Queirós), on 2017-02-25 10:35:40 by Goncalo Borrega
Carlos Abreu1 Dec 2011
Select part of the flow chart and display the "Create Action" (Refactory)

Merged from 'Select part of the flow chart and display the "Create Action" (Refactory)' (idea created on 2011-12-01 17:16:36 by Carlos Abreu), on 2017-02-25 10:39:02 by Goncalo Borrega
Kilian Hekhuis8 Dec 2011
I haven't got a clue what you're talking about. Some explanation please?

Merged from 'Select part of the flow chart and display the "Create Action" (Refactory)' (idea created on 2011-12-01 17:16:36 by Carlos Abreu), on 2017-02-25 10:39:02 by Goncalo Borrega
J.13 Dec 2011
What he means is, you select a certain part of a (screen)action, for example a complete for-loop,

then create a custom action for it.


just making life easier, instead of creating an action.
copy/cut the for-loop
paste it in the newly created action.
solve the errors.
link the action in the previous action, so it actually gets called.
etc.


Merged from 'Select part of the flow chart and display the "Create Action" (Refactory)' (idea created on 2011-12-01 17:16:36 by Carlos Abreu), on 2017-02-25 10:39:02 by Goncalo Borrega
Markus Henschel1 Oct 2015
- Select a number of (valid) actions from flow
- right click->group or keyboard shortcut
- creates a new action + input/output parameters required to use it


Merged from 'Create Action based on selection' (idea created on 2015-10-01 09:41:08 by Markus Henschel), on 2017-02-25 10:39:29 by Goncalo Borrega
Justin James2 Oct 2015
This is an AMAZING idea, thank you! It should also immediately replace the selection with a call to the new Action! Instant refactor!

J.Ja


Merged from 'Create Action based on selection' (idea created on 2015-10-01 09:41:08 by Markus Henschel), on 2017-02-25 10:39:29 by Goncalo Borrega
Kilian Hekhuis5 Oct 2015
Yeah, +1 from me. Comes in handy when refactoring.

Merged from 'Create Action based on selection' (idea created on 2015-10-01 09:41:08 by Markus Henschel), on 2017-02-25 10:39:29 by Goncalo Borrega
André Siébra5 Oct 2015
Awesome! it looks pretty innovative. I've never seen something similar in other programming languages.

Merged from 'Create Action based on selection' (idea created on 2015-10-01 09:41:08 by Markus Henschel), on 2017-02-25 10:39:29 by Goncalo Borrega

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. 



Merged from 'Refactoring: Create a subaction from selected logic-blocks' (idea created on 2017-04-03 12:28:21 by Hans Dollen), on 2017-05-25 10:54:44 by Goncalo Borrega

Hi Hans, 


This idea is the same as: http://www.outsystems.com/ideas/106/select-part-of-an-action-flow-and-refactor-to-action



Merged from 'Refactoring: Create a subaction from selected logic-blocks' (idea created on 2017-04-03 12:28:21 by Hans Dollen), on 2017-05-25 10:54:44 by Goncalo Borrega