NB - this topic not covered by SWP doco debugger docs.
I have successfully cloned and can execute a custom importer based on the
SPARQL motion importer. I am now trying to customise its behaviour further
and run into a desire to see what is happening when the import script runs.
Looking at the orginal - the service has a prototype:
<ui:setContext ui:queryGraph="{= IF(?record,
teamwork:masterGraphForCurrentUser(teamwork:currentMasterGraph()), ?none) }"
ui:silentTransactions="true">
<ui:transaction ui:logMessage="Import RDF file {= ?fileName } using
script {= ?script }">
<teamwork:scriptBasedFileImport ui:args="*"/>
</ui:transaction>
</ui:setContext>
And the behaviour is to throw up a dialog box, and print three lines from
in the error log (reportedly) the FileImport plug-in
The SWP doco states" The output of ui:transactions is a JSON object with
details about the change that was performed. This information may be used
by the client to update the UI. By default, ui:transaction will write this
JSON object into the output stream. To switch this off, wrap the
transaction as follows:"
but its not clear what the output stream gets read by.
Looking at the page source in the browser there is this:
<form action="swp" enctype="multipart/form-data" id="theForm" method="post">
...
<input name="_viewClass" type="hidden" value="
http://topbraid.org/teamwork#ScriptBasedFileImportService">
<input id="submitButton" type="submit" value="Finish">
<script>teamwork.initImportFileForm("uniqueId3232",
"swp?_viewName=teamProject&projectGraph=urn%3Ax-evn-master%3Atweed")
</script>
(its been a while since immersed in HTML - but it looks like the page
should submit a HTTP POST request rather than call a javascript function on
submit - so I dont understand why the UI doesnt leave the page and show the
service output ?)
- is some javacript tweaking the form behaviour ?
So a few questions about the best way to customise this:
1) what does ui:logMessage do - where is it logged and how is that
configured
2) what does ui:message on the ui:transaction element do? (it is referenced
in http://uispin.org/ui.html#update)
3) how does one report status back to the user?
4) how to log messages to console in TBC
5) where are, and how to customise, EDG logs when running as a server
6) how to customise the message dialogue when the transaction is running
7) how best to interact with a user to ask a question during an import
script - in the SWP
8) is it possible to interact with the user in the SMS script?
<ui:transaction ui:message="Adding instance of {= ui:label(?type) }">
--
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.