Solved

Workflow activity going pending state

  • 14 June 2022
  • 5 replies
  • 104 views

Userlevel 3
Badge +12

Hi Guys,

 

I’ve created a workflow, which was running just fine, but starting of now, one of the activities goes into pending state with error 19:857, the activity executes the following PowerShell script on the CommServ:

$count = (Select-String -Pattern "string" .\file.txt).Count

if ($count -ne 0)

{    

exit 1

}

 

The exit code 1 here, will be forwarded to a decision block.

Any help would be much appreciated.

Regards.

icon

Best answer by Commvault Engineer 14 June 2022, 23:45

View original

5 replies

Userlevel 7
Badge +23

Hi @Commvault Engineer , thanks for the post (as always)!

19:857 is a code that can contain various different messages.  Can you see what the actual error message is?  That will give us better direction.

Userlevel 3
Badge +12

Hi Mike,

 

Actually, I managed to fix the issue through the workflow's debug mode, the activity that was causing the “Pending” state is an ExecuteScript activity, which executes the script mentioned previously, when the script arrives to the “exit 1” phase, the activity generates an error through the exit code 1, and fails, which causes the whole workflow to fail.

 

After trying some tweaks, I managed to resolve it by forcing the activity to process its execution even with the error code 1, through one of the parameters on the general tab of the activity, don’t remember the exact parameter, and will update on this.

Userlevel 3
Badge +12

Hi Mike, as mentioned before, I used the parameter below to tune the activity in order to process the job.

 

Userlevel 7
Badge +23

You’re awesome, thank you for sharing!!

Userlevel 3
Badge +12

You’re awesome, thank you for sharing!!

Thanks for your usual support :-)

Reply