Page 1 of 1

Stored procedure fails

Posted: Wed Mar 01, 2017 12:50 pm
by sdmeyer
I have created a stored procedure in SQL to run a program that creates project folders. When I run it from the SQL management console, it all works great and will create the folders. When I try to run it in a User Initiated Workflow it fails. I see no error message when it runs. In the SP code I need to pass a variable of the WBS1, so in my UIW I pass it what I think is the WBS1 but it does not create the folders. In the SQL Management Console, I log in as the administrator, In Vision I have access to create SP Actions.

Re: Stored procedure fails

Posted: Tue Mar 07, 2017 1:49 am
by aadilnaeem
Hi

This seems to be permission issues. I have done the same long back ago (creating a project folder through stored procedure)

Try to run the SP from workflow without passing parrametter and check if it runs fine and then investigate with parrameter

Regards

Re: Stored procedure fails

Posted: Thu Mar 09, 2017 9:46 am
by sdmeyer
Turns out when Vision creates a project (WBS1), it take a few seconds to save to SQL. By putting a 30 second wait in my code, everything works great now.

Re: Stored procedure fails

Posted: Thu Mar 09, 2017 12:16 pm
by aadilnaeem
It also depends uppn when and which sequence you are calling this workflow becuase first Vision creates a project and once project is created then this (WBS1) can be passed as a parrametter to other workflow.

I suggest to put this workflow as a last to execute