Re: [topbraid-users] Accessing and mutating data in a workflow via ADS

2025-02-13 Thread Holger Knublauch
I see nothing obviously wrong with this. To debug it, could you run the same query from the Script Editor panel, and also perhaps sprinkle in some console.log debug code to see whether it’s behaving as expected? (In newer versions you can set a breakpoint on such scripts and debug them with the

Re: [topbraid-users] Accessing and mutating data in a workflow via ADS

2025-02-13 Thread Bernd Johannes
Hello Holger, I still got a problem in implementing that. The gist of the code is: data = graph.select(somequery); // returns s p o resultset target = tbs.queryGraph(WorkflowID); graph.transaction(target, "transfer", ()=>{ data.bindings.forEach(t => { graph.add(t.s, t.p, t.o); }) }) The pr

Re: [topbraid-users] Accessing and mutating data in a workflow via ADS

2025-02-04 Thread Bernd Johannes
Hi Holger, many thanks for the quick reply - I assume 'workflow_1' is the ID / Tag of the workflow? Anyway - I have now the required pointer which I was missing: tbs.queryGraph() shall provide me with the right graph to send transactions to via graph.transaction(). Splendid! Greetings Bernd O

Re: [topbraid-users] Accessing and mutating data in a workflow via ADS

2025-02-04 Thread Holger Knublauch
Hi Bernd, to add or remove triples, don't go directly through the TCH graph. That's too error prone and it's much simpler to do this let workflowGraph = tbs.queryGraph('workflow_1'); graph.transaction(workflowGraph, 'Adding a triple', () => { owl.Thing.add(rdfs.seeAlso, owl.Nothing); }); Wh

[topbraid-users] Accessing and mutating data in a workflow via ADS

2025-02-04 Thread Bernd Johannes
Hello everybody, I struggle to find the right sequence of actions to select a workflow and mutate data within via ADS. I would appreciate a solution template, that documents the relevant steps. The situation: in ontology *M* there is a modify action bound to owl:Ontology that should: - select o