# SysTask - Create A New Task From BPM That Actually Starts

**URL:** <https://www.epiusers.help/t/systask-create-a-new-task-from-bpm-that-actually-starts/135789>\
**Category:** Kinetic ERP\
**Created:** [June 26, 2026, 7:48pm UTC](https://www.epiusers.help/t/systask-create-a-new-task-from-bpm-that-actually-starts/135789 "2026-06-26T19:48:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![halcyon](https://www.epiusers.help/user_avatar/www.epiusers.help/halcyon/32/81699_2.png) [@halcyon](https://www.epiusers.help/u/halcyon)\
**Post date:** [June 26, 2026, 7:48pm UTC](https://www.epiusers.help/t/systask-create-a-new-task-from-bpm-that-actually-starts/135789/1 "2026-06-26T19:48:48Z")

</div>

So. I am trying to trigger a second report style after I fire one off so it is automated. I have code going that gets the task into the Active Tasks queue, but it does not want to actually fire off, it just stays with a status of Queued. Any idea how to successfully kick off this task?

Heres my code:

```auto
var param = ds.ProcessPaymentParam.FirstOrDefault();
if (param == null) return;

// Only fire for the print style - prevents loop if ECM style is ever run manually
if (param.ReportStyleNum != 1006) return;

// Create ECM task
var newTask = new Ice.Tables.SysTask();
newTask.Company = callContextClient.CurrentCompany;
newTask.RunProcedure = "Erp.Internal.AP.ProcessPayment.dll";
newTask.TaskDescription = "AP Check ECM Filing";
newTask.TaskType = "Report";
newTask.TaskStatus = "Queued";
newTask.SubmitUser = callContextClient.CurrentUserId;
//newTask.StartedOn = System.DateTime.UtcNow;
Db.Add(newTask);
Db.Validate(newTask);

var printTask = Db.SysTask
    .Where(t => t.Company == callContextClient.CurrentCompany
             && t.RunProcedure == "Erp.Internal.AP.ProcessPayment.dll"
             && t.SysTaskNum != newTask.SysTaskNum)
    .OrderByDescending(t => t.SysTaskNum)
    .FirstOrDefault();

if (printTask != null)
{
    newTask.AgentID = printTask.AgentID;
    newTask.AgentSchedNum = printTask.AgentSchedNum;
    Db.Validate(newTask);
}

Action<string, string, int, bool, decimal> addParam = (name, ch, integer, logical, dec) => {
    var p = new Ice.Tables.SysTaskParam();
    p.SysTaskNum = newTask.SysTaskNum;
    p.ParamName = name;
    p.ParamCharacter = ch;
    p.ParamInteger = integer;
    p.ParamLogical = logical;
    p.ParamDecimal = dec;
    Db.Add(p);
};

addParam("ReportID", "ApCheck", 0, false, 0m);
addParam("ReportStyleNum", "", 1002, false, 0m);
addParam("GroupID", param.GroupID, 0, false, 0m);
addParam("BankAcctID", param.BankAcctID, 0, false, 0m);
addParam("Cur-Comp", callContextClient.CurrentCompany, 0, false, 0m);
addParam("DCD-UserID", callContextClient.CurrentUserId, 0, false, 0m);
addParam("Cur-Plant", callContextClient.CurrentPlant, 0, false, 0m);
addParam("CUR-LangID", "enu", 0, false, 0m);
addParam("AutoAction", "", 0, false, 0m);
addParam("SSRSEnableRouting", "", 0, true, 0m);
addParam("FormsToGenerate", param.FormsToGenerate, 0, false, 0m);
addParam("FormsToPrint", "C", 0, false, 0m);
addParam("SSRSRenderFormat", "PDF", 0, false, 0m);
addParam("CheckPrinting", "", 0, true, 0m);
addParam("SortBy", param.SortBy, 0, false, 0m);
addParam("RptFileType", "XML", 0, false, 0m);
addParam("ReportParameterDataSetId", "ProcessPayment", 0, false, 0m);
addParam("ReportParameterDataSetSystemCode", "Erp", 0, false, 0m);
addParam("ReportCultureCode", param.ReportCultureCode,0, false, 0m);
addParam("ReportCurrencyCode", param.ReportCurrencyCode,0, false, 0m);

Db.Validate();

```

---

<div class="post-metadata">

**Author:** ![klincecum](https://www.epiusers.help/user_avatar/www.epiusers.help/klincecum/32/100137_2.png) [@klincecum](https://www.epiusers.help/u/klincecum)\
**Post date:** [June 26, 2026, 8:28pm UTC](https://www.epiusers.help/t/systask-create-a-new-task-from-bpm-that-actually-starts/135789/2 "2026-06-26T20:28:48Z")

</div>

> [@halcyon](#):
>
> Any idea how to successfully kick off this task?

Use the BOs, not whatever you are doing.

---

<div class="post-metadata">

**Author:** ![halcyon](https://www.epiusers.help/user_avatar/www.epiusers.help/halcyon/32/81699_2.png) [@halcyon](https://www.epiusers.help/u/halcyon)\
**Post date:** [June 26, 2026, 8:52pm UTC](https://www.epiusers.help/t/systask-create-a-new-task-from-bpm-that-actually-starts/135789/3 "2026-06-26T20:52:44Z")

</div>

Understandable, I’ve just been floundering trying to get this fixed before the upgrade.

Can play with the BOs some more now that a process for two report styles has been established.

---

<div class="post-metadata">

**Author:** ![Mark\_Wonsil](https://www.epiusers.help/user_avatar/www.epiusers.help/mark_wonsil/32/51594_2.png) [@Mark\_Wonsil](https://www.epiusers.help/u/Mark_Wonsil)\
**Post date:** [June 26, 2026, 10:17pm UTC](https://www.epiusers.help/t/systask-create-a-new-task-from-bpm-that-actually-starts/135789/4 "2026-06-26T22:17:21Z")

</div>

Do you have Advanced Print Routing?

---

<div class="post-metadata">

**Author:** ![josecgomez](https://www.epiusers.help/user_avatar/www.epiusers.help/josecgomez/32/55731_2.png) [@josecgomez](https://www.epiusers.help/u/josecgomez)\
**Post date:** [June 26, 2026, 11:48pm UTC](https://www.epiusers.help/t/systask-create-a-new-task-from-bpm-that-actually-starts/135789/5 "2026-06-26T23:48:28Z")

</div>

You are writing tot the Db essentially directly bypassing all the business logic

Do a trace  
Call the BOs  
..  
#Profit
