Posts

Showing posts with the label corda

When to add @Suspendable to methods in a flow?

When to add @Suspendable to methods in a flow? Whats the best practice here to annotate a method as @Suspendable ? In a Flow, there may be multiple private methods that query the vault/ compute business logic. Should these be annotated with @Suspendable so it can recover if a node crashes midway? @Suspendable @Suspendable Or is @Suspendable only for methods where send / sendAndReceived are involved where its waiting for responses from counterparties? @Suspendable send sendAndReceived Anything that initiates flow with other nodes or notary. Eg: A function that calls SubFlow(This flow initiates sessions with other nodes.) The function should be annotated with @Suspendable else I see quasar errors all over. – Kid101 Jun 30 at 7:49 What about just normal methods that just do query/computation? Any benefits from a...