public IDependencyGraph GetSubgraphProducing(ValueSpecification output) { string encodedValueSpec = _resolve.EncodeBean(output); var subGraphTarget = _resolve.Resolve("subgraphProducing", Tuple.Create("msg", encodedValueSpec)); var dependencyGraph = subGraphTarget.Get <IDependencyGraph>(); if (dependencyGraph == null) { throw new IllegalStateException("Null graph returned, perhaps the cycle dissapeared"); } return(dependencyGraph); }