Solved

Operate on File: INFO Operation

  • 13 April 2022
  • 1 reply
  • 106 views

Badge +2

I’m trying to read the file name of a file so I can write it in an email within a Workflow. I’m using the “Operate On File” task. The Operation I selected is “INFO”. I then point to the Source File. Next I’m trying to determine which variable I use to supply to the Send Email task. 

The Operate On File Documentation says you can use task variables and the example they give is “name”, “localName”, “size”, and “timestamp”. When I try using these variables in the Send Email task they just come across as blank in the email (variables appear to be null). Here is the body of the email I’m using: 

Name = ${name}

localName = ${localName}

 

Two questions:

  1. Does any one happen to know what I’m doing wrong in above?
  1. Additionally is there a way to pull out a file name within a Plan. I’m using the “Excel File Reader” step. I want to pass along the file name in the flow so I can use it later on.

 

Thanks!

icon

Best answer by farshid_mashagh 21 April 2022, 16:54

View original

1 reply

Badge +1

Hello,

Regarding your first question, task variables are utilized differently. For derived variables,   ${  } works but for task variables you should use   ewfGetTaskVariable()  function. For example, to use the ‘localName’ variable in an email, you can use:      ${ewfGetTaskVariable('Operate on File','localName')}

For more information please check lines 3.4 and 5.6 in the following page:

https://support.ataccama.com/home/docs/aip/latest/development-guides/one-runtime-server-development-guide/workflow-and-scheduler/workflow-variables

With Regards,

Reply