# ECM: If my DataLink runs for too long, I'm getting the 'A Task was Cancelled' exception in my workflow

**URL:** <https://www.epiusers.help/t/ecm-if-my-datalink-runs-for-too-long-im-getting-the-a-task-was-cancelled-exception-in-my-workflow/122117>\
**Category:** ECM\
**Tags:** datalink, ecm\
**Created:** [January 7, 2025, 1:16pm UTC](https://www.epiusers.help/t/ecm-if-my-datalink-runs-for-too-long-im-getting-the-a-task-was-cancelled-exception-in-my-workflow/122117 "2025-01-07T13:16:05Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stevensi1018](https://www.epiusers.help/user_avatar/www.epiusers.help/stevensi1018/32/63142_2.png) [@Stevensi1018](https://www.epiusers.help/u/Stevensi1018)\
**Post date:** [January 7, 2025, 1:16pm UTC](https://www.epiusers.help/t/ecm-if-my-datalink-runs-for-too-long-im-getting-the-a-task-was-cancelled-exception-in-my-workflow/122117/1 "2025-01-07T13:16:05Z")

</div>

EDIT: EpicCare case number: **CS0004717723**

I have a DataLink that can takes 1-5 minutes depending of the number of subprocesses to create. It calls an Epicor function which then calls the ECM API to create one or multiple documents. Each calls takes about 30-45 seconds so the 3 minutes limit seems broken for a longer example. It still creates all the subprocesses but it’s annoying to get an exception in ECM because the user won’t really think about fixing it since it’s an asynchronous task

I found another post where they updated the web.config with that value but it’s only for AP2 and SO integrations it seems

```auto
<add key="ErpTimeoutSeconds" value="300" />
    <!--affects precreate and create in AP2 and SO integrations; default is 180; place this in Astria.Client.WindowsServices.AutomationService.exe.config for client-based integration-->

```

 ![image](https://www.epiusers.help/uploads/default/original/3X/e/0/e097a27dbb8784b12f9de20b0b493227c2072926.png)

Is there any configuration somewhere or something that I can do about that?

---

<div class="post-metadata">

**Author:** ![MikeGross](https://www.epiusers.help/user_avatar/www.epiusers.help/mikegross/32/14500_2.png) [@MikeGross](https://www.epiusers.help/u/MikeGross)\
**Post date:** [January 7, 2025, 1:47pm UTC](https://www.epiusers.help/t/ecm-if-my-datalink-runs-for-too-long-im-getting-the-a-task-was-cancelled-exception-in-my-workflow/122117/2 "2025-01-07T13:47:29Z")

</div>

Interesting use of the datalink/function/API combo - are you sure that the function isn’t failing?

---

<div class="post-metadata">

**Author:** ![Stevensi1018](https://www.epiusers.help/user_avatar/www.epiusers.help/stevensi1018/32/63142_2.png) [@Stevensi1018](https://www.epiusers.help/u/Stevensi1018)\
**Post date:** [January 7, 2025, 2:40pm UTC](https://www.epiusers.help/t/ecm-if-my-datalink-runs-for-too-long-im-getting-the-a-task-was-cancelled-exception-in-my-workflow/122117/3 "2025-01-07T14:40:01Z")

</div>

Yeah, the function is working correctly and is finishing its execution even when the exception happens

I just run the DataLink in the Admin tab and it returns the same thing but faster (Took about 1 or 2 minutes to get this message):

 ![image](https://www.epiusers.help/uploads/default/original/3X/e/c/eca5586cec79691f2a60a4aea819503b66572087.png)

If I run the function via the Epicor API (Swagger page , v2), everything is OK. It’s really only the message on the ECM side which is causing problem in my workflow

Code: 200:  
Return:  
{  
“ReturnMessage”: null  
}  
Request Duration: 163061 ms

---

<div class="post-metadata">

**Author:** ![MikeGross](https://www.epiusers.help/user_avatar/www.epiusers.help/mikegross/32/14500_2.png) [@MikeGross](https://www.epiusers.help/u/MikeGross)\
**Post date:** [January 7, 2025, 3:10pm UTC](https://www.epiusers.help/t/ecm-if-my-datalink-runs-for-too-long-im-getting-the-a-task-was-cancelled-exception-in-my-workflow/122117/4 "2025-01-07T15:10:42Z")

</div>

The ECM support guys are usually pretty good and I suspect you’ll need to get to them to figure out how to change (find out which) timeout settings - or have them help figure out why it’s cancelling in general.

Other option would be to figure out how to make the Function trigger asynchronously and release the ECM workflow datalink call more quickly. Perhaps the data link does a UD table row insert, and the function is called by a directive on the UD table row insert?

---

<div class="post-metadata">

**Author:** ![Stevensi1018](https://www.epiusers.help/user_avatar/www.epiusers.help/stevensi1018/32/63142_2.png) [@Stevensi1018](https://www.epiusers.help/u/Stevensi1018)\
**Post date:** [January 7, 2025, 4:00pm UTC](https://www.epiusers.help/t/ecm-if-my-datalink-runs-for-too-long-im-getting-the-a-task-was-cancelled-exception-in-my-workflow/122117/5 "2025-01-07T16:00:37Z")

</div>

Oh, I see that’s definitely something that I could try if I have no other option. Thanks for the suggestion

Will try to see with the ECM support team and will update this thread

---

<div class="post-metadata">

**Author:** ![vleveris](https://www.epiusers.help/letter_avatar_proxy/v4/letter/v/898d66/32.png) [@vleveris](https://www.epiusers.help/u/vleveris)\
**Post date:** [January 7, 2025, 4:17pm UTC](https://www.epiusers.help/t/ecm-if-my-datalink-runs-for-too-long-im-getting-the-a-task-was-cancelled-exception-in-my-workflow/122117/6 "2025-01-07T16:17:18Z")

</div>

I believe there is a Datalink Timeout Connection limit in Admin \> Site Settings that may be worth reviewing, too.

---

<div class="post-metadata">

**Author:** ![Stevensi1018](https://www.epiusers.help/user_avatar/www.epiusers.help/stevensi1018/32/63142_2.png) [@Stevensi1018](https://www.epiusers.help/u/Stevensi1018)\
**Post date:** [January 7, 2025, 7:55pm UTC](https://www.epiusers.help/t/ecm-if-my-datalink-runs-for-too-long-im-getting-the-a-task-was-cancelled-exception-in-my-workflow/122117/7 "2025-01-07T19:55:37Z")

</div>

It didn’t change anything unfortunately. Tried to put a high value (100 000) and still the same problem

---

<div class="post-metadata">

**Author:** ![swilliasc111](https://www.epiusers.help/user_avatar/www.epiusers.help/swilliasc111/32/14357_2.png) [@swilliasc111](https://www.epiusers.help/u/swilliasc111)\
**Post date:** [January 8, 2025, 4:34am UTC](https://www.epiusers.help/t/ecm-if-my-datalink-runs-for-too-long-im-getting-the-a-task-was-cancelled-exception-in-my-workflow/122117/8 "2025-01-08T04:34:21Z")

</div>

Wondering if you tried other versions v1 or different datalinks to do the same call, sometimes a REST call works in REST and doesn’t work in ECM, I usually try to use a different call since timeouts and other calls can be difficult to diagnose in ECM.

---

<div class="post-metadata">

**Author:** ![TobyLai](https://www.epiusers.help/user_avatar/www.epiusers.help/tobylai/32/8246_2.png) [@TobyLai](https://www.epiusers.help/u/TobyLai)\
**Post date:** [January 8, 2025, 4:58am UTC](https://www.epiusers.help/t/ecm-if-my-datalink-runs-for-too-long-im-getting-the-a-task-was-cancelled-exception-in-my-workflow/122117/9 "2025-01-08T04:58:42Z")

</div>

I have reported a similar issue, one of our PO has 60 lines and when ECM is doing the matching, it will become a task is cancelled. Case number : CS0004146994

 ![image](https://www.epiusers.help/uploads/default/original/3X/0/2/027226721be3c0bdbbb1b200ccda3ffba9071848.png) I am interested to know if there is a solution to this.

---

<div class="post-metadata">

**Author:** ![vleveris](https://www.epiusers.help/letter_avatar_proxy/v4/letter/v/898d66/32.png) [@vleveris](https://www.epiusers.help/u/vleveris)\
**Post date:** [January 8, 2025, 3:57pm UTC](https://www.epiusers.help/t/ecm-if-my-datalink-runs-for-too-long-im-getting-the-a-task-was-cancelled-exception-in-my-workflow/122117/10 "2025-01-08T15:57:20Z")

</div>

I have experienced this with a number of customers and many end up submitting a ticket to Epicor to have the issue resolved. Based on the amount of anecdotal instances there appears to be for this, it would seem that the ECM development team should look at a better limit to the timeout to avoid this issue.

In some cases, the Auto-Match (the typical culprit of timeouts) can be amended to reduce the timeframe of potential matches. This has resolved the issue in some cases, but not all. It may also have the inverse result for some invoices compared to others. As a result, this may require multiple instances of the Auto-Match action to be designed for certain vendors to filter results by date while others don’t need that.

---

<div class="post-metadata">

**Author:** ![Stevensi1018](https://www.epiusers.help/user_avatar/www.epiusers.help/stevensi1018/32/63142_2.png) [@Stevensi1018](https://www.epiusers.help/u/Stevensi1018)\
**Post date:** [January 9, 2025, 1:56pm UTC](https://www.epiusers.help/t/ecm-if-my-datalink-runs-for-too-long-im-getting-the-a-task-was-cancelled-exception-in-my-workflow/122117/11 "2025-01-09T13:56:43Z")

</div>

Yeah, it seems like it’s not well documented enough. Support just got back to me asking how many lines of invoices I’m creating which means that they don’t understand my issue at all since I’m not creating invoices at all

For now, I’ll try to put a variable in the return message of my DataLink and if my variable is not empty, I’ll send an email to myself in another action. So, 95% of the time, the workflow will advance correctly and the other 5%, when it triggers an exception, I’ll receive an email to fix it myself fast

---

<div class="post-metadata">

**Author:** ![utaylor](https://www.epiusers.help/user_avatar/www.epiusers.help/utaylor/32/64664_2.png) [@utaylor](https://www.epiusers.help/u/utaylor)\
**Post date:** [October 9, 2026, 1:14pm UTC](https://www.epiusers.help/t/ecm-if-my-datalink-runs-for-too-long-im-getting-the-a-task-was-cancelled-exception-in-my-workflow/122117/12 "2026-10-09T13:14:22Z")

</div>

> [@vleveris](#):
>
> In some cases, the Auto-Match (the typical culprit of timeouts) can be amended to reduce the timeframe of potential matches. This has resolved the issue in some cases, but not all. It may also have the inverse result for some invoices compared to others. As a result, this may require multiple instances of the Auto-Match action to be designed for certain vendors to filter results by date while others don’t need that.

I have this right now, is there anything specific I can say to support or is this a PS issue?

---

<div class="post-metadata">

**Author:** ![vleveris](https://www.epiusers.help/letter_avatar_proxy/v4/letter/v/898d66/32.png) [@vleveris](https://www.epiusers.help/u/vleveris)\
**Post date:** [October 9, 2026, 1:21pm UTC](https://www.epiusers.help/t/ecm-if-my-datalink-runs-for-too-long-im-getting-the-a-task-was-cancelled-exception-in-my-workflow/122117/13 "2026-10-09T13:21:26Z")

</div>

That comment was directed towards the timeframe of what qualifies as a match to the invoice subtotal. Using these ReceivedAfter and ReceivedBefore paramters you can narrow the search results to packing slips that fall within those boundaries. You can make this dynamic with the Math task to add or subtract days from a different value, such as the InvoiceDate.

 ![image](https://www.epiusers.help/uploads/default/original/3X/a/3/a3fe8080e472eb724ee0ad7f70e2455fca5fbd96.png)

There is also the Auto Match Solution Limit which can increase the permutations that it finds, but this will really only then present even more options when prompted to use the Determine Solution button.

 ![image](https://www.epiusers.help/uploads/default/original/3X/3/e/3eb2bf5bab199a6004e7d628a4b717e452d4adc1.png)

There is another option related to time, but if 300 seconds (5 minutes) isn’t enough, I would say the results need to be narrowed down which means the first option I stated would be best.

 ![image](https://www.epiusers.help/uploads/default/original/3X/e/c/ec8e1dd56b43c09ab67043cc2ae209fb87046f99.png)

---

<div class="post-metadata">

**Author:** ![utaylor](https://www.epiusers.help/user_avatar/www.epiusers.help/utaylor/32/64664_2.png) [@utaylor](https://www.epiusers.help/u/utaylor)\
**Post date:** [October 9, 2026, 1:43pm UTC](https://www.epiusers.help/t/ecm-if-my-datalink-runs-for-too-long-im-getting-the-a-task-was-cancelled-exception-in-my-workflow/122117/14 "2026-10-09T13:43:06Z")

</div>

> [@vleveris](#):
>
> There is another option related to time, but if 300 seconds (5 minutes) isn’t enough, I would say the results need to be narrowed down which means the first option I stated would be best.

That’s the odd part, we don’t have that many receipts out there for this given query, I wish I knew what the actual json was for that query so I could see the syntax. There are only 43 receipts all within a month…

---

<div class="post-metadata">

**Author:** ![utaylor](https://www.epiusers.help/user_avatar/www.epiusers.help/utaylor/32/64664_2.png) [@utaylor](https://www.epiusers.help/u/utaylor)\
**Post date:** [October 9, 2026, 1:43pm UTC](https://www.epiusers.help/t/ecm-if-my-datalink-runs-for-too-long-im-getting-the-a-task-was-cancelled-exception-in-my-workflow/122117/15 "2026-10-09T13:43:16Z")

</div>

Thanks Victor.

---

<div class="post-metadata">

**Author:** ![vleveris](https://www.epiusers.help/letter_avatar_proxy/v4/letter/v/898d66/32.png) [@vleveris](https://www.epiusers.help/u/vleveris)\
**Post date:** [October 9, 2026, 1:58pm UTC](https://www.epiusers.help/t/ecm-if-my-datalink-runs-for-too-long-im-getting-the-a-task-was-cancelled-exception-in-my-workflow/122117/16 "2026-10-09T13:58:32Z")

</div>

Yea, those proprietary datalinks can be frustrating in that we don’t exactly know what each is doing, nor can we amend them in any way. The Pre-Create is a big one that I would love more information on as it seems to be incredibly capable, but it can’t do everything at once and knowing what it does and in what order would be helpful. Adding other outputs to these datalinks would be nice, too, as then I don’t have to create my own datalink just to get that one extra field.

---

<div class="post-metadata">

**Author:** ![utaylor](https://www.epiusers.help/user_avatar/www.epiusers.help/utaylor/32/64664_2.png) [@utaylor](https://www.epiusers.help/u/utaylor)\
**Post date:** [October 9, 2026, 2:00pm UTC](https://www.epiusers.help/t/ecm-if-my-datalink-runs-for-too-long-im-getting-the-a-task-was-cancelled-exception-in-my-workflow/122117/17 "2026-10-09T14:00:23Z")

</div>

Yeah I agree, I wish this was more open, not sure why they keep it so hidden.

I increased the timeout but now I get this “Array dimensions exceeded supported range.” 😂 .

I don’t suppose there’s yet another setting for array/line size haha.

Thanks for your help Victor!

---

<div class="post-metadata">

**Author:** ![vleveris](https://www.epiusers.help/letter_avatar_proxy/v4/letter/v/898d66/32.png) [@vleveris](https://www.epiusers.help/u/vleveris)\
**Post date:** [October 9, 2026, 2:24pm UTC](https://www.epiusers.help/t/ecm-if-my-datalink-runs-for-too-long-im-getting-the-a-task-was-cancelled-exception-in-my-workflow/122117/18 "2026-10-09T14:24:34Z")

</div>

I don’t know if I’ve ever seen that exception before… I would assume that to mean that the results returned maxed out the allowable table records it populates. I’m not aware of any setting within a cloud environment that would allow you to change that.

If you were to look at all of the uninvoiced receipts yourself, are you seeing multiple records that could match to that PO? I’m curious what you may see for yourself to compare to what ECM is finding. The recording within ECM would also reveal details that could help, but before sharing here I would recommend making sure that any details you don’t want to share are removed/censored.

---

<div class="post-metadata">

**Author:** ![utaylor](https://www.epiusers.help/user_avatar/www.epiusers.help/utaylor/32/64664_2.png) [@utaylor](https://www.epiusers.help/u/utaylor)\
**Post date:** [October 12, 2026, 1:48pm UTC](https://www.epiusers.help/t/ecm-if-my-datalink-runs-for-too-long-im-getting-the-a-task-was-cancelled-exception-in-my-workflow/122117/19 "2026-10-12T13:48:09Z")

</div>

Thanks, I created a case with Epicor, I already dug into the PO and it’s not that many lines or receipt lines so I don’t get it.

---

<div class="post-metadata">

**Author:** ![Anthony\_Gercar](https://www.epiusers.help/user_avatar/www.epiusers.help/anthony_gercar/32/39335_2.png) [@Anthony\_Gercar](https://www.epiusers.help/u/Anthony_Gercar)\
**Post date:** [October 16, 2026, 12:20am UTC](https://www.epiusers.help/t/ecm-if-my-datalink-runs-for-too-long-im-getting-the-a-task-was-cancelled-exception-in-my-workflow/122117/20 "2026-10-16T00:20:40Z")

</div>

Do you know the step it’s getting stuck on for sure?  
Did you put any stops in and recorded?

If its auto-match, what are your settings?

[Next page](https://www.epiusers.help/t/ecm-if-my-datalink-runs-for-too-long-im-getting-the-a-task-was-cancelled-exception-in-my-workflow/122117.md?page=2)
