Dear Ioanna,
The content that should be displayed in a browser window should be configured/defined before you call the BROWSER command as follows:
1CC "AdoScript" FREAD file: ("D:\\newresultsquery1.txt") binary:0 base64:0
2SET sResultQuery: (text)
3SET sSepLine: "\n"
4SET actArray: (array(0))
5SET sBrowserContent: ("")
6FOR sQueryInfo in: (sResultQuery) sep: (sSepLine) {
7 ## In the variable 'param1' we get the results that concern the activities of the models.
8 SET param1: (search(sQueryInfo, "activity:", 0))
9 SET param2: (search(sQueryInfo, ";", 9))
10 SET param3: (search(sQueryInfo, ":",param2))
11 #CC "AdoScript" INFOBOX (param2)
12 IF(param1 = 0) {
13 SET act: (copy(sQueryInfo, 9, (param2-9)))
14 SET sptype: (copy(sQueryInfo, param2+1, (param3-param2-1)))
15 SET smodel: (copy(sQueryInfo, param3+1, (LEN sQueryInfo)-1))
16
17 # replace underlines within the names
18 #!!!!!!!!!!NOTE: if there exists underlines in the modelling name than the name is not valid anymore!!!!!!!!!!!!
19 SET act: (replall(act, "_", " "))
20 SET smodel: (replall(smodel, "annotated_", ""))
21 SET smodel: (replall(smodel, "_", " "))
22 SET smodel: ("annotated_"+smodel)
23
24 SET dummy: (aappend(actArray, act))
25 #CC "AdoScript" INFOBOX ("act is: " + act)
26 IF (sBrowserContent="") {
27 SET sBrowserContent: (";Activitytype;Processtype;Reference\n;Activity;"+sptype+";REF mt:\"Business process diagram (BPMN 2.0)\" m:\""+smodel+"\" c:\"Task\" o:\"" +act+ "\"\n")
28 } ELSE {
29 SET sBrowserContent: (sBrowserContent + ";Activity;"+sptype+";REF mt:\"Business process diagram (BPMN 2.0)\" m:\""+smodel+"\" c:\"Task\" o:\"" +act+ "\"\n")
30 }
31 }
32}
33#delete the last linebreak
34SET sBrowserContent: (copy(sBrowserContent, 0, ((LEN sBrowserContent)-1)))
35CC "AdoScript" EDITBOX text: (sBrowserContent)
36
37CC "AdoScript" BROWSER show-links
38 objref-format:"%c: %o (of model %m [%mt])"linesep: "\n"
39 modref-format:"Model %m of type %mt"
40 title:"My Query Results"
41 content: (sBrowserContent)
42 with-handlecolumn header:"Save\nthis header" print-header:"Print\nthis header"
Note that:
1) If you want to read also the modelname and the processtype from your results and display it in the BROWSER (as above), then take another seperator between the activity and the process than each result (see e.g. newresultsquery1.txt)
2) It is not allowed to reference to relations -like in your resultsquery2.txt
3) You can also work with maps instead of lines 8-10 and 13-15 (see
https://www.adoxx.org/live/faq/-/message_boards/message/139305)
4) Names should not be changed during the whole process either in the sparql query nor in AdoScript (See line 17 ff) as they are the identifier of the reference.
.