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

Question

Question

Any idea of how to search for a record in MS Sql database based on a token value

asked on September 29, 2016

Hello All,

I have WF where it insert data into an MS Sql database with a token value as its unique identifier.\

How can i ensure that the data has been successfully saved in the database before the WF moves forward.

My idea is, it needs to make a search in the database based on the token value and if it find it then the WF Moves forward else it gives an error message.

Any idea of how i can do this

part of my WF

0 0

Replies

replied on September 29, 2016 Show version history

Hi Iqbal,

You can use Query Data activity

  

then search the value token in the table

 

and..

best regards!!

Marco.

1 0
replied on September 29, 2016

Hello Marco,

I have designed the WF in this way,

Is it ok?

 

1 0
replied on September 30, 2016

Hi Iqbal,

Is ok!!!, it all depends on you want to have as final result. WF can go in testing the design flow as you go, this is a great help.

1. Click in the button Run Current Workflow

2. Select a Entry for test

3. Run workflow

4. Track results.

As you progress and testing, you can be sure that what you want to execute workflow result.

regards
!!!

Marco.

0 0
replied on September 29, 2016

You could have it perform the search as you said, but instead of returning an error if it doesn't find it, it could wait for a minute and then run the search again until it finds it.

0 0
replied on September 30, 2016

Could you describe the actual problem you're trying to solve? Querying if data was inserted will always return true unless the Insert Data activity threw an error. And if it did, then the instance would terminate, so Query Data wouldn't run.

0 0
replied on October 11, 2016

Hello Miruna,

I want to know if the data is being saved in a database successfully.

Is it the right way to do it?

0 0
replied on October 11, 2016

Like I said above, if the Insert Data activity did not returned an error, then the row was inserted.

It's not clear to me what you're trying to do because you mention a unique identifier, yet your workflow only inserts a date and a user name in SQL.

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

Sign in to reply to this post.