« Back to University of Vienna - OMILAB

Runtime error while processing RUN_VOLUME_ANALYSIS

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Dear ADOxx-Team!

I got an interesting error while running a RUN_VOLUME_ANALYSIS with AdoScript. The scenario is the following: I created a new model which basically uses a business process model and a working environment model to create an application model and run a capacity analysis afterwards. The results of this simulation are stored in a file. The button "Plot Regression Tree" shown in the following picture executes the subsequent AdoScript:



 1CC "Core" GET_ATTR_VAL objid: (thisobjid) attrname:"Path to R"
 2SETG pathtor: (val)
 3CC "Core" GET_CONNECTORS objid: (thisobjid) in
 4SETG incommingrelations: (objids)
 5
 6CC "Core" GET_ATTR_VAL objid: (VAL(incommingrelations)-3) attrname:"Business process model" format:"%m"
 7CC "Core" GET_MODEL_ID modelname: (val) modeltype: ("Business process model")
 8SETG bpmodelid: (modelid)
 9
10CC "Core" GET_ATTR_VAL objid: (VAL(incommingrelations)-3) attrname:"Working environment model" format:"%m"
11CC "Core" GET_MODEL_ID modelname: (val) modeltype: ("Working environment model")
12SETG wemodelid: (modelid)
13
14SET appModelName: ("AppModelRegTree" + (STR(round(random()*10000))))
15CC "Core" CREATE_APP_MODEL (appModelName) bpmodelids: (STR(bpmodelid)) wemodelid: (wemodelid)
16
17CC "AdoScript" GET_TEMP_FILENAME
18SETG resultsfile: (filename)
19CC "AdoScript" FWRITE open file: (filename) append:1
20CC "AdoScript" FWRITE text: ("EXECDAYS;PERSCOS;COSTS")
21
22FOR i from:0 to: (50) {
23CC "Simulation" RUN_VOLUME_ANALYSIS appmodelname: (appModelName) no-error-messages:1 auto-read-only:1 no-result-window auto-close:1 process-results:{JOB mode:"process-related" period-type:"per-year" handler:"HANDLE_SIMUL"}
24}
25
26CC "AdoScript" FWRITE close


When the script is executed, the following error appears:



While debugging I noticed that this

1FOR i from:0 to: (50) {
2CC "Simulation" RUN_VOLUME_ANALYSIS appmodelname: (appModelName) no-error-messages:1 auto-read-only:1 no-result-window auto-close:1 process-results:{JOB mode:"process-related" period-type:"per-year" handler:"HANDLE_SIMUL"}
3}

must be the critical part, however, I don't know why this error arises. The more interesting thing is, that the script executes smoothly after I click the OK-Button on the error message but the Model Toolkit crashed immediately after the execution.

Why is that the case?

RE: Runtime error while processing RUN_VOLUME_ANALYSIS
Answer
12/05/14 15:03 as a reply to Christian Vorhemus.
Dear Christian,
thank you for your questions - we are currently analyzing this behaviour. In order to have a better chance to reproduce things and see where the error is happening, could you please provide us with the following information:

a) ADOxx Platform Version: please post the content of version.txt
b) Underlying model structure/metamodel: it would be interesting to see how the underlying metamodel is structured, could you provide us with a conceptual image, class hierarchy, etc. here?

Thanks,
Wilfrid

RE: Runtime error while processing RUN_VOLUME_ANALYSIS
Answer
13/05/14 09:07 as a reply to Wilfrid Utz.
Dear Wilfrid Utz!

Thanks for your support! Here is the output of version.txt:

Version 1.102 (2011-01-27)

Please find the SeMFIS library I've extended and a sample model attached.
Attachments: models.zip (8,912.7k)

RE: Runtime error while processing RUN_VOLUME_ANALYSIS
Answer
04/06/14 13:09 as a reply to Christian Vorhemus.
Dear Christian,

apologies for only combing back to you now - I had the error checked and the problem relates to trigger of the AdoScript. If an AdoScript triggered from within a notebook using a PROGRAMMCALL attribute closes the notebook, the context for the script is lost and results in the crash you experience (triggering the simulation algorithm dynamically and implicitly closes all open notebooks).
I would have two alternative options in mind to solve the issue:
  • Add the PROGRAMMCALL within the GRAPHREP as a button/hyperlink. This would allow to start the call without opening the notebook
  • Change the trigger and run using a menu entry.
Please advice if you need any help in realizing the scenarios of above!

RE: Runtime error while processing RUN_VOLUME_ANALYSIS
Answer
04/06/14 15:52 as a reply to Wilfrid Utz.
Alright, this makes sense to me. I think I'll use a menu entry for this functionality.

Thanks for your support!

RE: Runtime error while processing RUN_VOLUME_ANALYSIS
Answer
05/06/14 06:27 as a reply to Christian Vorhemus.
In case you want to think on the GRAPHREP proposal, find some sample code that enables a button next to the object. Please see the code the the related BMP attached.

 1#... (GrahpRep of class)
 2AVAL ed:"Documentation video"  # PROGRAMCALL attribute
 3# Note that an empty PROGRAMCALL attribute has the value "@"
 4IF (LEN ed > 1 AND _outdevtype = "drawingarea") {
 5    BITMAP "db:\\pushbutton.bmp" x:1.58cm y:-0.7cm w:0.9cm h:0.6cm
 6    TEXT "Go!" x:2.03cm y:-0.4cm w:c h:c
 7    HOTSPOT "Documentation video"
 8        x:1.58cm y:-0.7cm w:0.9cm h:0.6cm text:"Start video"
 9}
Attachments: pushbutton.bmp (2.2k)