User interaction

Tomas Tauber
 

Hi everyone,

There is this one year old proposal about "Human task integration": https://discourse.corda.net/t/human-task-integration/1083
Are there any updates for this proposal?
As the interim solution, the current approach is to split the actions into self-contained flows + commands and track the interaction status in states (I guess ideally in LinearStates for looking up history / audit trails of actions): https://stackoverflow.com/a/45866675

For these use cases (e.g. document drafts and approvals among multiple parties), we wrote some simple utility code:
* We have a “StatusTrackingContractState” generic interface which requires a “status” attribute (could be a boolean flag, but I guess preferably an enum class or a sealed class) and a method that maps “roles” (that are recorded somewhere in that state) to parties.
* For contract state classes that implement this interface, we can specify possible transitions in a finite state machine fashion: who (i.e. which role) can execute which commands from what status to what statuses.

Using that specification, we have code that gives us two things for free:

1) Basic generic verification for contract code: checks that input and output states have their statuses according to the specification and that transactions are signed by parties of required roles.
2) Generating PUML diagrams for visualisation / documentaiton.

If anyone is interested in this code, I could possibly ask our CTO whether we can open source it.

Has anyone written any similar utility code for this stuff?

Cheers,

 
Tomas Tauber | Senior Engineer
CryptoBLK Limited  I  Revolutionize IT with Cryptography and Blockchain

Join corda-dev@groups.io to automatically receive all group messages.