File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
main/kotlin/net/corda/node/shell
test/kotlin/net/corda/node Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -293,6 +293,10 @@ object InteractiveShell {
293293 continue
294294 }
295295 val flow = ctor.newInstance(* args) as FlowLogic <* >
296+ if (flow.progressTracker == null ) {
297+ errors.add(" A flow must override the progress tracker in order to be run from the shell" )
298+ continue
299+ }
296300 return invoke(flow)
297301 } catch (e: StringToMethodCallParser .UnparseableCallException .MissingParameter ) {
298302 errors.add(" ${getPrototype()} : missing parameter ${e.paramName} " )
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import net.corda.core.node.ServiceHub
1111import net.corda.core.transactions.SignedTransaction
1212import net.corda.core.utilities.UntrustworthyData
1313import net.corda.client.jackson.JacksonSupport
14+ import net.corda.core.utilities.ProgressTracker
1415import net.corda.node.services.identity.InMemoryIdentityService
1516import net.corda.node.shell.InteractiveShell
1617import net.corda.testing.DUMMY_CA
@@ -30,6 +31,7 @@ class InteractiveShellTest {
3031 constructor (pair: Pair <Amount <Currency >, SecureHash .SHA256 > ) : this (pair.toString())
3132 constructor (party: Party ) : this (party.name.toString())
3233
34+ override val progressTracker = ProgressTracker ()
3335 override fun call () = a
3436 }
3537
You can’t perform that action at this time.
0 commit comments