You are viewing limited content. For full access, please sign in.

Question

Question

Variables not pulling in on Email Service Task

asked on February 16, 2024

I have a form that pulls in 2 dates and puts them in a SQL table. I then use lookup values to populate those dates on my final form. Once the final date is chosen, and it is uploaded to SQL via workflow, I want the next step to be an Email Service Task that sends the final PDF of the form. When using an Email Service Task, it is not displaying the dates. I can put a User task (temp), using the same form, in front of the Email Service Task and it will populate the dates. Has anyone else every experienced this?

I would like to bypass the temp user task below and go straight to the Final Email task (red arrow). 

0 0

Answer

SELECTED ANSWER
replied on February 20, 2024

Hi Kevin,

It sounds to me that you have a workflow to insert some data into SQL, then the temp user task will load this data via lookup rule, after you submit the temp user task, the date can reflect on the email. But if not with the user task, you actually haven't updated the variable value successfully, because the workflow is not updating Forms variable value, but just inserting into sql table. I think you can use the "Set Business Process Variables" activity in workflow, to make sure the variable is updated, then you can get rid of the extra user task, which also plays a role of updating the variable value.

1 0

Replies

replied on February 17, 2024

just a thought, In your email task, are you choosing the form with current data?, if you happened to pick from the previous user task before the workflow, the data didn’t exist at that time.

1 0
replied on February 19, 2024 Show version history

Hi Steve,

Yes, I chose "Using Current Process Data".

Thank You,

0 0
replied on February 17, 2024

Did you set your service task to wait until workflow complete?  

1 0
replied on February 19, 2024

Hi Angela,

 

     Yes, I chose "Wait for the workflow to finish before proceeding?"

 

Thank You,

0 0
replied on February 18, 2024

Hi Kevin,

 

I agree with Steve, you should make sure to choose "Using current process data" in your email service task, and select the correct form to attach, then you always get latest value of the date variables, if that not work, could you send a screenshot how the email service task configured?

1 0
replied on February 19, 2024

Hi Zhiyong,

     I did select "Using current process data" in the email service task. Here is the screenshot that you requested.

Thank You,

0 0
replied on February 20, 2024

When not adding the temp user task, after the email sends out, you can check from Monitor page, there is a Variable tab that display the latest value for every variable. And is the workflow service task updating Forms variable value? This sounds more like a configuration issue, if you could share the business process you are using, I can have a clearer picture.

0 0
replied on February 20, 2024

Yes, the workflow task is working because the dates are inserted into SQL. When using the user task, they are being pulled into the form. If I run the email task after the temp user tasks, the dates are on the PDF. However, if I try to skip the temp task, the dates are still inserted into SQL, but they do not display on the PDF. I am using the same Form on the Email Service Task as I am on the temp User task. 

 

Thank You,

0 0
SELECTED ANSWER
replied on February 20, 2024

Hi Kevin,

It sounds to me that you have a workflow to insert some data into SQL, then the temp user task will load this data via lookup rule, after you submit the temp user task, the date can reflect on the email. But if not with the user task, you actually haven't updated the variable value successfully, because the workflow is not updating Forms variable value, but just inserting into sql table. I think you can use the "Set Business Process Variables" activity in workflow, to make sure the variable is updated, then you can get rid of the extra user task, which also plays a role of updating the variable value.

1 0
replied on February 21, 2024

Yes, to Zhiyong's point, the lookup on the form doesn't run in the background, just when the form is opened which is why it works when you add a user task. In your case, after creating the entry in the SQL DB, recall them in the Workflow and pass the values back to the form where they will then be available for your email task.

1 0
replied on February 21, 2024

Thanks @████████and @████████ ! That worked perfectly. My dates are appearing on the emailed PDF now. 

 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.