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

Question

Question

Modify Data Source in Workflow

asked on April 21, 2015 Show version history

Our CRM system was upgraded and the database is in a new location. In order to minimize the impact, I edited the existing data source to point to the new database location. Since this change, I've noticed a few things. 

  1. The workflow definitions did not automatically point to the new data source. Instead, it seems to have its own cache of the connection information. Why doesn't it look to the server for the data source configuration?
    1. How can I update the currently running workflows to look at the new database location? If there isn't a way, there needs to be! This kind of thing happens all the time and it makes workflows that last a few days or more dangerous to implement.
  2. I had to open each affected workflow and toggle the data source to another source and back to the CRM system and the connection information appeared to change in the workflow for all queries in the entire workflow definition. Strange, but fine.
  3. The query results are strange. I test in the workflow designer and I get 4 results. I run the query in SQL Studio and I get 4 results. But, when the workflow runs, it returns 2 results. Why would this be happening?

 

If someone can explain how the data source mapping works, that would be helpful.

If someone has a better idea of how to make this change (whether now or in the future), let me know.

Thanks in advance.

0 0

Answer

SELECTED ANSWER
replied on April 22, 2015

Kenny,

Your reseller opened a support case for the issue of the different number of results when testing the query in the Workflow Designer vs when the workflow actually runs.

I'll keep the majority of the troubleshooting in the support case. However, can you confirm a few things for us?

  1. The query that gets executed when the workflow is supposed to be running normally is using a value from some token? For example, the workflow runs on a document, reads in a field value like an ID, and then runs a query based off of that value (select [SomeField] from [SomeTable] where [ID] = %(RetrieveFieldValues_ID)) which returns multiple results and then does something.
  2. The value used in the query during the actual running of the workflow is the same as the value you specified when testing (verified by using a Track Tokens activity).
  3. In your Query Data or Custom Query activity, the "Rows To Return" option is set to "All rows" and not "First 2 rows"

If these things have all been confirmed and the issue still occurs, then we'll work with your reseller through the support case to perform additional troubleshooting.

Regards

0 0

Replies

replied on April 22, 2015

My main issue is that when I run the query within Designer or in SQL Studio, I get 4 results. When the workflow actually runs, it is only processing 2 results. Track tokens and the "for each row" activity only demonstrate 2 results.

 

Why would these results be different?

0 0
SELECTED ANSWER
replied on April 22, 2015

Kenny,

Your reseller opened a support case for the issue of the different number of results when testing the query in the Workflow Designer vs when the workflow actually runs.

I'll keep the majority of the troubleshooting in the support case. However, can you confirm a few things for us?

  1. The query that gets executed when the workflow is supposed to be running normally is using a value from some token? For example, the workflow runs on a document, reads in a field value like an ID, and then runs a query based off of that value (select [SomeField] from [SomeTable] where [ID] = %(RetrieveFieldValues_ID)) which returns multiple results and then does something.
  2. The value used in the query during the actual running of the workflow is the same as the value you specified when testing (verified by using a Track Tokens activity).
  3. In your Query Data or Custom Query activity, the "Rows To Return" option is set to "All rows" and not "First 2 rows"

If these things have all been confirmed and the issue still occurs, then we'll work with your reseller through the support case to perform additional troubleshooting.

Regards

0 0
replied on April 23, 2015

1. Yes

2. Yes, its the same.

3. You nailed it. I was off on vacation and someone was messing with this workflow. They changed it to "first 2 rows". I didn't notice this.

I can't believe I missed that... 

Thanks

0 0
replied on April 23, 2015

Any suggestions for the existing running workflows to use the new data source?

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

Sign in to reply to this post.