<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Joost Landgraf on Medium]]></title>
        <description><![CDATA[Stories by Joost Landgraf on Medium]]></description>
        <link>https://medium.com/@landgraf23?source=rss-ee41caa7a672------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*aToTRQ5_T2MVejCq.jpg</url>
            <title>Stories by Joost Landgraf on Medium</title>
            <link>https://medium.com/@landgraf23?source=rss-ee41caa7a672------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 08:13:32 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@landgraf23/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The Call Chain Anti-Pattern: What it is, why it happens, and how to fix it]]></title>
            <link>https://medium.com/@landgraf23/the-call-chain-anti-pattern-what-it-is-why-it-happens-and-how-to-fix-it-120ead57ff09?source=rss-ee41caa7a672------2</link>
            <guid isPermaLink="false">https://medium.com/p/120ead57ff09</guid>
            <category><![CDATA[outsystems]]></category>
            <category><![CDATA[software-design-patterns]]></category>
            <dc:creator><![CDATA[Joost Landgraf]]></dc:creator>
            <pubDate>Thu, 19 Mar 2026 06:29:17 GMT</pubDate>
            <atom:updated>2026-03-19T06:29:17.683Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c8fV_MkaurIPN_Pyop-46Q.png" /></figure><p>OutSystems accelerates development, but speed can sometimes mask architectural issues when applications evolve organically. One of the most common issues that appears in OutSystems logic flows — especially in larger apps — is the <strong>Call Chain Anti-Pattern</strong>.</p><p>This anti-pattern emerges when multiple client actions, server actions, or service actions call each other in long sequences, creating workflows that are hard to see, hard to maintain, and extremely fragile.</p><p>This article explains the anti-pattern specifically in the context of <strong>OutSystems</strong>, why it happens, how it impacts maintainability and performance, and how to fix it using a proper <strong>orchestration pattern</strong>.</p><p>When Outsystems is mentioned, it’s mainly about O11, but the same issues can happen in ODC, only on an Application level, because we do not have multiple modules in one application.</p><h3>1. What is the Call Chain Anti-Pattern in OutSystems?</h3><p>In OutSystems, the call chain anti-pattern happens when one action calls another, which calls another, and so on, often across multiple modules.<br> For example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gPJIAut7ZLwNK9cnXW2eQA.png" /><figcaption>Artificial example in OutSystems</figcaption></figure><p>Because OutSystems makes it easy to call actions from anywhere, developers often allow chains to grow naturally. Over time, logic becomes fragmented across modules with <strong>no single place to see the full flow</strong>.</p><h3>Typical symptoms in OutSystems:</h3><ul><li>Server actions calling other server actions in deep chains</li><li>Client actions triggering multiple server-side flows indirectly</li><li>Server actions calling service actions calling server actions calling service actions.</li><li>Complex logic distributed across several modules</li><li>Side-effects hidden behind actions that “just call another thing”</li></ul><p>Ultimately, the workflow becomes <em>implicit</em> instead of explicit.</p><h3>2. Why this anti-pattern emerges in OutSystems</h3><p>OutSystems encourages reuse and modularity, but without structure, that same flexibility encourages hidden coupling. Here are the main reasons the call chain anti-pattern appears in OutSystems applications.</p><h4>Reason 1: Fast, Iterative Development Without Architectural Boundaries</h4><p>OutSystems teams deliver quickly. It’s natural to add one more call inside an existing action:</p><ul><li>“I’ll call this other module’s action — seems easier.”</li><li>“We just need to call one more step afterward.”</li></ul><p>These incremental steps accumulate over months and years, forming long invisible chains.</p><h4>Reason 2: No Central “Workflow Owner”</h4><p>OutSystems does not enforce a single location for process orchestration.</p><ul><li>Actions call other actions.</li><li>Logic nodes do work <em>and</em> coordinate workflow.</li><li>Modules do not have strict separation of concerns.</li></ul><p>So each action becomes responsible for “calling the next thing,” scattering the workflow.</p><h4>Reason 3: Misuse of Application / Integration Layers</h4><p>Many OutSystems teams place logic in the wrong layer:</p><ul><li>Integration modules calling business modules</li><li>Business modules calling UI modules</li><li>Core modules calling domain modules indirectly</li></ul><p>This leads to <strong>implicit workflows spanning layers</strong>, with no clear architecture.</p><h3>3. Why the Call Chain Anti-Pattern Is Harmful in OutSystems</h3><p>Even though everything might “work,” the system becomes significantly harder to maintain.</p><h4>1. The Workflow Becomes Invisible</h4><p>In Service Studio, you cannot see the entire workflow on a single action flow. Instead, you must jump between modules and drill into dozens of actions to understand what happens.</p><p>You lose:</p><ul><li>Transparency</li><li>Predictability</li><li>Developer confidence</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0sNzff1h8DCKpm3fWk-cMw.jpeg" /></figure><h4>2. Testing Becomes Painful</h4><p>Unit-level tests (“Action Tests” or <strong>BDDFramework</strong> tests) require extensive mocking because calling one action triggers an entire chain.</p><p>It becomes impossible to test:</p><ul><li>Individual logic units</li><li>Side-effect-free functions</li><li>Reusable business rules</li></ul><h4>3. Changes Become Dangerous</h4><p>Adding or removing a step may require changes across multiple modules.</p><p>In OutSystems this often results in:</p><ul><li>Broken references</li><li>Outdated/Incompatible consumers</li><li>Outdated producers</li><li>Unexpected logic execution in unrelated modules</li><li>Increased Deployments</li></ul><p>This slows down delivery and increases the risk of regressions.</p><h4>4. Error Handling Is Scattered</h4><p>Because the workflow is distributed across modules, each action handles errors differently:</p><ul><li>Some actions use exception handlers</li><li>Some rely on Return Codes</li><li>Some rely on Boolean outputs</li><li>Some don’t handle errors at all</li></ul><p>You end up with inconsistent error behaviour and unpredictable failures.</p><h4>5. Performance Impact</h4><p>Because the chains are becoming larger, you have no overview how many aggregates, how many service actions etc are being called and especially if they are doing almost the same thing</p><p>Long chains increase:</p><ul><li>Application latency</li><li>Database round trips</li><li>CPU usage on the platform server</li></ul><p>This is especially problematic in mobile apps where client/server action chains are expensive.</p><h3>4. A Visual Summary of the Problem</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_2LYhoMgikbx7Y6ERtYEMA.jpeg" /></figure><p>This is what the system becomes:<br> A web of invisible dependencies between modules and actions, impossible to visualize in Service Studio and extremely fragile over time.</p><h3>5. The Solution: Orchestration Pattern (The OutSystems Version)</h3><p>Instead of letting actions call each other freely, move workflow responsibility into a <strong>single orchestrator action</strong>.</p><h4>Before (Call Chain)</h4><pre>A calls B  <br>B calls C  <br>C calls D</pre><h4>After (Orchestration)</h4><pre>Orchestrator action:<br>    Run A<br>    Run B<br>    Run C<br>    Run D</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vmx2FGpl3x-wwPLtDnpo-A.jpeg" /></figure><p>In OutSystems, this orchestrator can be:</p><ul><li>A <strong>Server Action</strong> inside a business module</li><li>A <strong>Business Process</strong> (when long-running)</li><li>A <strong>Process Action</strong></li><li>A <strong>Client Action orchestrating server steps</strong></li><li>A <strong>Logic-orchestrating API endpoint</strong></li></ul><h3>6. How Orchestration Improves OutSystems Architecture</h3><h3>✔ Centralized Workflow</h3><p>One action shows the entire process.<br> Easy to read. Easy to maintain.</p><h3>✔ Clear Responsibility Split</h3><ul><li>Steps = do work</li><li>Orchestrator = directs workflow</li></ul><p>OutSystems encourages logic abstraction, so this aligns well with platform best practices.</p><h3>✔ Better Testability</h3><p>Each step becomes independently testable.</p><h3>✔ Safer Refactoring</h3><p>Changing sequence or adding steps happens in <em>one place</em>.</p><h3>✔ Consistent Error Handling</h3><p>The orchestrator defines:</p><ul><li>Retries</li><li>Exception behaviour</li><li>Logging</li><li>Compensation logic</li></ul><h3>Conclusion</h3><p>The Call Chain Anti-Pattern appears frequently in OutSystems applications because the platform makes it so easy to call actions across modules. But as chains grow, systems become hard to understand, maintain, and evolve.</p><p>The remedy is straightforward:</p><blockquote><strong><em>Use an explicit Orchestration Pattern.<br> Keep actions focused on work, and orchestrators focused on workflow.</em></strong></blockquote><p>This gives you systems that are more maintainable, testable, performant, and aligned with OutSystems architecture best practices.</p><h3>But</h3><p>It’s not always the solution. Always think before you code, think before you architecture your application. Use tools to visualize your architecture.</p><p><strong>“The sooner you start coding, the later you finish.”</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=120ead57ff09" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Designing a calendar table]]></title>
            <link>https://medium.com/@landgraf23/designing-a-calendar-table-c7e67cd76006?source=rss-ee41caa7a672------2</link>
            <guid isPermaLink="false">https://medium.com/p/c7e67cd76006</guid>
            <category><![CDATA[outsystems]]></category>
            <category><![CDATA[calendar]]></category>
            <category><![CDATA[calendar-table]]></category>
            <dc:creator><![CDATA[Joost Landgraf]]></dc:creator>
            <pubDate>Fri, 01 Apr 2022 12:02:42 GMT</pubDate>
            <atom:updated>2022-04-01T12:08:10.777Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/697/1*lH447Q8VN4oAJrP1Baykcg.png" /></figure><p>There are things in life you are doing over and over without realizing it could be automated in a better way. This is such a thing. Did you ever needed to create a list of dates in OutSystems? Did you end up making while-loop in OutSystems to build such a list or not? And for that list, did you want to find out which are workdays and which are the weekend. All these kind of inquiries are pretty common for reporting, overviews and more. We can improve this :)</p><h3>Introducing the Calendar Table</h3><p>A calendar table is a permanent table of dates with all their extra meta-data of that specific date. This could be simple things as a DatePart of that date or more interesting stuff like if it’s part of a weekend or not.</p><p>You may think, this is a bit redundant and could be calculated at runtime, but as systems grow more complex this can be an easy solution to be referenced. There are more advantages with this solution.</p><ul><li>It’s pretty easy to generate and you only need to generate it once. It can be used as a service component in all your applications.</li><li>It requires almost no maintenance</li><li>We can always add more specific metrics</li><li>It does not take much space at all, so it’s always performant</li><li>One can add holidays if required</li><li>Using one table also promotes consistency over the applications</li><li>Since we already did the DatePart calculations, reporting should be simpler and faster</li></ul><h3>Implementing the Calendar Table</h3><p>Since we have established the need for it we are going to implement it in OutSystems. What I will show you is what I think are the basic metrics you might need for the dates, but like I have previously said, it could easily be extended to more metrics or even holidays.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/795/1*MvcIzm2zn5opMpJXOj7zBg.png" /><figcaption>ERD</figcaption></figure><p>The ERD is pretty straight-forward, we have a date and all other metrics. I will not go into the detail of all those metrics, but I assume the names will be obvious enough to understand them. I did added 2 static entities for the Day of week and the Month, so we can translate them if needed (you can always use the formatDateTime of OutSystems)</p><p>In the module there are two service actions which will add a year or remove a year from the table. Removing should not be used often, but adding a year is up to you of course. When adding a year it’s a pretty straight forward sql that will calculate each attribute and eventually it will be inserted/updated in the database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/536/1*WMjqusiYOFme0SEkLfwdOQ.png" /><figcaption>The Core</figcaption></figure><p>As you can see it’s not rocketscience and easy to maintain. The SQL however is a bit more advanced but nothing shocking as well</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/502/1*RAAgNjDbADqe27D4tcpD9g.png" /><figcaption>First part</figcaption></figure><p>Here is the magic where we start building up the list of dates and extracting the dateparts and other metrics. In the other CTE’s the other attributes are being calculated. For example if the year is a leapyear etc.<br>So there we have it. The end result looks like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WrWdtzDW6Z1CyV3qzYyNGQ.png" /></figure><p>The Calendar Table is in the forge to be downloaded and used by you. <a href="https://www.outsystems.com/forge/component-overview/12664/calendartable">https://www.outsystems.com/forge/component-overview/12664/calendartable</a></p><p>If you need more metrics which can be used for everyone, please let me know and I will add them accordingly. If you have questions, remarks ask them here or at the support tab of the component.</p><p>Be lazy and happy coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c7e67cd76006" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Walking Zombie]]></title>
            <link>https://medium.com/@landgraf23/the-walking-zombie-3f9fbe7459ad?source=rss-ee41caa7a672------2</link>
            <guid isPermaLink="false">https://medium.com/p/3f9fbe7459ad</guid>
            <category><![CDATA[outsystems]]></category>
            <category><![CDATA[brain-execrise]]></category>
            <category><![CDATA[process]]></category>
            <category><![CDATA[quality]]></category>
            <category><![CDATA[ptb]]></category>
            <dc:creator><![CDATA[Joost Landgraf]]></dc:creator>
            <pubDate>Fri, 04 Feb 2022 12:14:09 GMT</pubDate>
            <atom:updated>2022-02-04T12:14:09.911Z</atom:updated>
            <content:encoded><![CDATA[<p>What happens when you delete a record in OutSystems that is related to an active instance of a BPT process? If you do not know or you are curious, this article is for you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*uAD5EJT594UNX-iJ.jpg" /></figure><p>OutSystems is a low-code platform that increases your productivity and laziness when developing a good application. There are tons of best practices around and this is one of them. I will enlighten you with a use-case that may be applicable to your environments. In any case, it was a fun experiment for me :)</p><h3><strong>What if…</strong></h3><p>I delete a record that is still related to an active BPT process?</p><p>BPT processes are a great asset to the OutSystems EcoSystems. Whenever a record is created, a process is triggered and activated.</p><p>While I was creating and testing my BPT process, I made a mistake, like any normal human being. So I terminated the process and made the code more robust. Still I began to wonder: what would happen if I were to delete the record, without terminating the process first? After investigating the BPT process itself, I noticed there were only triggers on update actions, not on delete actions.</p><p>Since this was an experiment I simply deleted the record and monitored what happened next. The result was actually not that surprising: nothing happened. The BPT process was still active and running like before.</p><p>So now we have a challenge. What happens if the BPT process gets a push to continue? Will it crash? Will it silently stop? Is my code maybe not robust enough and will it endlessly wait for a proper update?</p><p>These scenarios need to be prevented. However, we do not know when a record is deleted. One possible solution could be to use soft deletes, but that is an agreement between developers. You cannot enforce that rule or prevent a hard delete from happening via the backdoor of the database itself.</p><h3><strong>Find them</strong></h3><p>Even if you decide to improve and strengthen your code, you still have an odd chance to run into this issue, due to external factors, such as DBAs cleaning the database or legacy code, created when requirements were not so strict.</p><p>That means our systems could contain active or suspended processes that are waiting to continue, even though the related records have already been deleted from the database. This brings us to the following question: how do we find these walking zombies?</p><p>A deep dive into the meta-model of OutSystems has provided us with two queries that will allow us to find those BPT processes that need to be terminated because of missing records.</p><p><strong>Disclaimer:</strong> <em>These queries are from a PoC. They are using internal tables from OutSystems, so they might be incorrect in your case and I definitely did not test it in Oracle.</em></p><p>The first one is rather easy. We need to get the entities which have the attribute Expose_Process_Events set to true. Of course you can alter this query to suit your needs. In this particular case, I was interested in all entities.</p><p>Per entity we will need an advanced SQL, because we are digging slightly deeper into the meta-model of OutSystems. So, there is a for-loop, but with reason ;)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*L_1DiArZ4VFKo0PyBAdlbA.png" /><figcaption>Query1: GetEntitiesWithExposedProcessEvents</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/434/1*bJsr3o0Kv2FFAAC9AvI-3Q.png" /><figcaption>Query1: GetEntitiesWithExposedProcessEvents</figcaption></figure><p>This query is slightly more advanced, but you can see what is happening here. The essential element is the Left Join that links the process to the actual entity and its PK in order to check if the relation still exists.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c_ONJI0LIpdNBZ65N02CvQ.png" /><figcaption>Query2 — GetZombiesProcesses</figcaption></figure><p>The input parameters are as follows:</p><p><strong>ProcessStatusId_active</strong> and <strong>ProcessStatusId_suspended</strong> are the actual processStatusId’s for Active, Suspended. We are not that interested in the others. <strong>rtTableName</strong> and <strong>rtTableName_Exp</strong> is the actual name of the table i.e. ‘OSUSR_BGH_YOURENTITY’, only with OS removed to fool the advanced SQL. The <strong>rtTablePK</strong> is the primary key of that table with “t1.” prefixed. This way we have a working SQL.</p><p>The end result is something like this or even better: no walking zombies at all :D It’s up to you how you deal with these zombies. Zap them manually or do it automatically.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YfbpQcyF6Xy3SMaIJC8pBA.png" /></figure><h3><strong>Summary</strong></h3><p>First of all, I do hope everything is fine in your OS environments, so this will not be relevant to you. But in case it is, these queries might prove useful and help you improve your environments.</p><p>If you have a better query, solution or other feedback, please let me know!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3f9fbe7459ad" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>