Long-Running Activity fails with invalid status code

When running a long-running activity, it fails with an invalid status code.

“Create Form Task: Operation returned an invalid status code ‘OK’”

Long running process is returning an invalid status code.

When using long running process, the operation returns the following error:

"Create Form Task: Operation returned an invalid status code 'OK'"

This error occurs when tasks have not been enabled in Orchestrator. To resolve this, update the web.config file.

  1. Log on to the Orchestrator server.
  2. Open the file "C:\Program Files (x86)\UiPath\Orchestrator\web.config"
  3. Add the following keys

 

<add key="Features.LongRunning.Enabled" value="true" />
<add key="Tasks.ModuleEnabled" value="true" />