https://github.com/bptlab/mantichor-corda
Corda R3 adapter for the Mantichor choreography framework
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.2%) to scientific vocabulary
Repository
Corda R3 adapter for the Mantichor choreography framework
Basic Info
- Host: GitHub
- Owner: bptlab
- Language: Kotlin
- Default Branch: master
- Size: 124 MB
Statistics
- Stars: 5
- Watchers: 7
- Forks: 0
- Open Issues: 6
- Releases: 1
Metadata Files
README.md
Mantichor Corda Adapter
Adapter for Mantichor to execute Process Choreographies on the Corda Platform. In the wiki you can find the detailled architecture and design concept. In this Readme you will find a quick start to build and run the adapter.
Repository Structure
adapterServer/| Node.js server and pre-built jarscordapp_template/| intelliJ CorDapp project as templateinitGen/| src for the pre-built jar to calculate the participant list and the right address for task executiontasksGen/| src for the pre-built jar to calculate executable tasks based on corda statebpmnParser/| src for the pre-built jar for bpmn parsing and project generation.gitignore| files ignored by GitDockerfile| Docker configurationREADME.md| Readme about the repositoryconstants.properties| Corda configuration
Deployment
You can start a pre-built version of the adapter using docker. Make sure that the latest versions of docker is installed.
Starting
Open a terminal window and use docker pull ferandal/cordaadapter and then docker run —rm -p 8080:8080 ferandal/cordaadapter.
Stopping
To stop the server just kill the docker container: Docker kill (DockerID).
Execute tasks
With Postman you can then send requests to localhost:8080 as described in the REST API for mantichor. The implemented interface can be found as Swagger Documentation in Mantichor's Frontend Repository.
Development
Requirements
- Java 8 JVM - at least version 8u171, but not Java 9 or higher.
- IntelliJ IDEA - supported versions 2017.x, 2018.x and 2019.x (with Kotlin plugin version 1.2.71).
- Gradle 4.10 - the gradlew script in the project will download it for you.
IntelliJ Settings
- Open IntelliJ.
- Open the folder
bpmnParser\as project in IntelliJ. - Make sure that the folder
src\is marked as Sources Root. - Click
File, thenProject Structure. UnderProject SDK:, set the project SDK by clickingNew..., clickingJDK, and navigating toC:\Program Files\Java\jdk1.8.0_XXXon Windows orLibrary/Java/JavaVirtualMachines/jdk1.8.XXXon MacOSX (where XXX is the latest minor version number). ClickApplyfollowed byOK.
Build the project
For developing the bpmn parser:
1. Inside of the main() function of the XmlReader.kt you have to set the path to the testing bpmn. The default value is choreo.bpmn as this is used by the adapter server.
2. Run the XmlReader.kt, which will generate a CorDapp project for the BPMN under mantichor-corda\cordapp__XXX\ (XXX = id of the BPMN).
diff
! If you want to run XmlReader.kt for the first time, a popup window will appear,
! where you simply click on "Configure Kotlin" and then select "Java".
3. Open a terminal window in the cordapp_XXX directory.
diff
! For Windows: The project is build for the Unix platform.
! Therefore, you have to open the generated CorDapp as project in IntelliJ.
! Then delete the folder `.gradle` and the file `gradle-wrapper.properties`
! under `mantichor-corda\cordapp__XXX\gradle\wrapper`.
! Then click on `Import changes`.
4. Run the build Gradle task to compile our CorDapp project:
Unix/Mac OSX: ./gradlew build
Windows: gradlew.bat build
5. Run the deployNodes Gradle task to build four nodes with our CorDapp already installed on them:
Unix/Mac OSX: ./gradlew deployNodes
Windows: gradlew.bat deployNodes
6. Start the nodes by running the following command:
Unix/Mac OSX: workflows-kotlin/build/nodes/runnodes
Windows: call workflows-kotlin/build/nodes/runnodes.bat
7. Each participant server needs to be started in its own terminal/command prompt, replace participantID with the specific participant id, e.g. participant_a:
Unix/Mac OSX: ./gradlew runparticipantIDServer
Windows: gradlew.bat runparticipantIDServer
diff
+ Under `mantichor-corda\bpmnParser\` you will find the file `deployServer.txt`,
+ which the `XmlReader.kt` has also generated. There you have a list of the participants.
Node.js Server
The server that implements the defined interface lives inside the mantichor-corda\adapterServer\ folder. The index.js file contains the server. You need to have Node.js installed to run it. The server is completely written with libraries that Node.js provides. Therefore, additional installations are not required. To run it, open a terminal window and execute node index.js.
Execute tasks in development
To test the Server refere to the defined interface and send the corresponding requests to http://localhost:8080. We recomment to use Postman to do that. For testing the projects, that are generated by the bpmn parser, you need to send the request to the corresponding corda node. For excuting a task corda implies a special structure:
http://localhost:50005/api/generatedBPMNID/TASKNAME?partyName0=O=FIRSTPARTICIPANTID, L=London, C=GB&partyName1=O=SECONDPARTICIPANTID, L=London, C=GB&...
For example you could run: http://localhost:50005/api/generatedchoreo/Task?partyName0=O=participant_a, L=London, C=GB&partyName1=O=participant_b, L=London, C=GB
tags: Corda Adapter Corda Process Choreography
Owner
- Name: Business Process Technology
- Login: bptlab
- Kind: organization
- Location: Potsdam, Germany
- Website: https://bpt.hpi.uni-potsdam.de
- Repositories: 37
- Profile: https://github.com/bptlab
Business Process Technology @ Hasso Plattner Institute, University of Potsdam
GitHub Events
Total
Last Year
Issues and Pull Requests
Last synced: over 1 year ago
All Time
- Total issues: 6
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 1
- Total pull request authors: 0
- Average comments per issue: 0.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- Ferandal (6)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- node 10 build
- ferandal/cordaadapter latest
- net.corda:corda $corda_release_version compile
- net.corda:corda-core $corda_release_version compile
- net.corda:corda-jackson $corda_release_version compile
- net.corda:corda-rpc $corda_release_version compile
- org.apache.logging.log4j:log4j-web $log4j_version compile
- org.jetbrains.kotlin:kotlin-stdlib-jdk8 $kotlin_version compile
- org.springframework.boot:spring-boot-starter-log4j2 $spring_boot_version compile
- org.springframework.boot:spring-boot-starter-websocket $spring_boot_version compile
- junit:junit $junit_version testCompile
- net.corda:corda-node-driver $corda_release_version testCompile
- org.jetbrains.kotlin:kotlin-test $kotlin_version testCompile
- org.jetbrains.kotlin:kotlin-stdlib-jdk8 $kotlin_version implementation
- org.jetbrains.kotlin:kotlin-stdlib-jdk8 $kotlin_version implementation
- org.apache.logging.log4j:log4j-slf4j-impl $log4j_version runtimeOnly
- junit:junit $junit_version testImplementation
- org.jetbrains.kotlin:kotlin-test $kotlin_version testImplementation