This is an old revision of the document!


TestOptimal provides a set of websvc to retrieve model and execution stats. These websvc can be called by external process/application or used to create custom report.

The URL to access the websvc is:

  [[http://localhost:8888/MbtSvr/app=websvc&action=stat&compoents=cmp1,cmp2,...&|http://localhost:8888/MbtSvr/app=websvc&action=stat&compoents=cmp1,cmp2,...&]]//additionalParams//

where cmp1,cmp2,… is a list of data elements you wish to retrieve. Refer to the following for a the list of valid values for the components and the additional parameters required:

  • BatchExec- to retrieve details of batch execution (orchestrated execution of models) from a load model:
    • batchID=nnn: to specify which batch to retrieve the stats by the batch description.
    • batchDesc=xxx: to specify which batch to retrieve the stats by the batch id.
    • brief=Y/N: set to Y if to only retrieve the brief version of the stats. Set it to N to retrieve the full stats for the batch.
      [[http://localhost:8000/MbtSvr/app=websvc&action=stat&components=BatchExec&brief=Y&batchDesc=ExecSuite2012_2_8_103|http://localhost:8000/MbtSvr/app=websvc&action=stat&components=BatchExec&brief=Y&batchDesc=ExecSuite2012_2_8_103]]
  • ModelStatList - list of executions for a model:
    • model=modelName: to specify which model to retrieve the stats
      [[http://localhost:8000/MbtSvr/app=websvc&action=stat&components=ModelStatList&brief=Y&bat|http://localhost:8000/MbtSvr/app=websvc&action=stat&components=ModelStatList&brief=Y&bat]]
  • Scxml - content of model scxml.
    • model=modelName: to specify which model to retrieve the stats
      The following example url produces [[http://testoptimal.com/example/scxmlWebSvcOutput.xml|Example output]]
      [[http://localhost:8888/MbtSvr/app=websvc&action=stat&components=Scxml&model=Demo_WebStore|http://localhost:8888/MbtSvr/app=websvc&action=stat&components=Scxml&model=Demo_WebStore]]
  • MbtStat - details of model execution.
    • model=modelName: to specify which model to retrieve the stats.
    • execID=executionID: to specify which execution to retrieve the stats
    • statDesc=description: to specify which execution to retrieve the stats. Either statDesc or execID must be specified but not both.
      The following example url produces [[http://testoptimal.com/example/mbtStatsWebSvcOutput.xml|Example output]]
      [[http://localhost:8888/MbtSvr/app=websvc&action=stat&components=MbtStat&model=Demo_WebStore&statDesc=run|http://localhost:8888/MbtSvr/app=websvc&action=stat&components=MbtStat&model=Demo_WebStore&statDesc=run]] 1
  • MScript - mscript code.
    • model=modelName: to specify which model to retrieve the mscript.
      The following example url produces [[http://testoptimal.com/example/mscriptWebSvcOutput.xml|Example output]]
         [[http://localhost:8888/MbtSvr/app=websvc&action=stat&components=MScript&model=Demo_WebStore|http://localhost:8888/MbtSvr/app=websvc&action=stat&components=MScript&model=Demo_WebStore]]
  • BatchList - list of batch executions for the entire system
  • java class path - custom websvc to retrieve data from the web svc implemented by the java class specified. Any parameters passed in will be passed to your java class.
      [[http://localhost:8000/!MbtSvr/app=websvc&action=stat&components=demo.mySvc|http://localhost:8000/!MbtSvr/app=websvc&action=stat&components=demo.mySvc]]

Additional parameters are shared among multiple components specified. For example, the following url will retrieve both scxml and mscript for a specific model:

      [[http://localhost:8888/MbtSvr/app=websvc&action=stat&compoents=Scxml,MScript&model=Demo_Login|http://localhost:8888/MbtSvr/app=websvc&action=stat&compoents=Scxml,MScript&model=Demo_Login]]