{"id":13735791,"url":"https://manosbatsis.github.io/partiture/","last_synced_at":"2025-05-08T12:31:14.285Z","repository":{"id":56211526,"uuid":"168346736","full_name":"manosbatsis/partiture","owner":"manosbatsis","description":"Compact component framework for your Corda apps","archived":false,"fork":false,"pushed_at":"2021-07-12T00:22:32.000Z","size":1103,"stargazers_count":5,"open_issues_count":3,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-07T11:50:48.425Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://manosbatsis.github.io/partiture/","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/manosbatsis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-30T13:23:16.000Z","updated_at":"2021-07-12T00:22:34.000Z","dependencies_parsed_at":"2022-08-15T14:50:11.439Z","dependency_job_id":null,"html_url":"https://github.com/manosbatsis/partiture","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manosbatsis%2Fpartiture","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manosbatsis%2Fpartiture/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manosbatsis%2Fpartiture/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manosbatsis%2Fpartiture/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/manosbatsis","download_url":"https://codeload.github.com/manosbatsis/partiture/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224732131,"owners_count":17360416,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T03:01:11.273Z","updated_at":"2024-11-15T04:30:42.923Z","avatar_url":"https://github.com/manosbatsis.png","language":"Kotlin","funding_links":[],"categories":["Tools"],"sub_categories":[],"readme":"\u003ch1 align=center\u003e\n\u003cimg src=\"logotype.svg\" width=50%\u003e\n\u003c/h1\u003e\n\n# Partiture [![Maven Central](https://img.shields.io/maven-central/v/com.github.manosbatsis.partiture/partiture.svg)](https://mvnrepository.com/artifact/com.github.manosbatsis.partiture/partiture) [![Build Status](https://travis-ci.com/manosbatsis/partiture.svg?branch=master)](https://travis-ci.com/manosbatsis/partiture)\n\nPartiture is a compact component framework for your Corda apps.\n\n## Documentation\n\nSee https://manosbatsis.github.io/partiture\n\n## What Does It Do?\n\nFor the time being, Partiture's primary goal is flow composition. \nThe following sections demonstrate simple examples of initiating and \nresponding flows.\n\n### Sample Initiating Flow \n\nStart with a `Yo!` sending flow, that uses `List\u003cParty\u003e` and `List\u003cSignedTransaction\u003e` \nfor `PartitureFlow`'s `IN` and `OUT` type variables respectively:\n\n```kotlin\n/** Create a Yo! transaction/state for each input recipient/party */\n@InitiatingFlow\n@StartableByRPC\nclass YoFlow(input: List\u003cParty\u003e) : PartitureFlow\u003cList\u003cParty\u003e, List\u003cSignedTransaction\u003e\u003e(\n        // Can be any type, just match with PartitureFlow's IN generic argument above\n        input = input \n) {\n    /** Override to manually init the flow's CallContext */\n    override fun processInput(): CallContext {\n        // do stuff...\n    }\n    /** Override to manually create the flow's OUT instance */\n\toverride fun processOutput(): List\u003cSignedTransaction\u003e {\n\t\t// do stuff...\n\t}\n}\n```\n\nBetter yet, use an `InputConverter` and `OutputConverter` instead of \noverriding `processInput()` and `processOutput()` as we did above, \nthus reducing the flow to a declaration-only class that binds everything together:\n\n```kotlin\n/** Create a Yo! transaction/state for each input recipient/party */\n@InitiatingFlow\n@StartableByRPC\nclass YoFlow(input: List\u003cParty\u003e) : PartitureFlow\u003cList\u003cParty\u003e, List\u003cSignedTransaction\u003e\u003e(\n\t\t// Can be any type, just match with PartitureFlow's IN generic argument above\n\t\tinput = input, \n        inputConverter = YoInputConverter(),// Our custom IN converter\n        outputConverter = FinalizedTxOutputConverter()) // build-in converter matching OUT\n// No implementation needed!   \n```\n\nBoth of the above flow implementations will:\n \n 1. Use the overriden `processInput()` or provided `inputConverter` respectively to initialize a `CallContext` with a call/tx entry per input `Party`\n 2. Use the build-in _default_ `TxStrategy` (since we have not provided one) on each of `CallContext.entries` to:\n \t1. Sign an initial transaction\n \t2. Create flow sessions for counter-parties, if any exist\n \t3. Perform an identity sync if any own anonymous parties are participating in the input/output states in context\n\t4. Gather and verify counter-party signatures\n\t5. Verify the original transaction builder\n\t6. Finalize the transaction\n3. Use the provided `outputConverter` to produce and return the flow's `call()` result, i.e. a signed TX per _Yo!_ state created\n\n\n### Sample Responding Flow \n\nThis is our responder flow. It uses the biuld-in  `SimpleTypeCheckingResponderTxStrategy`:\n\n```kotlin\n@InitiatedBy(YoFlow::class)\nclass YoFlowResponder(\n        otherPartySession: FlowSession\n) : PartitureResponderFlow(\n        otherPartySession = otherPartySession,\n        responderTxStrategy = \n        \tSimpleTypeCheckingResponderTxStrategy(YoContract.YoState::class.java)\n)\n```\n\nThe above responder flow will verify the transaction \nand ensure all output states are instances of `YoState` before signing.\n\n## Partiture Components\n\nPartiture provides a number of build-in components: \ninput/output converters, TX strategies, responder strategies, flow utilities \nand so on. \n\nHowever, it's main feature is the conventions and ease with which you can develop and \nreuse components specifically for your application requirements - see the \n[documentation](https://manosbatsis.github.io/partiture) for more details.\n\n \n \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/manosbatsis.github.io%2Fpartiture%2F","html_url":"https://awesome.ecosyste.ms/projects/manosbatsis.github.io%2Fpartiture%2F","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/manosbatsis.github.io%2Fpartiture%2F/lists"}