Thanks Holger

I'm still on 7.1 for now - though after project initial build will have 
option to upgrade to 7.2 :-(

for the "supported in 7.2" API 

I guess my best guess would be to create a proxy function to mirror this 
7.2 function.

 tbs.createAssetCollection

is there a way to get access to details without a 7.2 install?


and for general service invocation...

looking for documentation on these i can find graph.swp in the scriptAPI 

but I need then to dive further into

 @param {?object} [params] - name-value pairs for the arguments of the element, 
typically as GraphNodes

so I went looking for the Teamwork functions reference - I notice a lot of 
the different doc entry points have been cleaned up (a Good Thing) so I'll 
start with a quick question as to where I would find such documentation now?

in this case teamwork:PublishProjectToNamedExplorer  

- so how does this relate 
to https://sop.dev.bdr.gov.au/edg/tbl/sendProjects  - which seems to 
be tbladmin.sendProjects() - i guess a function in the react bundle that 
does something under the hood to invoke that service?  I that function 
itself based on a generic service call we could use without raw jquery  ?



 /**
     * Runs an SWP element with a provided set of parameters.
     * This can not be used in read-only mode and should be used by experienced 
TopBraid users only.
     * 
     * NOTE: This function is likely going to be deleted in future versions.  
Instead users are encouraged to explicitly
     * mark the SWP scripts that they want to call, using 
ui:scriptFunctionReadOnly and then use the generated functions.
     * Meanwhile this function here is kept to simplify experiments.
     * 
     * @param {string} viewClass - the qname of the view class in the ui:graph, 
e.g. 'ex:MyElement'
     * @param {?object} [params] - name-value pairs for the arguments of the 
element, typically as GraphNodes
     * @returns {string} the SWP response as a string
     */
    swp(viewClass, params) {
        return __jenaData.swp(viewClass, params);
    },

On Monday, May 2, 2022 at 6:49:23 PM UTC+10 [email protected] wrote:

>
> On 2022-05-02 5:13 pm, Holger Knublauch wrote:
>
> Hi Rob,
>
> assuming you're on 7.2, ADS now supports a new API that includes functions 
> like tbs.createAssetCollection which you could theoretically use to create 
> a clone which you later tbs.deleteAssetCollection().
>
> On 2022-05-02 3:22 pm, Rob Atkinson wrote:
>
>
> hi
>
> havent been able to find in the docs or examples, but suspect I may be 
> missing something.
>
> I have a DataGraph I want to publish to two different explorer instances - 
> but with different data in each.  Some other things may happen - custom 
> review steps - so its going to be in ADS.
>
> So I need an ADS script capable of (say) cloning and modifying an asset 
> collection then pushing the two graphs to two different Explorer 
> instances.  Looking at the calls the endpoint and username is picked up 
> from the server config - for a default location.
>
> How should one invoke such services in ADS - is it a matter of building up 
> my own utility library on top of jquery or does something else exist?
>
>
> Publishing to Explorer is not part of that API (yet). ADS can make generic 
> web API calls using IO.http() in case you want to simulate the network 
> traffic that you see, e.g. to invoke the sendProjects service by hand. 
> That's not an elegant solution, but from what I see a necessary hack for 
> now. I am not 100% up to date on the web services but will follow-up here 
> if my colleagues have a better idea.
>
> Maybe try graph.swp('teamwork:PublishProjectToNamedExplorer', { ... })
>
> HTH
> Holger
>
>
>
>
> Is there any advice re respecting permissions of the user, or allowing the 
> script to do something i dont want the user to do normally ? 
>
> ADS scripts cannot switch users, so you'd need to invoke this from a user 
> with sufficient permissions.
>
> Holger
>
>
>
> Cheers
> Rob
>
>
>
> -- 
> 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/1a94dfe9-4d1b-4ed6-946d-75adc72e2ed7n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/topbraid-users/1a94dfe9-4d1b-4ed6-946d-75adc72e2ed7n%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/7d43627f-1b6b-403b-8aef-5a3ada815d57n%40googlegroups.com.

Reply via email to