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

Question

Question

For Each Row Not Completing First Iteration

asked on January 28, 2015 Show version history

Using Workflow Designer 9.2.0.167

We have a fairly simple workflow that does a few database lookups based off of each other. The first query looks in a database to get all rows that have a completed = 0 value. Then in the For Each Row activity, we do another database lookup based on the SSN and Position value based on the Completed lookup and have it return 1 result. After that lookup, we have another lookup for a supervisor based on a SupervisorNamekey value returned from the SSN and Position lookup to get the supervisors information.

We added the Track Tokens activity within the For Each Row activity to see how it was working. It seems as though the first iteration is not completing. It creates tokens for the first row returned from the Completed query, but never performs the other database lookups.

The second iteration creates tokens for the second row retrieved and performs the database lookups, but does the database lookups using the values of the previous iteration. This happens for all subsequent iterations as well. Below is a screenshot of the workflow.

Here are the tokens from the first activity:

As you can see there are no tokens for the queryemployeedata activity or the querysupervisordata activity.

Any ideas of what would be causing this?

0 0

Answer

SELECTED ANSWER
replied on January 28, 2015

Track Tokens is going to grab all of the tokens at that point in the Workflow. So the first instance of Track Tokens shouldn't have have any tokens for the queryemployeedata activity or the querysupervisordata activity, because those tokens haven't been generated yet. If you want to see the tokens from the first iteration, move the Track Tokens activity to the end of the loop.

2 0
replied on January 28, 2015 Show version history

That makes more sense. I was under the impression that you put the activity where you wanted to start tracking tokens. I will do as you suggested and update the post.

0 0
replied on January 28, 2015

Looks like that did it. Thank you.

0 0

Replies

replied on January 28, 2015

you might want to redact those SSNs in the screenshot....

1 0
replied on January 28, 2015

Thanks. Totally missed that.

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

Sign in to reply to this post.