I would like to run spin:rule and spin:constructor as users edit data with 
SWA forms. I've been testing different solutions, facing a javascript 
problem now and wonder more generally if I'm on the right track. 

First, I tried turning on incremental inferencing and I get the spin:rule 
inferences triggered but not asserted. I want to persist the inferred data 
as well as it'd be nice to show in updated data in the tb-session and 
spin:constructors don't trigger. 

Second, based on this 
<http://www.topquadrant.com/2013/07/08/performing-side-effects-after-each-edit-in-topbraid-evn/>,
 
I tried creating a subClass of teamwork:EditRule to execute a SPARQLMotion 
script but that's not triggered. I found the comment in EditRule class that 
says "rules are only fired for changes that are wrapped into a 
ui:transaction and if the current query graph is an EVN project graph" so 
evidently this approach isn't for me.

Now, I'm trying to setup with swa:EditHandlers, it seems promising although 
I am facing a javascript issue. To call the EditHandler I used the 
subscribe to org.topbraid.swa.change event like this:
        gadgets.Hub.subscribe("org.topbraid.swa.change", function(event, 
data) {
            swa.callHandler("myswa:TestHandler", { resource : '<' + 
data.rootResource + '>' });
        });

... and while it gets called after editing, the changes in the handler 
triggers the event again. Where can I find the possible events, and what's 
the event I should subscribe to? I assume I'll be able to use that 
EditHandler then to apply the rules I want either in the SWP or a 
SparqlMotionScript. More generally, am I on the right track? 

Thank you in advance!

Regards,
Mark

-- 
You received this message because you are subscribed to the Google Group 
"TopBraid Suite Users", the topics of which include Enterprise Vocabulary 
Network (EVN), Reference Data Manager (RDM), TopBraid Composer, TopBraid Live, 
TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to [email protected]
--- 
You received this message because you are subscribed to the Google Groups 
"TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to