A lot of times there is a need to calculate webMethods flow lines of code . So options for your
- Create a custom logic
- User ISCCR provided by Software AG team which has lots of advance features of static code analysis and detailed reports but would need you to have a license agreement.
The best solution would be to use ISCCR tool as its can easily plug into your CI/CD pipeline or use via Designer for creating your build gates.
There we have another solution which is WxCodeLineCalculator which is an Integration Server Package which can give you the count of different flow steps in your flow service for your full package or for all your flow services on that particular Integration Server.
What product/components do you use and which version/fix level?
This can work with all version of webMethods 10.X plus the latest version 10.11.
Are you using a free trial or a product with a customer license?
Check with your account executives on the usage of this package.
What are trying to achieve? Please describe in detail.
The way the solution works is it checks for all flow xml and parses it to get the details of following in the flow xml:
• Sequence Main
• Sequence Try or new Try flow step
• Sequence Catch or new Catch Flow step
• Invoke Services
Do you get any error messages? Please provide a full error message screenshot and log file.
In case of any issues the errors are suppressed only the flows which could be parsed are show in report.
Have you installed latest fixes for the products
Doesn’t get impacted by any other fixes
How does the Solution Works
In the years that I’ve been doing wM IS development, this has not come up even once. I’d be curious to learn when this sort of “measure” would be useful.
As a total number this is rather useless, but measured per service this could be a metric for the code complexity. However, to be integrated into the build (CI) process, it should deliver the numbers in an automtically processible way (e.g. XML), and one also should have a tool capable of interpreting the data and somehow steering the build process.
As we have had customers come asking for specially for this so shared the same
I beg to differ as its based on request from customers where they need to report this at enterprise level as similar reports are available with other programming languages .
Making it part of of CI/CD shouldnt be a problem also and creating xmls of specific format shouldnt be a challenge
Hi @Shashank_Mitra1 ,
I’m not sure if FLOW can be compared directly to other programming languages.
I would be interested in the next steps after we have this data. If a particular flow service has 20 invokes , what next? Would we try to break the service into more manageable chunks ( I’m not saying I would or would not ), would just like to know how this data can be used.
I do see how a measure like Cyclomatic complexity - Wikipedia maybe useful in aiding easy understanding though.
any programming language will have CC basically cc says if your code has branches you need to have 1 plus the number of branches to ensure you have 100 % code coverage .
Just an example say in your code you have branch ( i.e. nothing but if else) you will need to have at least 2 test cases right thats the same if you talk of if in java or other programming technology
Sure, people have asked for it. I’m wondering why. Reporting on it – okay, but what will be done with that report?
SLOC can be used in many wrong ways and likely only a few useful ways. I’m interesting in learning who knows for sure any of the useful ways.
Hi @Shashank_Mitra1. Seems its good to have tool as many times developers will be messing around the service by keep on adding logic to the same service and make it huge as the time passes. It won’t be realized until its impacting performance or too hard to manage. Especially young developers would dare to touch either because of its size or it is a business critical service.
I can see that this can be used to review if loops are over used, to review unnecessary try catch blocks, to see if many invokes are used(if too many invokes are used then saving a service for any change would test the developers patience ) etc. I would encourage to go for these kind of tools mostly for old projects and also in few cases in early development phase of project to have control over the quality of code and to make developer life easier.
yap working on creating some utility which can split big code into simple chunks
customers and developers asked so just created
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.