Project and Portfolio Management Practitioners Forum
cancel

Workflow/Request type commands not executing

SOLVED
Go to solution
Highlighted
Łukasz Czech
Super Contributor.

Workflow/Request type commands not executing

Hi,

I'm using ksc_run_sql command to perform update on some fields in DB. However after execution (does not matter wheter it is execution type command or request type command) I got message Execute commands (Succeeded) in workflow status but the log shows that no command was executed:
"All command conditions evaluated to false. No commands were run as a result.
Succeeded."
I have no conditions set for command (see attached file). Any ideas?

Thank you
Lukasz
6 REPLIES
Łukasz Czech
Super Contributor.

Re: Workflow/Request type commands not executing

attachment
Michael.Ebert
Super Contributor.
Solution

Re: Workflow/Request type commands not executing

Hi Lukasz,

I also had some trouble with this command.
It'll only be executed if you set an source environment in workflow. Nevertheless you still must specify an target environment for the special command (ENV="...").
After changing this, you will still get an error. Because as far as I know, you can only run SQL (Select) statements. There is no DML (Update/Delete) allowed. Therefor you need to write an SQL*Plus script and run it with ksc_local_exec.

Hopes it'll help
Kind regards,
Michael
Sascha Mohr_1
Outstanding Contributor.

Re: Workflow/Request type commands not executing

I had the same experience with DML statements here. If the policies at yours allow you to create additional PL/SQL functionality in the db schema, you create a function with that functionality and call that. You would probably gain a better performance than running a script on the server.
Surendra Poosar
Honored Contributor.

Re: Workflow/Request type commands not executing

Lukasz,

I think an update statement will not work in the ksc_run_sql command.

Instead try the following

ksc_run_sql QUERY_STRING= "select parameter1 from kcrt_request_details where " ENV_NAME="[WFS.SOURCE_ENVIRONMENT_NAME]"

ksc_set TEMP_PARAM="[SQL_OUTPUT]"

ksc_run_sql QUERY_STRING= "select visible_parameter1 from kcrt_request_details where " ENV_NAME="[WFS.SOURCE_ENVIRONMENT_NAME]"

ksc_set TEMP_VIS_PARAM="[SQL_OUTPUT]"

ksc_store = "[TEMP_PARAM]","[TEMP_VIS_PARAM]"
Łukasz Czech
Super Contributor.

Re: Workflow/Request type commands not executing

Surendra,

[SQL_OUTPUT] token does not seem to work -
ksc_set TEMP_PARAM="[SQL_OUTPUT]" command
is executed succesfully but TEMP_PARAM value is "[SQL_OUTPUT]" (text).
Łukasz Czech
Super Contributor.

Re: Workflow/Request type commands not executing

There need to be workflow source environment specified in workflow step - otherwise temp_param gets "[sql_output]" value (as string).