Skip to content

Commit e40595f

Browse files
committed
call ordering change
1 parent c81670e commit e40595f

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Tokens/bikemarket/workflows/src/main/java/net/corda/examples/bikemarket/flows/TransferBikeTokens.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,11 @@ public String call() throws FlowException {
7373
SignedTransaction stx = subFlow(new CollectSignaturesFlow(ptx, Collections.singletonList(sellerSession)));
7474

7575
// Update the distribution list
76-
subFlow(new UpdateDistributionListFlow(stx));
7776
SignedTransaction ftx = subFlow(new ObserverAwareFinalityFlow(stx, Collections.singletonList(sellerSession)));
7877

78+
//Add the new token holder to the distribution list
79+
subFlow(new UpdateDistributionListFlow(ftx));
80+
7981
return "\nTransfer ownership of a bike (Frame serial#: "+ this.frameModel + ", Wheels serial#: " + this.wheelsModel + ") to "
8082
+ this.holder.getName().getOrganisation() + "\nTransaction IDs: "
8183
+ ftx.getId();

Tokens/bikemarket/workflows/src/main/java/net/corda/examples/bikemarket/flows/TransferPartTokens.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,11 @@ public String call() throws FlowException {
9494
SignedTransaction stx = subFlow(new CollectSignaturesFlow(ptx, Collections.singletonList(sellerSession)));
9595

9696
// Update the distribution list
97-
subFlow(new UpdateDistributionListFlow(stx));
9897
SignedTransaction ftx = subFlow(new ObserverAwareFinalityFlow(stx, Collections.singletonList(sellerSession)));
98+
99+
//Add the new token holder to the distribution list
100+
subFlow(new UpdateDistributionListFlow(ftx));
101+
99102
return "Transfer ownership of the wheels (" +this.wheelModel+") to" +this.holder.getName().getOrganisation()
100103
+ "\nTransaction ID: " + ftx.getId();
101104
}

0 commit comments

Comments
 (0)