180Protocol / codaptor

Instantly add Corda to any tech stack and improve resiliency of your architecture
GNU Affero General Public License v3.0
15 stars 5 forks source link

Improve CordApp Introspection for flows and states #37

Closed parthbond180 closed 2 years ago

parthbond180 commented 2 years ago

Current CordApp introspection logic involves scanning Cordapp object (from Corda Core library) for all underlying cordapps loaded at the given node. States For states this logic, involves looking at all cordapp classes and filtering out all package names that are of type ContractState. However, this utilizes the Java Class forName API that instantiates an instance of the said package, causing issues. To improve this, package names only containing 'state' in their qualified name are filtered and inspected. Flows Additionally, for flow inspection, the allFlows parameter on the Cordapp object was utilized. This caused issues inspecting flows that inherit a given parent flow. Therefore, serviceFlows or rpcFlows parameters are used respectively for embedded and standalone modes.