Model service - trace control functions

We want to get control over tracing when the application instance is running without need to change the configuration file and restart the instance. We also want to have an access to such control via tools available in the application model. We propose the extension of ModelService and introduction of new functions.

ModelService.SetTrace

Input parameter

bool enabled

Return value

bool traceStatus

Return value contains the current state of the trace.

Function description

If the input parameter is true, immediately enable tracing, if the input parameter is false, immediately disable tracing. Since the function is going to be invoked also from the workflow, the impact of such behaviour needs to be investigated and documented.

ModelService.GetTrace

Return value

bool traceStatus

Return value contains the current state of the trace.

ModelService.TraceObject

Input parameters

guid objectId
object traceType

traceType possible values reflect the model: Yes, No, InheritFromParent.

Return value

object traceType

Return value contains the current state of the trace.

As trace objects are stored in Model Runtime Configuration this configuration will be preserved in between server restarts but it won’t be preserved after deploying a new docker image as the RuntimeModelConfiguration.json file will be lost. Just to remember that.

@washi Should the ModelService.SetTrace change OrigamSettings.config file? Or should it just change the trace value until the server is restarted?

This needs some documentation. Create a topic for the Model Sevice an writhe the doc there. Important points:

  • You cannot set the trace in a workflow and expect the same wotkflow to start tracing after the step.
  • Is the OrigamSettings.config modified?