(Irler) #1

I have a problem, trying to propagate values in a network:
my procedure:

@Procedure(name="clesius.propagate", mode=Mode.WRITE)
@Description("it.clesius.propagate('netName, 'inputName','inputValue') - propagate in net
<TrendStart>name or <Node>name with value.")
public Stream<MapResult> propagate(
@Name("net") String netName,
@Name("name") String inputName,
@Name(value = "value", defaultValue = "0") String inputValue)
propagation is OK
sets calculated properties in nodes
// try to redraw all nodes
String cypher = "MATCH p=(n:"+netName+")-[r:to]->(m:"+netName+") OPTIONAL MATCH >(x:"+netName+") WHERE not( (x)-[:to]-() ) return n,m,p,x";
Result result = db.execute(cypher);"Result: "+result);
Stream<MapResult> stream =;"Result: "+stream);
return stream;
}catch(RuntimeException e){
log.error("RuntimeException executing cypher "+e);
return Stream.empty();

in Desktop-Browser (Version 1.1.10), (Database Version 3.4.1):
call clesius.propagate("Node","ricco")
results in:

Neo.ClientError.Transaction.TransactionMarkedAsFailed: Transaction rolled back even if marked as successful

but at the end of neo4j.log, there is only:

2018-10-17 09:30:26.068+0000 INFO Result: non-empty iterator
2018-10-17 09:30:26.074+0000 INFO Result:$3@46a4dcfc

If I return Stream.empty() , all new properties are set, hence same cypher in Browser:

MATCH p=(n:Node)-[r:to]->(m:Node) OPTIONAL MATCH (x:Node) WHERE not( (x)-[:to]-() ) return n,m,p,x

is OK and has its new properties
Where is my fault?

(Irler) #2

Sorry, I forgot:

    public class MapResult {
            public final Map<String, Object> value;

        public MapResult(Map<String, Object> value) {
            this.value = value;