Flow Management Enhancement in Corda 4.5

June 23, 2020

In our most recent Corda 4.5 release, we announced new enhancements to our flow management capabilities:

If a node user terminates a flow, counter-parties are automatically notified and any soft-locked states in the vault are automatically released.

Generally, operating a system requires multiple subsystems to function collectively and simultaneously. Occasionally, the systems do not work at the capacity they are supposed to which would require intervention by a system operator to recalibrate the system in order to restore optimal performance. In Corda, this process is referred to as flow management.

In Corda, a flow becomes problematic or unusable in situations where:

  • It is blocked due to a long-running or infinite loop.
  • It is waiting indefinitely for another node to respond.
  • It is started accidentally.

To resolve these issues, you can terminate a flow similar to how you would cancel a process.

In Corda 4.5, we have improved the existing killflow operation, so that:

  • When a flow is terminated, any counter party that has an open flow session with the flow in question is notified that the flow has ended unexpectedly
  • Any vault soft-locks held by a flow are released when the flow is terminated
  • A flow can now check programmatically whether its termination has been requested. This allows a looping flow to use this API to ensure it doesn’t loop indefinitely when a termination has been requested. Previously, the flow would wait until it reached the next checkpoint to decide whether to terminate, allowing deadlocks to occur (e.g. if the flow was caught in an infinite loop)

That is, the flow termination becomes less brute forced, and the consequence of the termination is well handled.

Find more information at out docs site at: api-flows

Want to learn more about building awesome blockchain applications on Corda? Be sure to visit corda.net, check out our community page to learn how to connect with other CorDapp developers, or sign up for one of our newsletters for the latest updates.

— Peter Li is a Developer Evangelist at R3, an enterprise blockchain software firm working with a global ecosystem of more than 350 participants across multiple industries from both the private and public sectors to develop on Corda, its open-source blockchain platform, and Corda Enterprise, a commercial version of Corda for enterprise usage.

Follow us on twitter here.