It's all about the answers!

Ask a question

RQM command line adapater: From which shared location the adpter was started?


Jörg Werner (3033781) | asked Feb 01 '17, 6:14 a.m.

Hi,

we have a shared location in RQM and an command line adapter is available there.
When the adapter is running I need the full path of the adapter because additional files are located in the same directory:

    \<shared location>\adapter\
                               my_adapter.bat
                               my adpater.pl

(the batch file calls a perl script, the real adapter).


RQM is copying the adapter (*.bat)  first to another local directory.
I would like to know how to get the original (shared location) path within the adapter?

any ideas?

 thanks, Jörg

Accepted answer


permanent link
Vijay Patil (4813) | answered Feb 06 '17, 5:34 a.m.
JAZZ DEVELOPER

Hi Jorg,

We expose the shared location in the adapter task xml. You can find it inside the tag name "shareprefix". You can query for this within the adapter.

Thanks,
Vijay.

Jörg Werner selected this answer as the correct answer

Comments
Jörg Werner commented Feb 06 '17, 9:11 a.m.

Hi Vijay,

thanks for the answer. In the batch which I call, I "see" only the environment variables. I assume that via the batch file I have no direct (easy) access to the task xml?

   thanks, jörg

          'QM_ATTACHMENTSFILE' => 'C:\Users\wej1lr\AppData\Local\Temp\QMAdapter4790060573568406731.attach',
          'QM_CUSTOMPROPERTIESFILE' => 'C:\Users\wej1lr\AppData\Local\Temp\QMAdapter972269538368957762.props',
          'QM_EXECUTIONVARIABLESFILE' => 'C:\Users\wej1lr\AppData\Local\Temp\QMAdapter768304412035512671.vars',
          'QM_RQM_CREATEDBY_USER_NAME' => 'TDG1 CI Builder (GS-TC/ESW8)',
          'QM_RQM_CREATEDBY_USER_WEBID' => 'RES131AESI',
          'QM_RQM_LABRESOURCE_NAME' => 'SI-Z0KZB',
          'QM_RQM_LABRESOURCE_WEBID' => '52',
          'QM_RQM_PROJECT_ALIAS' => 'TDG1_QA_CLONE3',
          'QM_RQM_PROJECT_NAME' => 'TDG1 Demo',
          'QM_RQM_SUITEEXECUTIONRECORD_NAME' => 'Ts_wej1lr_vTESTstudio',
          ...
    
    




 


Vijay Patil commented Feb 06 '17, 9:25 a.m.
JAZZ DEVELOPER

Hi Jorg,

Yes, you are right. You will not have access to the task xml in the batch file.
Currently we don't expose the shared location via environment variables. I will suggest you to open an RFE in RQM for exposing shared location via build-in execution variables and environment variables. You can open RFE using following link -
https://www.ibm.com/developerworks/rfe/execute?use_case=changeRequestLanding

Thanks,
Vijay

Your answer


Register or to post your answer.