Jamal; I take it the module looks like the attached image.  I.e. two sml:updateQuery statements.  As stated earlier, only one will be executed.  Note that the definition of sml:updateQuery states that the count is 1.  To make this clearer, a paragraph has been added to the module's comment (which defines the Help page) that reads:
  "Only one instance of sml:updateQuery will be executed.  For multiple SPARQL UPDATE statements use multiple PerformUpdate instances."

This means that multiple PerformUpdate modules will be necessary to define multiple queries.

-- Scott

On 11/27/2014, 2:23 AM, J.REZZOUK wrote:
Hello,

I have not been enough precise.
I don't use multiple INSERT statements in a single query. I use multiple INSERT queries (but with a single INSERT statement for each query) but inside a single sml:PerformUpdate instance module.

Just below is the sml:PerformUpdate instance created in the SM test script I have used :
test:PerformUpdate_2
  rdf:type sml:PerformUpdate ;
  sm:next test:ApplyConstruct_1 ;
  sml:updateQuery [
      rdf:type sp:Modify ;
      sp:insertPattern (
          [
            rdf:type sp:NamedGraph ;
            sp:elements (
                [
                  sp:object test:ClassTest ;
                  sp:predicate rdf:type ;
                  sp:subject test:s2_1 ;
                ]
                [
                  sp:object test:o2_1 ;
                  sp:predicate test:p2_1 ;
                  sp:subject test:s2_1 ;
                ]
              ) ;
            sp:graphNameNode <urn:x-tb:session> ;
          ]
        ) ;
      sp:where () ;
    ] ;
  sml:updateQuery [
      rdf:type sp:Modify ;
      sp:insertPattern (
          [
            rdf:type sp:NamedGraph ;
            sp:elements (
                [
                  sp:object test:ClassTest ;
                  sp:predicate rdf:type ;
                  sp:subject test:s2_2 ;
                ]
                [
                  sp:object test:o2_2 ;
                  sp:predicate test:p2_2 ;
                  sp:subject test:s2_2 ;
                ]
              ) ;
            sp:graphNameNode <urn:x-tb:session> ;
          ]
        ) ;
      sp:where () ;
    ] ;
.
Only the last update is done.
Thanks
Jamal

Le mercredi 26 novembre 2014 19:52:13 UTC+1, Mark Graham a écrit :
Hi Jamal,

As available - can you please provide us with your SM script that you are using?

Per our dev review here -  this test run will produce an error:



ERROR:

at org.topbraidlive.sparqlmotion.modules.performUpdate.PerformUpdateArgs.checkOnlyOneNamedGraph(PerformUpdateArgs.java:140)
 at org.topbraidlive.sparqlmotion.modules.performUpdate.PerformUpdateArgs.getTargetGraph(PerformUpdateArgs.java:121)
 at org.topbraidlive.sparqlmotion.modules.performUpdate.PerformUpdateArgs.<init>(PerformUpdateArgs.java:47)
 at org.topbraidlive.sparqlmotion.modules.performUpdate.PerformUpdateModule.execute(PerformUpdateModule.java:50)
 at org.topbraid.spin.sparqlmotion.engine.impl.ExecutionEngineImpl.execute(ExecutionEngineImpl.java:202)
 at org.topbraid.spin.sparqlmotion.engine.impl.ExecutionEngineImpl.executeModule(ExecutionEngineImpl.java:168)
 at org.topbraid.spin.sparqlmotion.engine.impl.ExecutionEngineImpl.execute(ExecutionEngineImpl.java:118)
 at org.topbraidcomposer.sparqlmotion.views.console.SPARQLMotionConsole.execute(SPARQLMotionConsole.java:79)
 at org.topbraidcomposer.sparqlmotion.actions.AbstractExecuteSPARQLMotionAction$1.run(AbstractExecuteSPARQLMotionAction.java:142)
 ... 2 more
Ankur  Oberai



Thanks,
Mark


Mark Graham
TopQuadrant Support



On Wed, Nov 26, 2014 at 4:24 AM, J.REZZOUK <[email protected]> wrote:
Hello,

I am currently using TBCME 4.4 (Windows 7). I wanted to make multiple INSERT in the session graph using a single PerformUpdate component in a SM script but I discovered that only the last insert was performed. When I use multiple PerformUpdate components with a single Insert operation inside, it works fine. I don't understand the reason. Could you help me to clarify that ?

Thanks in advance.
Jamal
--
-- 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
topbrai...@googlegroups.com
To unsubscribe from this group, send email to
topbraid-user...@googlegroups.com
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 topbraid-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
-- 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.

--
-- 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