mirror of
https://github.com/corda/corda.git
synced 2024-12-25 23:51:10 +00:00
Don't fail silently when running flow with no progress tracker from shell.
This commit is contained in:
commit
1528813d5b
@ -293,6 +293,10 @@ object InteractiveShell {
|
||||
continue
|
||||
}
|
||||
val flow = ctor.newInstance(*args) as FlowLogic<*>
|
||||
if (flow.progressTracker == null) {
|
||||
errors.add("A flow must override the progress tracker in order to be run from the shell")
|
||||
continue
|
||||
}
|
||||
return invoke(flow)
|
||||
} catch(e: StringToMethodCallParser.UnparseableCallException.MissingParameter) {
|
||||
errors.add("${getPrototype()}: missing parameter ${e.paramName}")
|
||||
|
@ -11,6 +11,7 @@ import net.corda.core.node.ServiceHub
|
||||
import net.corda.core.transactions.SignedTransaction
|
||||
import net.corda.core.utilities.UntrustworthyData
|
||||
import net.corda.client.jackson.JacksonSupport
|
||||
import net.corda.core.utilities.ProgressTracker
|
||||
import net.corda.node.services.identity.InMemoryIdentityService
|
||||
import net.corda.node.shell.InteractiveShell
|
||||
import net.corda.testing.DUMMY_CA
|
||||
@ -30,6 +31,7 @@ class InteractiveShellTest {
|
||||
constructor(pair: Pair<Amount<Currency>, SecureHash.SHA256>) : this(pair.toString())
|
||||
constructor(party: Party) : this(party.name.toString())
|
||||
|
||||
override val progressTracker = ProgressTracker()
|
||||
override fun call() = a
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user