Skip to main content
Solved

Configure Path in Attach File of Send Email Workflow

  • September 6, 2024
  • 2 replies
  • 70 views

Forum|alt.badge.img

Hi

I have a workflow with Send Email step configured and this workflow will be pushed to orchestration server to run it. I have an attachment need to be included in the email notification generated from the workflow and realized that if I put only the file name for example RESULTS_ABC.xlsx, by default it will find it the same folder of the workflow that is being created. 

Let’s say if I put the RESULTS_ABC.xlsx in different folder like Data/Out, how do I configure it correctly at the Attach Files configuration as shown in the image below? I saw a discussion to use filePath variable but I am not too familiar with that. Could you please explain how can we achieve running the workflow and read the file that is stored from different folder so that it can attach in the email.

 

Best answer by may_kwok

Hey @Radziah ,

 

Have a look at the ewfGetPathVariable and see if that helps you? https://docs.ataccama.com/runtime-server/latest/workflow-and-scheduler-reference/workflow-functions.html#ewfgetpathvariable

 

Send mail task (https://docs.ataccama.com/runtime-server/latest/workflow-and-scheduler-reference/send-mail.html) Attach File field supports semi-expressions, you can find more on semi-expressions in this page too: https://docs.ataccama.com/runtime-server/latest/workflow-and-scheduler/expressions-in-workflows.html

 

It took me a while to get my head around variables and expressions in .ewf, especially working with file paths. Take special care to understand where you need the escape char and where you don’t need it.

 

Here’s some further reading on server config and runtime config in general. Path Variables itself would be part of runtime config:

 

Have a read through and, and if you still get stuck, maybe flesh your .ewf out with a bit more example (screenshot of your project structure, and your ONE Desktop configurations etc), and share it here and we can check for you further?

View original
Did this topic help you find an answer to your question?

2 replies

may_kwok
Star Blazer L3
Forum|alt.badge.img+4
  • Star Blazer L3
  • 83 replies
  • Answer
  • September 6, 2024

Hey @Radziah ,

 

Have a look at the ewfGetPathVariable and see if that helps you? https://docs.ataccama.com/runtime-server/latest/workflow-and-scheduler-reference/workflow-functions.html#ewfgetpathvariable

 

Send mail task (https://docs.ataccama.com/runtime-server/latest/workflow-and-scheduler-reference/send-mail.html) Attach File field supports semi-expressions, you can find more on semi-expressions in this page too: https://docs.ataccama.com/runtime-server/latest/workflow-and-scheduler/expressions-in-workflows.html

 

It took me a while to get my head around variables and expressions in .ewf, especially working with file paths. Take special care to understand where you need the escape char and where you don’t need it.

 

Here’s some further reading on server config and runtime config in general. Path Variables itself would be part of runtime config:

 

Have a read through and, and if you still get stuck, maybe flesh your .ewf out with a bit more example (screenshot of your project structure, and your ONE Desktop configurations etc), and share it here and we can check for you further?


Forum|alt.badge.img
  • Author
  • Data Voyager
  • 16 replies
  • October 2, 2024

After several changes and testing, I managed to change the path that retrieve from the designated folder that I want in which in this case is data/out folder.

So, the trick is, I just added ../data/out/<filename> at the Attach File config and my workflow is able to fetch the file. Without “../data/out” seems like the workflow is expecting the file to be stored at workflow folder by default.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings