title: Azure durable functions - status is running even after completing all the tasks
body: <p>Related to my previous question - <a href="https://stackoverflow.com/questions/47375598/calling-hundreds-of-azure-functions-in-parallel">link</a></p>
  
  <p>I have created a Durable job with HttpStart in order to call it via http request (code from sample code from MSDN). </p>
  
  <p>In my Durable job, I wrote logic to loop and call an activity trigger 600 times. </p>
  
  <pre class="lang-cs prettyprint-override"><code>public static async Task&lt;List&lt;BusinessRules.RuleResponse&gt;&gt; Run(
      [OrchestrationTrigger] DurableOrchestrationContext context)
  {
      var data = await context.CallActivityAsync&lt;BusinessRules.CustomersData&gt;("XmlDeserialiser");
  
      var tasks = new List&lt;Task&lt;BusinessRules.RuleResponse&gt;&gt;();
  
      for (int i = 0; i &lt; 600; i++)
      {
          tasks.Add(context.CallActivityAsync&lt;BusinessRules.RuleResponse&gt;("Rule1", data));
          // tasks.Add(context.CallActivityAsync&lt;BusinessRules.RuleResponse&gt;("Rule2", data));
          // tasks.Add(context.CallActivityAsync&lt;BusinessRules.RuleResponse&gt;("Rule2", data));
      }
      await Task.WhenAll(tasks);
  
      var result = tasks.Select(x =&gt; x.Result).ToList();
      return result;     
  }
  </code></pre>
  
  <p>The activitytrigger does is just delay for 10 ms and then return object. </p>
  
  <pre class="lang-cs prettyprint-override"><code>[FunctionName("Rule1")]
  public static async Task&lt;BusinessRules.RuleResponse&gt; Run(
      [ActivityTrigger] BusinessRules.CustomersData data)
  {
       await Task.Delay(10);
       return new BusinessRules.RuleResponse()
       {
           IsValid = true,
           RuleName = "Rule1"
       };
  } 
  </code></pre>
  
  <p>Idea behind this exercise is my Durable function should be executing 600 business validation rules for each request it receives.</p>
  
  <p>The job status is always coming back as "Running" when I execute the above function with 600 loop. If change the loop count to 500, its working without any problem and returns the result. I tested this on my local machine and on Azure. Its the same in both the environments. However, in my local machine, I found that the job gets completed and I could get the debug point hit in my Durablefunction at <code>return result;</code> but the status is always displaying as "running". </p>
  
  <p>It looks like Durable functions completed the job but for some reason the data wasnt logged in to the Azure storage tables and hence status is still running. </p>
  
  <p>Please advise.</p>