如何从Spring Web服务器启动流程?

时间:2019-02-12 06:52:02

标签: kotlin corda

我在这里遵循了示例: https://github.com/corda/samples/blob/release-V3/cordapp-example/kotlin-source/src/main/kotlin/com/example/api/ExampleApi.kt

val signedTx = rpcOps.startTrackedFlow(::Initiator, iouValue, otherParty).returnValue.getOrThrow()

现在将其应用于流程时

val signedTx = proxy.startTrackedFlow(::OdoIOUFlow, value, otherParty).returnValue.getOrThrow()

我收到此错误消息:

Type inference failed: Cannot infer type parameter B in inline fun <T, A, B, reified R : FlowLogic<T>> CordaRPCOps.startTrackedFlow(flowConstructor: (A, B) -> R, arg0: A, arg1: B): FlowProgressHandle<T>
None of the following substitutions
receiver: CordaRPCOps  arguments: ((Double, Party?) -> OdoIOUFlow,Double,Party?)
receiver: CordaRPCOps  arguments: ((Double, Party) -> OdoIOUFlow,Double,@ParameterName Party)
can be applied to
receiver: CordaRPCOps  arguments: (KFunction2<@ParameterName Double, @ParameterName Party, OdoIOUFlow>,Double,Party?)

我的流程如下:

@InitiatingFlow
@StartableByRPC
class OdoIOUFlow(val odometerValue: Double,
              val otherParty: Party) : FlowLogic<SignedTransaction>() {

    override val progressTracker = ProgressTracker()

我在做什么错了?

0 个答案:

没有答案