Barb; Yes, a script is allowed to have multiple endpoints. Each end module can be called independently. The SPARQLMotion engine will determine which modules to run from an end module by backtracing the "prerequisites" (all sm:next properties) for each module.
In this way, the kind of reuse you are asking for is supported without needing a branch statement. Take one of your scripts and extend it with the desired next transitions of the second script. (Basically the union of the two scripts.) As a simple example, assume you had a script that wanted to export as a text file or rdf file. The script can look like this: ImportFromZZZ sm:next ApplyZZZ ApplyZZZ sm:next ExportToRDFFile ApplyZZZ sm:next ExportToTextFile Choosing either 'ExportToTextFile' or 'ExportToRDFFile' will execute 'ImportFromZZZ', then 'ApplyZZZ', followed by the selected end module. I assume you are using BranchByAsk? Note that the result of this module is passed to the next module through sm:next. I.e. sm:if and sm:else process the input and pass results to sm:next. -- Scott On Sep 2, 3:11 pm, Barb <[email protected]> wrote: > I have an *sms.n3 script which deletes selected node(s) from the > hierarchy tree. Originally I had 2 scripts ... one that deleted the > selected node and its children while the other kept the selected node > and deleted only the children. Because of the commonality, I decided > to combine them into one. > > The current script contains the common code and a branch to determine > which set of updates to perform. > It also contains 2 SPIN functions ... one is the endpoint of the "if" > and the other is the endpoint of the "else". > Both functions have an sml:selectedResource. > > The scripts work fine separately, however not combined as described > above. > I don't see any errors messages, but unfortunately, nodes are not > being deleted. > > Is a script allowed to have multiple endpoints? > > Barb --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TopBraid Composer Users" group. 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-composer-users?hl=en -~----------~----~----~----~------~----~------~--~---
