How to display State Information to a list of participants dynamically?

0 votes

have tweeked the Yo- CordApp to send to a list of participants instead of single participant in the target. I would like to send the YO to more than one Party, moreover I just want to display the state information to the parties which does not require the signatures of all parties. But I am stuck with the below error:

FlowLogicRef cannot be constructed for FlowLogic of type net.corda.yo.YoFlow as could not find matching constructor for: {target=null}

This is the link to my code: https://github.com/ToniyaSundaram/CordaProjects.

Jul 20, 2018 in Blockchain by sabby
• 4,350 points
63 views

1 answer to this question.

0 votes

The if condition mentioned below will never be true:
if (acceptors != null) {
    acceptors.add(to)
}

because you have set the 
val acceptors : ArrayList<Party>? = null;

So the if condition is always false and acceptors.add(to) is never executed.

Instead of 
val acceptors : ArrayList<Party>? = null;    try    val acceptors = mutableListOf<Party>()

answered Jul 23, 2018 by Omkar
• 67,290 points

Related Questions In Blockchain

0 votes
1 answer

How to get the current state of a smart contract?

Hey, you gotta provide the contract code, and ...READ MORE

answered Aug 1, 2018 in Blockchain by Perry
• 17,010 points
45 views
0 votes
1 answer

How to read a state after writing it into a chaincode?

Data that is 'written' in chaincode is ...READ MORE

answered May 28, 2018 in Blockchain by Perry
• 17,010 points
223 views
+1 vote
1 answer
0 votes
1 answer
+15 votes
5 answers