public class FinalityFlow extends FlowLogic<T>
Verifies the given transaction, then sends it to the named notary. If the notary agrees that the transaction is acceptable then it is from that point onwards committed to the ledger, and will be written through to the vault. Additionally it will be distributed to the parties reflected in the participants list of the states.
By default, the initiating flow will commit states that are relevant to the initiating party as indicated by
StatesToRecord.ONLY_RELEVANT. Relevance is determined by the union of all participants to states which have been
included in the transaction. This default behaviour may be modified by passing in an alternate value for enum StatesToRecord
.
The transaction is expected to have already been resolved: if its dependencies are not available in local storage, verification will fail. It must have signatures from all necessary parties other than the notary.
A list of class FlowSession
s is required for each non-local participant of the transaction. These participants will receive
the final notarised transaction by calling class ReceiveFinalityFlow
in their counterpart flows. Sessions with non-participants
can also be included, but they must specify StatesToRecord.ALL_VISIBLE for statesToRecord if they wish to record the
contract states into their vaults.
The flow returns the same transaction but with the additional signatures from the notary.
NOTE: This is an inlined flow but for backwards compatibility is annotated with interface InitiatingFlow
.
Modifier and Type | Class and Description |
---|---|
static class |
FinalityFlow.Companion |
static class |
FinalityFlow.ExtraConstructorArgs |
Modifier and Type | Field and Description |
---|---|
static FinalityFlow.Companion |
Companion |
Constructor and Description |
---|
FinalityFlow(SignedTransaction transaction,
java.util.Set<net.corda.core.identity.Party> extraRecipients,
ProgressTracker progressTracker)
Deprecated.
|
FinalityFlow(SignedTransaction transaction,
java.util.Set<net.corda.core.identity.Party> extraRecipients)
Deprecated.
|
FinalityFlow(SignedTransaction transaction)
Deprecated.
|
FinalityFlow(SignedTransaction transaction,
ProgressTracker progressTracker)
Deprecated.
|
FinalityFlow(SignedTransaction transaction,
FlowSession firstSession,
net.corda.core.flows.FlowSession restSessions)
Notarise the given transaction and broadcast it to the given
class FlowSession s. This list must at least include
all the non-local participants of the transaction. Sessions to non-participants can also be provided. |
FinalityFlow(SignedTransaction transaction,
java.util.Collection<? extends net.corda.core.flows.FlowSession> sessions,
ProgressTracker progressTracker)
Notarise the given transaction and broadcast it to all the participants.
|
FinalityFlow(SignedTransaction transaction,
java.util.Collection<? extends net.corda.core.flows.FlowSession> sessions,
StatesToRecord statesToRecord,
ProgressTracker progressTracker)
Notarise the given transaction and broadcast it to all the participants.
|
FinalityFlow(SignedTransaction transaction,
java.util.Collection<? extends net.corda.core.flows.FlowSession> sessions,
java.util.Collection<net.corda.core.identity.Party> oldParticipants,
ProgressTracker progressTracker)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
SignedTransaction |
call()
This is where you fill out your business logic.
|
FinalityFlow.ExtraConstructorArgs |
getExtraConstructorArgs() |
ProgressTracker |
getProgressTracker()
Override this to provide a
class ProgressTracker . If one is provided and stepped, the framework will do something
helpful with the progress reports e.g record to the audit service. If this flow is invoked as a subflow of another,
then the tracker will be made a child of the current step in the parent. If it's null, this flow doesn't track
progress. |
SignedTransaction |
getTransaction() |
await, await, call, checkFlowIsNotKilled, checkFlowIsNotKilled, checkFlowPermission, close, flowStackSnapshot, getFlowInfo, getLogger, getOurIdentity, getOurIdentityAndCert, getProgressTracker, getRunId, getServiceHub, initiateFlow, initiateFlow, isKilled, persistFlowStackSnapshot, receive, receiveAll, receiveAllMap, recordAuditEvent, send, sendAll, sendAllMap, sendAndReceive, subFlow, track, trackStepsTree, trackStepsTreeIndex, waitForLedgerCommit, waitForStateConsumption
public static FinalityFlow.Companion Companion
public FinalityFlow(SignedTransaction transaction, java.util.Set<net.corda.core.identity.Party> extraRecipients, ProgressTracker progressTracker)
public FinalityFlow(SignedTransaction transaction, java.util.Set<net.corda.core.identity.Party> extraRecipients)
public FinalityFlow(SignedTransaction transaction)
public FinalityFlow(SignedTransaction transaction, ProgressTracker progressTracker)
public FinalityFlow(SignedTransaction transaction, FlowSession firstSession, net.corda.core.flows.FlowSession restSessions)
Notarise the given transaction and broadcast it to the given class FlowSession
s. This list must at least include
all the non-local participants of the transaction. Sessions to non-participants can also be provided.
transaction
- What to commit.class FlowSession
public FinalityFlow(SignedTransaction transaction, java.util.Collection<? extends net.corda.core.flows.FlowSession> sessions, ProgressTracker progressTracker)
Notarise the given transaction and broadcast it to all the participants.
transaction
- What to commit.sessions
- A collection of class FlowSession
s for each non-local participant of the transaction. Sessions to non-participants can
also be provided.public FinalityFlow(SignedTransaction transaction, java.util.Collection<? extends net.corda.core.flows.FlowSession> sessions, StatesToRecord statesToRecord, ProgressTracker progressTracker)
Notarise the given transaction and broadcast it to all the participants.
transaction
- What to commit.sessions
- A collection of class FlowSession
s for each non-local participant of the transaction. Sessions to non-participants can
also be provided.statesToRecord
- Which states to commit to the vault.public FinalityFlow(SignedTransaction transaction, java.util.Collection<? extends net.corda.core.flows.FlowSession> sessions, java.util.Collection<net.corda.core.identity.Party> oldParticipants, ProgressTracker progressTracker)
Notarise the given transaction and broadcast it to all the participants.
transaction
- What to commit.sessions
- A collection of class FlowSession
s for each non-local participant.oldParticipants
- An optional collection of parties for participants who are still using the old API.
You will only need to use this parameter if you have upgraded your CorDapp from the V3 FinalityFlow API but are required to provide backwards compatibility with participants running V3 nodes. If you're writing a new CorDapp then this does not apply and this parameter should be ignored.
public FinalityFlow.ExtraConstructorArgs getExtraConstructorArgs()
public SignedTransaction call()
This is where you fill out your business logic.
public SignedTransaction getTransaction()
public ProgressTracker getProgressTracker()
Override this to provide a class ProgressTracker
. If one is provided and stepped, the framework will do something
helpful with the progress reports e.g record to the audit service. If this flow is invoked as a subflow of another,
then the tracker will be made a child of the current step in the parent. If it's null, this flow doesn't track
progress.
Note that this has to return a tracker before the flow is invoked. You can't change your mind half way through.
class ProgressTracker