Subscribe
Accepted Solution

jobid empty REST API ( sometimes ) - workflow executed correctly

Calling WFA from POSH using REST API. Finding frequent timeouts to get a job ID when executing a workflow.

 

Write-Host "Executing workflow : $workflowname"
$jobid = $wfa.executeWorkflow (...)

 

The workflow is executed fine, but very often the $jobid shows an empty variable.

 

Is there any way to fix this?

 

Thanks in advance.

Re: jobid empty REST API ( sometimes ) - workflow executed correctly

@trentino123

 

Default time-out for a Web Service Proxy object ( $wfa) is 100 sec ( 100000 ms ). You can modify it as:

 

# Making it 500 sec.

 

$wfa.Timeout =  500000

 

## Now call Execute workflow method

 

$jobid = $wfa.executeWorkflow (...)

 

 

sinhaa

 

 

 

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

Re: jobid empty REST API ( sometimes ) - workflow executed correctly

Thanks Sinha ! That solved the issue.