While developing some SPIN rules, I have encountered a problem, I don't 
know how to solve. I'm very new to ontologies, SPARQL and SPIN and my last 
thread was answered very quickly and I'm so thankful for that. So I'll try 
it again with this problem.

I have the following code that should set a DateTime as soon as a threshold 
is reached or surpassed. However, I encounter an infinite loop when using 
sp:now(). I have tried it with different methods, including just setting a 
'date' manually (e.g. 2/2/2014), which works just fine. 

*CONSTRUCT* {

    ?EW ns:WEInitiation ?EWI .

    ?EW ns:WEHasDateTime ?EWDT .

}

*WHERE* {

    *?this* ns:FRHasWEThresholdLevel ?EWTL .

    *?this* ns:FRHasWEScoreLevel ?EWSL .

    *?this* ns:FRInitiatesWE ?EW .

    *BIND* (*IF*((?EWSL >= ?EWTL), true, false) *AS* ?EWI) .

    *BIND* (*IF*((?EWSL >= ?EWTL), sp:now(), "") *AS* ?EWDT) . 
<https://groups.google.com/forum/#_msocom_1>

Can you please help me figure out what the problem is? Is it the mechanics 
of SPIN rules that won't work here? I assumed that the problem was, that 
sp:now takes the time as it is now, and again, and again, since 'now' is 
relative. But after reading the description it says that 'now' is when the 
query was started.

Thanks in advance.

K. J.

-- 
-- You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary 
Network (EVN), TopBraid Composer, TopBraid Live, TopBraid Insight, 
SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en
--- 
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