Hi Jerven Thanks for your input. I just tried your solution, but the problem is still consistent. I'll list the things I've already tried:
- change the property from xsd:dateTime to xsd:date - convert sp:now() into a string by using spif:name() and changing the property into xsd:string - and some other things I can not remember... On Monday, September 29, 2014 3:58:05 PM UTC+2, [email protected] wrote: > > Hi, > > It might be because the sp:now() is in a IF that its not being picked up > by arq for being made a constant in the query engine. So the following > might work. > > Regards, > Jerven (Not associated with topquadrant in any way) > > CONSTRUCT { > > ?EW ns:WEInitiation ?EWI . > > ?EW ns:WEHasDateTime ?EWDT . > > } > > WHERE { > BIND(now() as ?now) > ?this ns:FRHasWEThresholdLevel ?EWTL . > > ?this ns:FRHasWEScoreLevel ?EWSL . > > ?this ns:FRInitiatesWE ?EW . > > BIND (IF((?EWSL >= ?EWTL), true, false) AS ?EWI) . > > BIND (IF((?EWSL >= ?EWTL), ?now, "") AS ?EWDT) . > } > > On 29/09/14 15:53, K. J. Toad wrote: > > 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] <javascript:> > > To unsubscribe from this group, send email to > > [email protected] <javascript:> > > 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] <javascript:> > > <mailto:[email protected] <javascript:>>. > > For more options, visit https://groups.google.com/d/optout. > > -- > ------------------------------------------------------------------- > Jerven Bolleman [email protected] <javascript:> > SIB Swiss Institute of Bioinformatics Tel: +41 (0)22 379 58 85 > CMU, rue Michel Servet 1 Fax: +41 (0)22 379 58 58 > 1211 Geneve 4, > Switzerland www.isb-sib.ch - www.uniprot.org > Follow us at https://twitter.com/#!/uniprot > ------------------------------------------------------------------- > -- -- 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.
