Hi Nicolas,

Temp graphs are not visible to certain parts of the system, such as the logic 
that resolves imports.

I'm not sure if this will help you, but if you need to access a temp graph 
together with some other graphs, the function ui:unionOfGraphs(?g1, ?g2, ...) 
might be useful. This function returns a “magic” graph name that contains the 
triples from all the argument graphs, and it works with temp graphs. For 
example, this will work in SWP:

    <ui:setContext ui:queryGraph="{= ui:unionOfGraphs(ui:tempGraph, 
<urn:x-evn-master:my-asset-collection>)) }">

Wrapping the non-temp graph in ui:graphWithImports(...) will also work as 
expected.

(Adding a UUID to the temp graph name is not necessary as temp graphs are 
scoped to the currently running SWP engine instance, and each separate HTTP 
request will get a separate SWP engine instance. Good practice is to choose a 
temp graph name that is unique to your service/component, e.g., 
ui:tempGraphMyCustomExporter.)

Richard


> On 29 Mar 2022, at 09:26, Nicolas Fouqué <[email protected]> wrote:
> 
> It is from inside a SWP script but now that you mention it I am not using the 
> standard ui:tempGraph, I added a UUID to it because there was concern of the 
> graph modifications colliding with other services.
> Nicolas
> 
> Le mardi 29 mars 2022 à 10:21:18 UTC+2, Holger Knublauch a écrit :
> Is this from inside an SWP script, and are you using ui:tempGraph?
> 
> Holger
> 
> 
> 
> On 2022-03-29 6:17 pm, Nicolas Fouqué wrote:
>> Hi, 
>> I'm developing a service that selects resources in a graph specified in 
>> parameter, in some cases, this is done on EDG graphs and I used 
>> ui:graphWithImports to make my selection properly.
>> But recently a new use case has emerged where I have to use this service 
>> with a temporary graph, and it seems like calling "ui:graphWithImports" on 
>> my temp graph makes it fail.
>> Is there a way to make that work without having to move all my usage of 
>> ui:graphWithImports ?
>> 
>> Thanks in advance,
>> 
>> Nicolas
> 
>> -- 
>> 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] 
>> <applewebdata://8E6B7BD8-29E9-4768-BEB4-F81EC5766A7F>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/topbraid-users/8da2f100-3e47-4a52-8668-d221e88cdcc4n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/topbraid-users/8da2f100-3e47-4a52-8668-d221e88cdcc4n%40googlegroups.com?utm_medium=email&utm_source=footer>.
> 
> 
> -- 
> 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] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/topbraid-users/a7a95dcd-2f2e-45e6-8a55-36a41c687058n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/topbraid-users/a7a95dcd-2f2e-45e6-8a55-36a41c687058n%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/8CB3DDD1-461D-4A29-A32B-C5BDA58F86ED%40topquadrant.com.

Reply via email to