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:

Jul 20, 2018 in Blockchain by sabby
• 4,050 points

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

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

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
• 65,850 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
• 16,450 points
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
• 16,450 points
+1 vote
1 answer
0 votes
1 answer

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.