Node Flow Status Rpc Ops
interface NodeFlowStatusRpcOps
An RPC extension which provides access to the FlowHospital
This interface is designed to allow external applications to query and view the status of the flows which are currently under monitoring by the FlowHospital
example use:
val rpcAddress = NetworkHostAndPort("nodeAddress", 1000)
val client = MultiRPCClient(rpcAddress, NodeFlowStatusRpcOps::class.java, rpcUser.username, rpcUser.password)
val connFuture = client.start()
val conn = connFuture.get()
val flowStatusRPCOPs = conn.proxy
val matchingFlows: List<String> = flowStatusRPCOPs.getFlowsMatching(FlowStatusQuery(
flowClass = "IssueToken",
flowState = FlowState.RUNNABLE,
progressStep = "SIGNING",
cordapp = "tokens-workflows",
compatibleWithCurrentCordaRuntime = true,
suspensionDuration = Duration.ofMinutes(10),
flowStart = FlowTimeWindow.between(Instant.now().minus(30, ChronoUnit.MINUTES), Instant.now())
)
)
matchingFlows.forEach { flowId ->
println(flowStatusRPCOPs.getFlowStatus(flowId))
}
Content copied to clipboard