Display the state information to a list of participants dynamically.

0 votes

I 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. Please help.

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

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

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

edited Jul 24, 2018 by sabby 25 views

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

There might be a bug in your API endpoint code.

In your code, you are setting:

val acceptors : ArrayList<Party>? = null;

And then in the subsequent loop, you have the following logic for expanding the array:

if (acceptors != null) {
    acceptors.add(to)
}

Since acceptors is initialised to null, this condition is never true and you never expand the list. As a result, when you try to construct the YoFlow, you are trying to set the target parameter to null, which isn't allowed due to Kotlin's null safety.

Try this instead:

val acceptors = mutableListOf<Party>()
answered Jul 24, 2018 by Christine
• 15,790 points

Related Questions In Blockchain

0 votes
1 answer
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
35 views
0 votes
1 answer

How do I send back ethers to the sender of the tokens in a smart contract?

Whenever a smart contract receives ether via ...READ MORE

answered May 30, 2018 in Blockchain by Perry
• 16,450 points
176 views
0 votes
1 answer

What could be the best term to use for the collection of contracts in a .sol file?

module - don't think so. Because module ...READ MORE

answered Jun 1, 2018 in Blockchain by Shashank
• 10,330 points
19 views
+1 vote
1 answer
0 votes
1 answer
+1 vote
1 answer

I would like to create a blockchain network which will stay at the same level of complexity, is it possible?

You can very easily create a cryptocurrency having a ...READ MORE

answered Apr 4, 2018 in Blockchain by Christine
• 15,790 points
20 views
0 votes
1 answer

In a Blockchain, how difficult is it to modify the third to last block?

Technically, it's not difficult at all, all ...READ MORE

answered Apr 20, 2018 in Blockchain by Christine
• 15,790 points
37 views

© 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.