0
votes

I have a Use case where I have to send complaint details (Complaint is a ledger ie IOUState.class)to two operators ( say JIO and Airtel) from Sender operator (TTL)

State class constructor has complaint details and three Operators (Party objects), One sender and two receivers.

The first part of the user case is executing fine and transaction/complaints details are getting logged in Vault state/Linear state.

The second part of the transaction involves one of the receiver operator sending complaint resolution response to the sender operator and should not be sending compliant response to third operator. ie Say complaint is related to Airtel then Airtel will respond to TTL and JIO needs to be out of loop.

I have written one state class and two flow classes.

But when I execute the second flow (Airtel to TTL) it is throwing java.lang.IllegalArgumentException: Flow sessions were not provided for the following transaction participants: [O=PartyJIO, L=MUMBAI, C=IN]

I have created the transaction with Command requiring only two Signers , TTL and Airtel but dont know why still getting the error

//Flow class in Airtel Node, TAP is TTL Node

List requiredSigners = Arrays.asList(getOurIdentity().getOwningKey(), TAP.getOwningKey());

Command command = new Command<>(new IOUContract.Create(), requiredSigners);

  txBuilder = new TransactionBuilder(notary)
            .addInputState(IOUState1.get(0))
            .addOutputState(outputState, IOUContract.ID)
            .addCommand(command);

FlowSession otherPartySession1 = initiateFlow(TAP); //TAP is TTL Party Object //Otherpartysession1 is getting executed at Airtel node

    SignedTransaction fullySignedTx = subFlow(new CollectSignaturesFlow(
            signedTx, Arrays.asList(otherPartySession1), CollectSignaturesFlow.tracker()));

java.lang.IllegalArgumentException: Flow sessions were not provided for the following transaction participants:

SignedTransaction fullySignedTx = subFlow(new CollectSignaturesFlow(
            signedTx, Arrays.asList(otherPartySession1), CollectSignaturesFlow.tracker()));

java.lang.IllegalArgumentException: Flow sessions were not provided for the following transaction participants:

2
remove jio from the list of participants.Arun Salaria
I have one state class. In overridden getparticipants function, i m checking whether variable to store jio is not null, then i m including three participants ttl, airtel, jio this is required for first transaction. If variable to store jio party is null, then i m including ttl, airtel as return participants. Hence for second transaction, it should return two participants onlyAmit Mallick
have you added subFlow(FinalityFlow(signedTx, listOfSession))Arun Salaria
Yes. I have added it. List of session is only one. Ie airtel to ttlAmit Mallick
Then double check the participants list print there names on the console.Arun Salaria

2 Answers

2
votes

(Developer Relations @ R3 here)

In Corda 4, you are required to pass FinalityFlow a list of sessions that includes all of the transaction's participants, so that the transaction can be distributed accordingly.

Just because someone is in this list of participants, it does not make them a required signer. The required signers are determined by the public keys listed on the transaction's commands.

0
votes

Anthony Keenan also looked at this and, on this page found out

The PartyB that is resolved from the transaction has an owning key that is different to the owning key in serviceHub.myInfo.legalIdentities so it thinks it's an 'external participant' and expects a flow session passing in.

So.. it may be the case you have recreated your keys somehow.