Full Path of AL Runtime xml
(too old to reply)
Markus Rentsch
2019-12-16 03:09:30 UTC

During the execution of an AL (TDI 7.1.1) data-validation errors are collected in a xml file (passiv Fileconnector).
With the text substition {config.$directory} in the connector definition of the file connector i suceed to store the produced file in the directory where the runtime of the AL resides.

In the Epilog of the AL i would like to send this file with system.sendmail to the
person who has to review the data. To be able to attach the file to the system.sendmail i need the full file path of the newly created xml.

Is there a function which resolves the full path of the AL runtime dynamically?

I have tried:
main.getConfigPath() which returns NULL.
system.getcwd() which returns the solutions base path only.
thisconnector.connector.getParam("filePath") which returns only the filename.

Unfortunately i'm not very proficient with java...

I'd appreciate very much any hint

2019-12-16 06:33:37 UTC
Hi Markus,
to get the of {config.$directory} you can use

If you want the name of the file created by a connector
named FileConnector in your AL, you can use

The AL runtime directory may be different from where configuration is located.
To get the path for the AL runtime you can use system.getcwd()
As you observed, this is also called the solution directory.
Markus Rentsch
2019-12-19 01:22:46 UTC
Hi Jens,

was what i have been looking for.

Thank you :-)