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

Question

Question

insert data in sql table

asked on September 29, 2016

Hello All,

How can i ensure that when i started a workflow, the insert data feature in the workflow has actually inserted the data?

meaning, the insert data feature has function correctly?

i'm having issue where the workflow is successful, that is, there is no errors on the console for that workflow, however when i looked in my database, there is no such record recorded?

any idea?

0 0

Answer

SELECTED ANSWER
replied on October 17, 2016

Let me know if you have any other issues with it, Iqbal!

0 0

Replies

replied on September 29, 2016

Iqbal,

One thing you can do is put a conditional decision in your workflow to check for the entry or entries...you can put a 'Query Data' activity after the 'Insert Data' step and specify those same criteria, i.e. (%(Start_Date_and_Time) and the initiator parameter as your values under 'Query Data Criteria'.  I used Last Name just because I don't have the intiator value in the table I used but you can use yours....then for your conditional decision branch just have it check for a true result in Query Data - Results Found.  Then if it is false, under the other branch you can have the workflow pause and email you or other steps.

 

 

0 0
replied on September 29, 2016

Hello Rick,

WOW

you saved my day

i'll be more relax now, there was a fear before i implement this solution whereby someone start a WF and same is not saved in the database.

Actually i used these data for a dashboard and every WF started will need at the end of the be bill and if it is not captured then im in big trouble.

Just to point, i did got two situation whereby users told me the process they started is not on dashboard.

I sincerely hope this will notify me when it does not find the result in the database.

0 0
replied on September 30, 2016

Glad to help, Iqbal.  With the unique start date and time variable I'm not sure why it wouldn't be inserting the data every time, unless possibly the connection is timing out or something along those lines, or the user id is not getting populated in some cases maybe?  At any rate, your diagram looks good, it should email you when it's not inserting, and you could even put a try-catch block in there to try inserting it again in the email branch with another conditional decision if you want. 

0 0
replied on October 11, 2016

Hello Rick,

I have done a testing whereby after i have saved data in the database and then delete the record, however when the WF continues, it does not send me the email telling that it have not found the record in the database so as to update same.

 

any idea

0 0
replied on October 11, 2016

Hi Iqbal,

 

Make sure you are querying the unique identifier and not a token that hasn't been changed yet in the workflow.  I get an error if the workflow cannot connect to the database and the workflow terminates, but if I simulate the data not being inserted into the table I want by sending it to the wrong table or something like that, this type of setup works.  Here is what the run looks like when it goes down the 'false' branch of the conditional decision, not finding the inserted data:

Check to make sure your inset data parameters are the same as what the query data parameters are and that they are uniquely changed during the workflow, such as this:

Then when the conditional branch checks for the 'query data results found', if it is set to false it should return properly, and send an email.  It works if the parameters are unique and the same, as here with the email:

 

What you can do is disable all the following activities in the workflow, and just publish up to the point where you check if the data has been inserted with the "Query Data' activity.  Then, highlight the Query Data activity in your workflow, and click the 'test' link under the activity box.  It will tell you if the results are there without having to run the workflow again.

 

0 0
replied on October 11, 2016

Hello Rick,

Million thanks for your help.

I have checked my workflow and the inserted values and query values are both the same as you explained above.

Is there a way where i can send you my workflow and have a look to it.

Thanks in advance.

my email add is: ibocus@intercontinentaltrust.com

 

0 0
SELECTED ANSWER
replied on October 17, 2016

Let me know if you have any other issues with it, Iqbal!

0 0
replied on March 24, 2019

Dears,

I've the same issue here LF version (10.2).

Workflow is working fine and rows inserted , but in some cases nothing inserted and no warning or error.

 

Please advice.

 

0 0
replied on March 25, 2019

Did the activity execute? Did the tokens have non-empty values?

0 0
replied on March 25, 2019

Yes, activity executed and tokens not empty. 

0 0
replied on December 26, 2024

This is happening for me in my test environment (thank goodness not in production). The workflow inserted data successfully on the first run, but does not work on following instances even though the activity executed and the retrieve business process variable values were not empty. The insert data tokens were blank on both successful and 'unsuccessful' workflows.  

Working with Workflow Version 11.0.2306.898 and Forms 11.0.2311.50564

You are not allowed to follow up in this post.

Sign in to reply to this post.