How to print out (to the trace.log) the version of IVR application

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • avc892578805570
    Member
    • Dec 2024
    • 8

    How to print out (to the trace.log) the version of IVR application

    Hi Guys,

    I have one simple question.


    So, I have the project version in Project -> Properties -> Orchestration Designer -> Version.
    I want to trace the version to the trace.log.

    Click image for larger version

Name:	image.png
Views:	21
Size:	57.9 KB
ID:	49374

    How to print out (to the trace.log) the version of IVR application via the java code (or may be there is some variable like session)...

    I have read out some old forum stuff and tried to do some jar's reverse research but the answer is not directly on the surface...

    PS: No, I don't want to use CAV or any other custom constants in the code. Only the version from the properties is my point of interest.

    Thanks in advance,
    Vasily.
  • avc861193901584
    Whiz
    • Sep 2024
    • 44

    #2
    Hi Vasily,

    You could probably use custom Java code to parse it from the XML attribute in data/project.module. I don't have any example code handy, but there should be plenty of Java examples online for reading files and parsing XML that should work fine within OD.

    Adam
    Adam | Swampfox Technologies Inc. | Avaya Partner
    Solutioning in: Avaya Experience Portal | AXP Connect | AES

    Comment

    • avc892578805570
      Member
      • Dec 2024
      • 8

      #3
      Hi Adam,
      So... I didn't succeed with od runtime libs. After a small reverse engineering I didn't find any api. Seems that OD designers-developers didn't plan to do this. The funny thing is that they encapsulate the version in validate.jsp but still it is a hardcode at build time.
      Your idea with XML parsing is an option.
      But i did it in another way.
      For those who interested in a way I did it... I used context-param...

      1. Add to your web.xml
      Code:
      <context-param>
      <param-name>app.version</param-name>
      <param-value>3.1.3</param-value>
      </context-param>
      2. Add Java code in Servlet.
      Code:
      public void servletImplementation(com.avaya.sce.runtimecommon. SCESession mySession) {
      
      ITraceInfo trace = mySession.getTraceOutput();
      
      ServletContext context = getServletContext();
      if (context != null) {
      trace.writeln(ITraceInfo.TRACE_LEVEL_DEBUG,  " Application Version: " + context.getInitParameter("app.version"));
      }
      }



      I did it this way because I need to update information about application for tomcat in web.xml all the time.
      <display-name>3.1.3 - bla-bla-bla.</display-name>
      And anyway I need to change the web.xml all the time.​

      Comment

      Loading