<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="https://www.schweda.net/style_feed.css" ?>
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
    xmlns:atom="http://www.w3.org/2005/Atom"	
	xmlns:dc="http://purl.org/dc/elements/1.1/" > 
<channel>
    <title>schweda.net - Blog</title>
    <link>https://www.schweda.net/</link>
    <description>schweda.net - Blog - Blog-Beitraege</description>
    <language>de-at</language>
    <copyright>Copyright 2006-2026</copyright>
    <generator>schweda.net</generator>
    <managingEditor>heinz.schweda@schweda.net (Heinz Schweda)</managingEditor>
    <webMaster>heinz.schweda@schweda.net (Heinz Schweda)</webMaster>
    <category>Blog</category>
	<atom:link href="https://schweda.net/blog_rss.php?bid=654" rel="self" type="application/rss+xml" />
<item>
<title><![CDATA[Stapelverarbeitungsauftrag mit mehreren Aufgaben per Code erstellen]]></title>
<description><![CDATA[
<p>Die nachstehenden Code-Snippets sollen zeigen, wir man mit Hilfe der BatchHeader-Klasse Stapelverarbeitungsauftr&auml;ge erstellen kann.
</p>


<h2>Beispiele f&uuml;r ein&nbsp;RunBaseBatch-Konstrukt
</h2>


<pre class="pre_blog_axcode">
static void createBatchWithMultipletasks(Args _args)
{
    BatchHeader batchHeader;
    Tutorial_RunbaseBatch batchTask1, batchTask2, batchTask3;

    //create batch header
    batchHeader = BatchHeader::construct();
    batchHeader.parmCaption(&quot;Example of a batch job with multiple tasks&quot;);

    //create instances of the classes to use as batch tasks
    batchTask1 = Tutorial_RunbaseBatch::construct();
    batchTask2 = Tutorial_RunbaseBatch::construct();
    batchTask3 = Tutorial_RunbaseBatch::construct();

    //add the batch tasks to the batch header
    batchHeader.addTask(batchTask1);
    batchHeader.addTask(batchTask2);
    batchHeader.addTask(batchTask3);

    //save the batch
    batchHeader.save();
}
</pre>

<br /><a class="div_blog_category_gotodetail" href="https://www.schweda.net/blog_ax.php?bid=654" target="_self" title="Weiterlesen...">Weiterlesen...</a>]]></description>
<category>Microsoft Dynamics AX (Axapta)</category>
<pubDate>Wed, 13 Feb 2019 19:25:00 +0100</pubDate>
<link>https://www.schweda.net/blog_ax.php?bid=654</link>
<comments>https://www.schweda.net/blog_ax.php?bid=654</comments>
<guid isPermaLink="true">https://www.schweda.net/blog_ax.php?bid=654</guid>
<author>heinz.schweda@schweda.net (Heinz Schweda)</author>
<wfw:commentRss>https://www.schweda.net/blog_ax.php?bid=654</wfw:commentRss>
</item>
<item>
<title>Kommentar von Magnus Bjelksjö</title>
<description><![CDATA[Hi!

We have a scenario where we by code create mutiple batch tasks at runtime.

- We have a "main"-task that in each batch run gathers data to be processed.
- The case is that we want to have one batchtask per a ProjectId.

But after the batch is finished all the individual ProjectId-tasks are still there in the batch job.

The next time the "main"-task is fired there should be no batch tasks in the batchjob. Because there should be a new set of ProjectId-batchtasks created based on what data that exist in the database.

The same batchjob is used over and over again due to a scheduled recurrency.

What is the proper way to "clean up" the batch task list before the new batchrun occur?]]></description>
<category>Microsoft Dynamics AX (Axapta)</category>
<pubDate>Mon, 17 Jan 2022 10:05:00 +0100</pubDate>
<link>https://www.schweda.net/blog_ax.php?bid=654</link>
<guid isPermaLink="true">https://www.schweda.net/blog_ax.php?bid=654</guid>
<author>Magnus Bjelksjö</author>
<dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Heinz Schweda</dc:creator>
<wfw:commentRss>https://www.schweda.net/blog_ax.php?bid=654</wfw:commentRss>
</item>
<item>
<title>Kommentar von Magnus Bjelksjö</title>
<description><![CDATA[Hi!

We have a scenario where we by code create mutiple batch tasks at runtime.

- We have a "main"-task that in each batch run gathers data to be processed.
- The case is that we want to have one batchtask per a ProjectId.

But after the batch is finished all the individual ProjectId-tasks are still there in the batch job.

The next time the "main"-task is fired there should be no batch tasks in the batchjob. Because there should be a new set of ProjectId-batchtasks created based on what data that exist in the database.

The same batchjob is used over and over again due to a scheduled recurrency.

What is the proper way to "clean up" the batch task list before the new batchrun occur?]]></description>
<category></category>
<pubDate>Mon, 17 Jan 2022 10:06:00 +0100</pubDate>
<link>https://www.schweda.net/blog.php?bid=654</link>
<guid isPermaLink="true">https://www.schweda.net/blog.php?bid=654</guid>
<author>Magnus Bjelksjö</author>
<dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Heinz Schweda</dc:creator>
<wfw:commentRss>https://www.schweda.net/blog.php?bid=654</wfw:commentRss>
</item>
<item>
<title>Kommentar von Keyur</title>
<description><![CDATA[@Magnus

You should use the batchHeader.addRunTimeTask method for your requirement.]]></description>
<category></category>
<pubDate>Fri, 21 Jan 2022 00:57:00 +0100</pubDate>
<link>https://www.schweda.net/blog.php?bid=654</link>
<guid isPermaLink="true">https://www.schweda.net/blog.php?bid=654</guid>
<author>Keyur</author>
<dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Heinz Schweda</dc:creator>
<wfw:commentRss>https://www.schweda.net/blog.php?bid=654</wfw:commentRss>
</item>
</channel>
</rss>	
