Please can anyone explain why we need extract action it's use and benefits in Outsystems.
Hi Shweta,
If I understood your question correctly,
Let's assume you have big and lengthy action flow in order to maintain that you need provide comments/notes as per best practices or else you will get warning as "Long undocumented flow" in AI mentor studio.
Now you decide to break some part of action flow into new action you can select those nodes and right click extract action.
As a platform accelerators, this feature helps and reduces time rather than copy pasting action flow nodes one by one.
Thanks That helped. If you have any links related to this then that would also be helpful.
Extract to Action feature give the option to segregate the flow into different action to easy manage. attached the screen-shot and reference link.
Please refer this OutSystems documentation for the reference.
https://success.outsystems.com/documentation/11/managing_the_applications_lifecycle/manage_technical_debt/code_analysis_patterns
I hope it will help for your question.
Thanks.
In addition to Venkatesh's answer, there are some cases where you compulsory have to use extract action, 1. When your client action calling multiple server actions, 2. When your client action calling a server action and a DB action(aggregate/SQL tool), in that case your action will call DB multiple times, so OS will show you warning and suggest you to extract that portion in a server action.
Coming to benefit, you will get modularity and reusability. It will also avoid any performance bottleneck.
Thank you @Jitender Gaur and @Sanjay Kumar Sahu that helped.
One word of warning though: extract action isn't very smart, and will often create input parameters in the new action for local variables that are only used in the code extracted. Quite often you need a lot of manual patching up, and you're quicker when you just extract the code manually.