43
Views
8
Comments
Solved
Know if the same piece of code exists elsewhere.
Question

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

Solution

Hi Agno!

Noticed the message, sorry bit late I guess :) just pointing that if you're using Architecture Dashboard we do have duplicated code detection findings there (went GA May 2021)

More info at: https://success.outsystems.com/Documentation/11/Managing_the_Applications_Lifecycle/Manage_technical_debt/Code_Analysis_Patterns#duplicated-code 

kind regards!

Rui

mvp_badge
MVP

Thank you Rui.

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

mvp_badge
MVP

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

mvp_badge
MVP

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

mvp_badge
MVP

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

 

mvp_badge
MVP

Thank you guys!!

I will study all cases.

Solution

Hi Agno!

Noticed the message, sorry bit late I guess :) just pointing that if you're using Architecture Dashboard we do have duplicated code detection findings there (went GA May 2021)

More info at: https://success.outsystems.com/Documentation/11/Managing_the_Applications_Lifecycle/Manage_technical_debt/Code_Analysis_Patterns#duplicated-code 

kind regards!

Rui

mvp_badge
MVP

Thank you Rui.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.