Know if the same piece of code exists elsewhere.

Hello community,


Is there a way to know if there is a part of my flow elsewhere in the system?


Example:

I need to know if this same piece of code exists elsewhere.



Thank you

Hello Agno, I don't think you can search for a flow with similar elements as well as code. At below link under "Search" section you can find search options available in Service Studio.

https://success.outsystems.com/Documentation/11/Developing_an_Application/Service_Studio_Shortcuts

Hope this helps!

Thanks,

Junaid

Hi,

You cannot as far as I know.find this with OutSystems. 

I worked with static code analysis tool OmNext that was a able to find duplicated code but what if mostly.found was similar scaffolded actions. My experience was it generates more false positives than actually finding duplicate code.

In your example you code search on the condition. in the if. Then check all search results. 

Regards,

Danirl

Hi Agno,

Good question :) It Is a very good point!

In this post from Joost Landgraf (Oct 23, 2018) https://itnext.io/clean-code-in-outsystems-570eaa78d1b2 you can found this reference in point 2.Current tooling: "Upcoming are tools like Boncode to check if we don’t have duplicate code and have functions that are not too big."

I also found these articles that refers the same tool:

You can give a look at this tool.

I hope this can help you.

BR,

Luís

Hi Ango,

Unfortunately tools like OmNext and Boncode are not freeware. You will need a paid license to be able to use them. The licenses are targeting enterprise companies. 

Regards,

Dani

Agno Silveira wrote:

Hello community,


Is there a way to know if there is a part of my flow elsewhere in the system?


Example:

I need to know if this same piece of code exists elsewhere.



Thank you

 Hi Agno,


You cannot, but yes you can find actions using find usages option

 

Thank you guys!!

I will study all cases.