lucacampanella / corda-flows-doc-builder Goto Github PK
View Code? Open in Web Editor NEWGradle plugin to automatically generate graph that represent Corda flows interactions
License: Apache License 2.0
Gradle plugin to automatically generate graph that represent Corda flows interactions
License: Apache License 2.0
Current flow graphs lack information about how they are triggered (or it's quite hidden).
see https://solutions.corda.net/corda-modelling-notation/views/views-flow-sequence.html -> nr4 Initiating Flow or nr6 InitiatedBy
Would be helpful to see why a certain Flow was initiated in the first place.
Fix getStringDescription() method of InitiateFlow to display the party as an argument and not the target session name
Right now instructions like continue, break, throw and return are shown, but not properly handled when considering what are the possible combinations of runtime execution, sometimes this leads tosaying the flow doesn't have a correct protocol when it does or vice versa
Probably a hard one as it isn't always clear just by looking at static code. But at least for simple cases that would be really helpful.
A quick solution could be to draw a box (like around initiateFlow calls) also around send and receive with an open arrow pointing nowhere. Same for cases where the alignment is not clear.
If there are two blocking condition in an if or in a loop (for example two receive of boolean
in AND between each other) right now the plugin sees and considers only one of them.
What happens if we have a receive as an argument of a send call? This will probably break the program. Test it out and fix.
Currently all Corda internal Flows are hidden, which is a good default. I would like to configure this list however.
@DocBuilderIgnore
on the method calling the subflow// docbuilder:ignore
on the line calling the subFlow,...Currently dynamically dispatched methods are not discovered, either the Overridden method is analyzed or if this method is abstract, no method body is analyzed.
Change this, for example when going up the call stack pushing up methods and checking if the upper method overrides any of these.
For an example of such a situation see the test class ExtendingSuperclassTestFlow
Right coupling send and receive with arrows doesn't take into account that there might be two different session references inside the same flow. Doing session1.send(...) and session2.send(...) can send to two different parties. This needs to be taken into account.
Hi!
An issue emerged from the cd project, in 2 different MRs, both failed to run the jarAnalyzerTask with the exception mentioned in the title and with a stacktrace:
Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 0 at spoon.support.util.EmptyClearableList.get(EmptyClearableList.java:79) at com.github.lucacampanella.callgraphflows.staticanalyzer.instructions.MethodInvocation.addToMapIfNoException(MethodInvocation.java:149) at com.github.lucacampanella.callgraphflows.staticanalyzer.instructions.MethodInvocation.fromCtStatement(MethodInvocation.java:108) at com.github.lucacampanella.callgraphflows.staticanalyzer.StaticAnalyzerUtils.getAllRelevantMethodInvocations(StaticAnalyzerUtils.java:376) at com.github.lucacampanella.callgraphflows.staticanalyzer.StaticAnalyzerUtils.getAllRelevantMethodInvocations(StaticAnalyzerUtils.java:385) at com.github.lucacampanella.callgraphflows.staticanalyzer.instructions.CodeFlowBreak.fromStatement(CodeFlowBreak.java:47) at com.github.lucacampanella.callgraphflows.staticanalyzer.matchers.MatcherHelper.instantiateStatement(MatcherHelper.java:291) at com.github.lucacampanella.callgraphflows.staticanalyzer.matchers.MatcherHelper.fromCtStatementsToStatements(MatcherHelper.java:306) at com.github.lucacampanella.callgraphflows.staticanalyzer.instructions.MethodInvocation.fromCtStatement(MethodInvocation.java:134) at com.github.lucacampanella.callgraphflows.staticanalyzer.instructions.MethodInvocation.fromCtStatement(MethodInvocation.java:68) at com.github.lucacampanella.callgraphflows.staticanalyzer.instructions.MethodInvocation.fromCtStatement(MethodInvocation.java:68) at com.github.lucacampanella.callgraphflows.staticanalyzer.instructions.MethodInvocation.fromCtStatement(MethodInvocation.java:68) at com.github.lucacampanella.callgraphflows.staticanalyzer.instructions.MethodInvocation.fromCtStatement(MethodInvocation.java:68) at com.github.lucacampanella.callgraphflows.staticanalyzer.instructions.MethodInvocation.fromCtStatement(MethodInvocation.java:68) at com.github.lucacampanella.callgraphflows.staticanalyzer.StaticAnalyzerUtils.getAllRelevantMethodInvocations(StaticAnalyzerUtils.java:376) at com.github.lucacampanella.callgraphflows.staticanalyzer.StaticAnalyzerUtils.getAllRelevantMethodInvocations(StaticAnalyzerUtils.java:385) at com.github.lucacampanella.callgraphflows.staticanalyzer.StaticAnalyzerUtils.getAllRelevantMethodInvocations(StaticAnalyzerUtils.java:385) at com.github.lucacampanella.callgraphflows.staticanalyzer.instructions.SubFlowBuilder.fromCtStatement(SubFlowBuilder.java:106) at com.github.lucacampanella.callgraphflows.staticanalyzer.matchers.MatcherHelper.initiateIfCordaRelevantStatement(MatcherHelper.java:234) at com.github.lucacampanella.callgraphflows.staticanalyzer.matchers.MatcherHelper.instantiateStatement(MatcherHelper.java:282) at com.github.lucacampanella.callgraphflows.staticanalyzer.matchers.MatcherHelper.fromCtStatementsToStatements(MatcherHelper.java:306) at com.github.lucacampanella.callgraphflows.staticanalyzer.AnalyzerWithModel.analyzeFlowLogicClass(AnalyzerWithModel.java:89) at com.github.lucacampanella.callgraphflows.staticanalyzer.instructions.SubFlowBuilder.fromCtStatement(SubFlowBuilder.java:173) at com.github.lucacampanella.callgraphflows.staticanalyzer.matchers.MatcherHelper.initiateIfCordaRelevantStatement(MatcherHelper.java:234) at com.github.lucacampanella.callgraphflows.staticanalyzer.matchers.MatcherHelper.instantiateStatement(MatcherHelper.java:282) at com.github.lucacampanella.callgraphflows.staticanalyzer.matchers.MatcherHelper.fromCtStatementsToStatements(MatcherHelper.java:306) at com.github.lucacampanella.callgraphflows.staticanalyzer.AnalyzerWithModel.analyzeFlowLogicClass(AnalyzerWithModel.java:89) at com.github.lucacampanella.callgraphflows.staticanalyzer.instructions.SubFlowBuilder.fromCtStatement(SubFlowBuilder.java:173) at com.github.lucacampanella.callgraphflows.staticanalyzer.matchers.MatcherHelper.initiateIfCordaRelevantStatement(MatcherHelper.java:234) at com.github.lucacampanella.callgraphflows.staticanalyzer.matchers.MatcherHelper.instantiateStatement(MatcherHelper.java:282) at com.github.lucacampanella.callgraphflows.staticanalyzer.matchers.MatcherHelper.fromCtStatementsToStatements(MatcherHelper.java:306) at com.github.lucacampanella.callgraphflows.staticanalyzer.AnalyzerWithModel.analyzeFlowLogicClass(AnalyzerWithModel.java:89) at com.github.lucacampanella.callgraphflows.DrawerUtil.drawFromClass(DrawerUtil.java:59) at com.github.lucacampanella.callgraphflows.DrawerUtil.drawAllStartableClasses(DrawerUtil.java:46) at com.github.lucacampanella.callgraphflows.Main.call(Main.java:83) at com.github.lucacampanella.callgraphflows.Main.main(Main.java:58)
Please if you have any ideas what could caused this, help us out.
Best regards
Mark
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.