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

Question

Question

Set Business Process Variable before email is out

asked on September 12, 2017

Good morning,

I have a workflow that inserts into a database table, creating a unique number. Then it retrieves that number and sends it back to an User Task in forms. The problem is that when the the User Task is assigned, it sends out the email notification, but the number is not yet part of the form.

This is the basic process:

1. Submit form

2. Workflow inserts number

3. Workflow retrieves inserted number

4. Workflow sets business process variables to the next User Task

5. User Task sends out an email to the assigned staff member

6. Email message does not contain the number, but if I open the form, the form number was assigned correctly to a field

Is there a way to attach the retrieved number to the email notification of the User Task?

Any ideas?

 

Thank you,

 

Raul Gonzalez

0 0

Answer

SELECTED ANSWER
replied on September 26, 2017

SOLVED: 

On the issue stated, I figured what the issue was. The issue is when you try to populate a field using the “Set Business Process Variables” that is also attached to a Lookup Rule. I’m not sure why this is an issue, since the value is the same. Maybe because the Lookup Rule overrides the value set by the “Set Business Process Variables” activity, and the value is not actually set, but only displayed.

When I removed the Lookup Rule, it all worked.

Thank you,

 

Raul Gonzalez

0 0

Replies

replied on September 12, 2017

Is the service task set to wait for the workflow's completion?

0 0
replied on September 12, 2017 Show version history

Yes. There is a question that says "Wait for the workflow to finish before proceeding?" and I have that as "Yes"

Maybe the reason could be that I'm setting the notification as "{/dataset/number}" when it should be something else.

0 0
replied on September 14, 2017

It's pretty hard to guess what might be happening without seeing the process. It could also be that your user task is parallel with the service task and actually starts before Workflow finishes. Or that the form used in the user tasks does not have the proper variable set.

0 0
replied on September 14, 2017

Miruna, I'm still wondering what other strategy I could use to achieve what I needed. Let me know if you think of something as well.

Thank you,

 

Raul Gonzalez

0 0
replied on September 14, 2017 Show version history

I'm attaching a screenshot of what it looks like. The Service task that runs the workflow is set to wait for the workflow to finish before proceeding.

On the User Task, the field is correctly populated by the Set Business Process Variables activity; the number that was sent is actually shown in the field of the User Task.

But on the email that the User Task sends to assign the task to a user, it does not show.

 

issueWF.PNG
issueWF.PNG (8.1 KB)
0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.