<?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 Raphael Ranieri on Medium]]></title>
        <description><![CDATA[Stories by Raphael Ranieri on Medium]]></description>
        <link>https://medium.com/@raphael-ranieri?source=rss-1bf90dabdcea------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Q_6VTj3BlBvYIEA-RTYxMA.png</url>
            <title>Stories by Raphael Ranieri on Medium</title>
            <link>https://medium.com/@raphael-ranieri?source=rss-1bf90dabdcea------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 16:17:15 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@raphael-ranieri/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[Running Local LLMs with OutSystems: A Practical Guide for Building Private, Flexible AI-Powered…]]></title>
            <link>https://raphael-ranieri.medium.com/running-local-llms-with-outsystems-a-practical-guide-for-building-private-flexible-ai-powered-0b91625bf6f0?source=rss-1bf90dabdcea------2</link>
            <guid isPermaLink="false">https://medium.com/p/0b91625bf6f0</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[ollama]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[outsystems]]></category>
            <category><![CDATA[local-llm]]></category>
            <dc:creator><![CDATA[Raphael Ranieri]]></dc:creator>
            <pubDate>Thu, 18 Jun 2026 10:08:08 GMT</pubDate>
            <atom:updated>2026-06-18T21:53:25.388Z</atom:updated>
            <content:encoded><![CDATA[<h3>Running Local LLMs with OutSystems: A Practical Guide for Building Private, Flexible AI-Powered Apps</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*__-aLsbwQPselCKbfTPEag.png" /></figure><p>Large Language Models have become part of the normal development workflow. We use ChatGPT, Claude, GitHub Copilot, Amazon Bedrock, Azure OpenAI, and other hosted AI services to write code, summarize documents, generate tests, classify text, and build AI-powered business applications.</p><p>For most teams, hosted models are the easiest place to start. They are powerful, fast, scalable, and available with almost no infrastructure setup. But they also introduce trade-offs: data leaves your environment, cost grows with usage, model behavior can change when the provider updates the model, and your application depends on a third-party AI service being available.</p><p><strong>Local LLMs give us another option.</strong></p><p>Instead of sending requests to an external AI provider, we run the model ourselves on our own machine, server, VM, or controlled infrastructure. This changes the architecture, the cost model, the security model, and the performance profile.</p><p>It also changes how we think about model selection. In many real-world applications, the best answer is not always to use the biggest generic model available. A smaller model optimized for a specific activity, such as classification, summarization, extraction, coding assistance, or document analysis, can be faster, cheaper, easier to control, and more successful for that specific task.</p><p>This article explains how local LLMs work, how to configure models with Ollama, and how to connect a locally hosted model to ODC applications.</p><p>The goal is not to claim that local LLMs are always better. They are not. The goal is to understand when they are useful, how to integrate them properly, and how to avoid treating a demo architecture as a production architecture.</p><p>Before jumping into the implementation, we need to understand the architectural difference between a hosted LLM and a local LLM.</p><p>Most developers are already familiar with the hosted model approach. This is the architecture behind tools like ChatGPT, Claude, Gemini, GitHub Copilot, Claude Code, and many AI features exposed through cloud providers.</p><h3>Hosted LLM architecture</h3><p>In a hosted LLM architecture, the model does not run inside your application.</p><p>A user interacts with a UI, agent, developer tool, or business application. That client sends a request to an external AI provider such as OpenAI, Anthropic, Azure OpenAI, Amazon Bedrock, Google, or another managed platform. The provider runs the model in its own infrastructure and returns the generated response.</p><p>The architecture usually looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L-z-tkt4mwFGNVRRuXyWhA.png" /></figure><p>The important point is that the UI and the model are separate things.</p><p>When you use ChatGPT, Claude Code, Copilot, or an AI feature inside another product, you are usually interacting with a client interface. The actual model runs somewhere else, usually inside the provider’s data center. Your prompt, context, files, code snippets, or application data are sent to that provider, processed by the model, and then returned as a response.</p><p>That model is convenient because there is almost no infrastructure to manage. You get access to powerful models immediately, the provider handles scaling, and you can start building quickly.</p><p>But this convenience comes with trade-offs:</p><ul><li>Your data leaves your environment</li><li>You pay through subscriptions, token usage, or platform consumption</li><li>Your application depends on the provider’s availability</li><li>You have limited control over model behavior and updates</li><li>Model changes can affect consistency between releases</li></ul><h3>Local LLM architecture</h3><p>Local LLMs change this architecture completely.</p><p>Instead of sending every prompt to an external provider, the model runs on infrastructure you control.</p><p>In the simplest setup, that infrastructure is your own computer.</p><p>The architecture looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V3XSfPo_6bXLrRxOsruyzw.png" /></figure><p>In this local architecture, the model runs on infrastructure we control instead of inside a provider’s data center.</p><p>For this example, I am using Ollama to run the model locally.</p><p>Ollama is simply the runtime that loads the downloaded model and makes it available to other tools on the machine.</p><p>The user can still interact through familiar interfaces, such as Claude Code, Codex-style tools, Open WebUI, the Ollama terminal interface, or a custom application. The difference is where the request goes.</p><p>Instead of sending the prompt to a hosted AI provider, the client sends the request to the local runtime. The runtime then passes it to the model running on your machine, VM, or internal server.</p><p>The important distinction is this:</p><p>The UI is not the model.</p><p>Claude Code, Codex-style tools, chat interfaces, and custom applications are clients. They provide the interaction layer. The local runtime executes the model. The downloaded LLM provides the actual intelligence.</p><p>With this architecture, your machine becomes the inference environment. CPU, GPU, RAM, and VRAM directly affect the quality and speed of the experience. If the model is small and optimized, responses can feel fast. If the model is large or loaded on insufficient hardware, responses can be slow, sometimes painfully slow.</p><p>This is the main trade-off with local LLMs: you gain control, but you also inherit the infrastructure responsibility.</p><p>The advantages are clear:</p><ul><li>Your prompts and data can stay inside your own environment</li><li>You are not charged per token by an external model provider</li><li>You can experiment freely with different models</li><li>You can work offline once the model is downloaded</li><li>You control the model version being used</li><li>You reduce dependency on hosted AI providers</li></ul><p>But there are also disadvantages:</p><ul><li>You need capable hardware</li><li>Larger models may be too slow or impossible to run locally</li><li>Local models are usually weaker than the best hosted frontier models</li><li>Setup and maintenance become your responsibility</li><li>Performance depends heavily on model size and quantization</li><li>Scaling beyond one machine requires additional architecture</li></ul><p>This is why local LLMs should not be described as simply “better” or “worse” than hosted LLMs. They solve a different problem.</p><p>Hosted LLMs optimize for convenience, scale, and access to very strong models.</p><p>Local LLMs optimize for control, privacy, cost predictability, experimentation, and independence.</p><p>For OutSystems developers, this becomes especially interesting because OutSystems applications do not care whether the model is hosted by OpenAI, Azure, Amazon, Anthropic, or running locally behind an API.</p><p>What matters is whether the application can reach a compatible endpoint, send a request, receive a response, and safely use that response inside the business process.</p><p>Now that the difference between hosted and local LLMs is clear, we can move into the practical setup.</p><p>The goal is simple: run an LLM locally, expose it through an API, and then connect that API to OutSystems.</p><p>For this example, I will use Ollama because it gives us a fast way to download, run, and serve local models without manually configuring the full inference stack.</p><h3>Step 1: Install Ollama</h3><p>The first step is to install Ollama on the machine that will run the model.</p><p>Ollama is available for macOS, Linux, and Windows. You can download it from the official Ollama website:</p><pre>https://ollama.com/download</pre><p>After installation, Ollama runs as a local service on your machine. This is important because the model will not be called directly by OutSystems yet. First, the model needs to be available locally, and Ollama is what gives us that local runtime.</p><p>At this stage, the architecture is still simple:</p><pre>Your machine<br>  -&gt; Ollama<br>  -&gt; Local model</pre><p>Nothing is connected to OutSystems yet. We are only preparing the local LLM environment.</p><h3>Step 2: Choose and install a model</h3><p>After Ollama is installed, the next step is choosing which model you want to run locally.</p><p>You can browse the available models in the Ollama model library:</p><pre>https://ollama.com/search</pre><p>For the first test, I recommend starting with a smaller model. Smaller models are easier to download, faster to load, and more likely to run well on normal developer hardware.</p><p>Later in another article, we will look at how to choose the right model for each use case, including model size, training type, and quantization. For now, the goal is only to get a local model running.</p><p>For this example, I will use <a href="https://ollama.com/qcwind/qwen3-8b-instruct-Q4-K-M">this</a> model:</p><pre>qwen3:8b-instruct-q4_K_M</pre><p>This model name already tells us a few important things:</p><pre>qwen3        -&gt; model family<br>8b           -&gt; model size, around 8 billion parameters<br>instruct     -&gt; trained to follow instructions<br>q4_K_M       -&gt; quantized version optimized for local execution</pre><p>Do not worry if these terms are not fully clear yet. We will break them down later. At this stage, the important point is that this is a relatively practical model for a local test.</p><p>You can download the model using the command line:</p><pre>ollama pull qwen3:8b-instruct-q4_K_M</pre><p>This command downloads the model to your machine.</p><p>After the download finishes, you can run it with:</p><pre>ollama run qwen3:8b-instruct-q4_K_M</pre><p>At this point, you can interact with the model directly from the terminal.</p><p>For example, ask:</p><pre>Hello, who are you?</pre><p>If the model responds, the local runtime is working.</p><p>At this stage, we have not connected anything to OutSystems yet. We have only confirmed that the model can run locally on our machine. That is the foundation we need before exposing it through an API and using it from an OutSystems application.</p><h3>Step 3: Understand what is happening locally</h3><p>When you run this command:</p><pre>ollama run qwen3:8b-instruct-q4_K_M</pre><p>Ollama loads the model and performs inference on your machine.</p><p>That means your local hardware is doing the work. Your CPU, GPU, RAM, and VRAM directly affect the speed of the response. A small optimized model can respond quickly. A larger model can be much slower, especially if your machine does not have enough GPU memory.</p><p>This is one of the most important differences from hosted LLMs.</p><p>With hosted models, the provider owns the infrastructure.</p><p>With local models, you own the infrastructure.</p><p>That gives you more control, but it also means performance is now your responsibility.</p><h3>Step 4: Use the model from another interface</h3><p>The terminal is useful for testing, but it is not the only way to interact with the model.</p><p>Once the model is running locally, other tools can connect to it. For example:</p><ul><li>Ollama’s own interface</li><li>Open WebUI</li><li>Claude Code-style developer tools</li><li>Codex-style tools</li><li>Custom applications</li><li>REST clients</li><li>Backend services</li></ul><p>This is where the architecture starts to become more useful.</p><p>The user does not need to interact with the model directly. A UI, tool, or application can send requests to the local runtime, and the runtime sends those requests to the model.</p><p>Conceptually, the flow becomes:</p><pre>User<br>  -&gt; UI or application<br>  -&gt; Ollama local runtime<br>  -&gt; Local model<br>  -&gt; Response</pre><p>This is the same idea we will later use with OutSystems. The OutSystems application does not need to know how the model is loaded into memory. It only needs to call an API.</p><h3>Step 5: Confirm the local API</h3><p>Ollama exposes a local HTTP API that tools on the same machine can call.</p><p>If you want other machines on the network to reach it, you need to enable network access or configure the host binding.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*61EO10WXB3gCP9-h3pGEkw.png" /></figure><p>The common local address is:</p><pre>http://localhost:11434</pre><p>This means that tools running on the same machine can send HTTP requests to Ollama.</p><p>For example, Ollama’s native API can be called through endpoints under this local server.</p><p>A simple local test can be done with:</p><pre>curl http://localhost:11434/api/tags</pre><p>This returns the models currently available in your local Ollama environment.</p><p>If this works, it means Ollama is running and exposing its local API correctly.</p><h3>Step 6: Enable access from the network</h3><p>By default, a local service is usually only accessible from the same machine.</p><p>That is fine when you are using the terminal or a local UI, but it is not enough when another system needs to call the model.</p><p>This matters for OutSystems.</p><p>An OutSystems application running in ODC is not running on your laptop. It runs in the OutSystems cloud environment. So, from the OutSystems application’s perspective, this address will not work:</p><pre>http://localhost:11434</pre><p>Why?</p><p>Because localhost would refer to the OutSystems runtime environment, not your computer.</p><p>To allow another system to call your local model, you need to expose the Ollama API through a reachable address.</p><p><strong>For local development and demos, this can be done with a reverse proxy or tunnel such as ngrok. For production, this should be done through a controlled API gateway, private network, VPN, or internal reverse proxy.</strong></p><p><strong>We will cover that part later, but before exposing anything externally, there is one more important detail.</strong></p><h3>Step 7: Use the OpenAI-compatible API</h3><p>Ollama can expose endpoints compatible with parts of the OpenAI API.</p><p>This is extremely useful because many AI tools and platforms already know how to talk to OpenAI-style APIs. Instead of building a completely custom integration, you can often configure the local model as if it were an OpenAI-compatible model endpoint.</p><p>The common OpenAI-compatible base URL is:</p><pre>http://localhost:11434/v1</pre><p>For chat completions, the endpoint is:</p><pre>POST http://localhost:11434/v1/chat/completions</pre><p>A request looks similar to this:</p><pre>{<br>  &quot;model&quot;: &quot;qwen3:8b-instruct-q4_K_M&quot;,<br>  &quot;messages&quot;: [<br>    {<br>      &quot;role&quot;: &quot;system&quot;,<br>      &quot;content&quot;: &quot;You are a practical technical assistant.&quot;<br>    },<br>    {<br>      &quot;role&quot;: &quot;user&quot;,<br>      &quot;content&quot;: &quot;Explain what a local LLM is in one paragraph.&quot;<br>    }<br>  ],<br>  &quot;temperature&quot;: 0.2<br>}</pre><p>This compatibility is the bridge that makes the OutSystems integration much simpler.</p><p>OutSystems expects AI models to be exposed through provider-style APIs. In ODC, you can configure AI models from supported providers, and for private or custom models, you can connect to a custom endpoint.</p><p>Luckily for us, Ollama can expose the local model through an OpenAI-compatible API shape.</p><p>That means the local model can be treated less like a special local experiment and more like a private AI endpoint that OutSystems can call.</p><p>The full development flow becomes:</p><pre>Install Ollama<br>  -&gt; Download a model<br>  -&gt; Run the model locally<br>  -&gt; Confirm the local API<br>  -&gt; Enable network access<br>  -&gt; Use the OpenAI-compatible endpoint<br>  -&gt; Configure it in OutSystems</pre><p>At this point, the local model is no longer just something we can use from the terminal. It becomes an API-backed model that can be integrated into an OutSystems application.</p><p>At this point, we have the local architecture working.</p><p>The model is installed on our machine, Ollama can run it locally, and we can interact with it using the terminal or another local interface.</p><p>The current architecture looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V3XSfPo_6bXLrRxOsruyzw.png" /></figure><p>This works well when the user and the model are on the same machine. But this is not enough for an OutSystems application.</p><p>An OutSystems app running in ODC does not run on your laptop. It runs on the OutSystems cloud runtime. That means it cannot call your local machine using:</p><pre>http://localhost:11434</pre><p>From the OutSystems server’s perspective, localhost means the OutSystems runtime itself, not your computer.</p><p>So if we want an OutSystems application to call our local model, we need to expose the local Ollama API through a URL that the OutSystems server can reach.</p><p>For a demo or development environment, one simple way to do this is with a reverse proxy tunnel such as ngrok.</p><p>The architecture then becomes:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HZILmcNrRXAiJEHHPoh4CA.png" /></figure><p>In this setup, ngrok creates a public HTTPS endpoint and forwards requests to Ollama running locally on our machine.</p><p>The flow becomes:</p><pre>User<br>  -&gt; OutSystems app in the browser<br>  -&gt; OutSystems server runtime<br>  -&gt; ngrok public HTTPS endpoint<br>  -&gt; Ollama running locally<br>  -&gt; Local LLM model</pre><p>This gives OutSystems a reachable API endpoint while still allowing the model itself to run on infrastructure we control.</p><p>For this example, that infrastructure can be your own computer. In a more realistic enterprise setup, it could be a cloud VM, an internal server, or a machine inside your company network.</p><p>The important concept is the same: OutSystems does not need to know that the model is running locally. It only needs a reachable API endpoint that follows the expected contract.</p><p>Before we configure OutSystems, let’s expose the local Ollama API using ngrok.</p><h3>Step 8: Expose the local API with ngrok</h3><p>ngrok is a tunneling tool that can expose a local service through a public HTTPS URL.</p><p>In our case, Ollama is running locally on port 11434, so we need ngrok to forward external traffic to that port.</p><p>You can download ngrok from the official website:</p><pre>https://ngrok.com/download</pre><p>After installing ngrok and signing in, you can start a tunnel in the CLI with:</p><blockquote>This is acceptable for a demo, but do not expose an LLM endpoint publicly without authentication and proper controls.</blockquote><pre>ngrok http 11434</pre><p>This creates a public HTTPS URL that forwards traffic to:</p><pre>http://localhost:11434</pre><p>However, exposing an LLM endpoint without protection is a bad idea, even for a demo.</p><p>At minimum, add basic authentication.</p><p>For example:</p><pre>ngrok http 11434 --basic-auth=&quot;User:Pass&quot; --host-header=&quot;localhost:11434&quot;</pre><p>Breaking it down for better clarity we have:</p><pre>ngrok http 11434</pre><p>exposes the local Ollama server.</p><pre>--basic-auth=&quot;User:Pass&quot;</pre><p>adds basic authentication to the public endpoint.</p><pre>--host-header=&quot;localhost:11434&quot;</pre><p>ensures the forwarded request uses the expected local host header.</p><p>After running the command, ngrok will display a forwarding URL similar to:</p><pre>https://abc123.ngrok-free.app</pre><p>This URL now points to your local Ollama server.</p><p>So the local address:</p><pre>http://localhost:11434</pre><p>becomes reachable externally through something like:</p><pre>https://abc123.ngrok-free.app</pre><p>This is the URL we can use from OutSystems.</p><h3>Step 9: Use the OpenAI-compatible endpoint</h3><p>Now we need one more detail.</p><p>OutSystems AI model configuration expects the model to be available through an API-style contract. Luckily, Ollama provides compatibility with parts of the OpenAI API, which means existing tools and platforms can connect to Ollama using OpenAI-style endpoints.</p><p>For Ollama, the OpenAI-compatible base path is:</p><pre>http://localhost:11434/v1</pre><p>After exposing Ollama through ngrok, that becomes:</p><pre>https://abc123.ngrok-free.app/v1</pre><p>The chat completions endpoint becomes:</p><pre>POST https://abc123.ngrok-free.app/v1/chat/completions</pre><p>This is the key part.</p><p>We are not asking OutSystems to understand Ollama specifically. We are exposing the local model through an API shape that is already familiar to AI platforms and tools.</p><p>Conceptually, OutSystems will call:</p><pre>https://abc123.ngrok-free.app/v1</pre><p>ngrok will forward the request to:</p><pre>http://localhost:11434/v1</pre><p>and Ollama will route the request to the selected local model.</p><p>The resulting architecture is:</p><pre>OutSystems<br>  -&gt; ngrok HTTPS endpoint<br>  -&gt; Ollama OpenAI-compatible API<br>  -&gt; Local model</pre><p>This is what makes the integration practical.</p><p>The local model is still running on infrastructure we control, but from the OutSystems side it behaves like a remote AI model endpoint.</p><h3>Step 10: Configure the local model in ODC</h3><p>At this point, the model is running locally, and ngrok is exposing the Ollama API through a public HTTPS endpoint.</p><p>Now we can configure that endpoint in OutSystems Developer Cloud.</p><p>In the ODC Portal, go to:</p><pre>Integrate -&gt; AI models</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/444/1*dbWzdzWCJurZAV2i1Bb-AQ.png" /></figure><p>Then add a new model endpoint.</p><p>The configuration should include:</p><pre>Name: Any name<br>Model ID: qwen3:8b-instruct-q4_K_M (Your model name)<br>URL: https://abc123.ngrok-free.app/v1 (Ngrok link)</pre><p>It will look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/781/1*Zpq2DJvTjHUD-3C9ta3CSQ.png" /></figure><p>The exact URL will be the forwarding URL generated by ngrok, followed by /v1.</p><p>For example, if ngrok gives you this URL:</p><pre>https://abc123.ngrok-free.app</pre><p>then the OpenAI-compatible base URL should be:</p><pre>https://abc123.ngrok-free.app/v1</pre><p>ODC will use this base URL and call the chat completions endpoint from there.</p><p>Conceptually, the request becomes:</p><pre>ODC<br>  -&gt; https://abc123.ngrok-free.app/v1/chat/completions<br>  -&gt; ngrok<br>  -&gt; http://localhost:11434/v1/chat/completions<br>  -&gt; Ollama<br>  -&gt; local model</pre><p>This is why the /v1 path matters. It points OutSystems to the OpenAI-compatible API exposed by Ollama.</p><h3>Configuring authentication</h3><p>If you exposed the endpoint with Basic Auth in ngrok, you also need to add an authorization header in ODC.</p><p>For example, if you started ngrok like this:</p><pre>ngrok http 11434 --basic-auth=&quot;User:Pass&quot; --host-header=&quot;localhost:11434&quot;</pre><p>then the credentials are:</p><pre>User:Pass</pre><p>Basic Auth expects those credentials to be encoded in Base64 and prefixed with Basic.</p><p>You can encode the value using a Base64 tool such as:</p><pre>https://www.base64encode.org/</pre><p>For example:</p><pre>User:Pass</pre><p>becomes something like:</p><pre>VXNlcjpQYXNz</pre><p>Then in the ODC model endpoint configuration, add this header:</p><pre>Header name: Authorization<br>Header value: Basic VXNlcjpQYXNz</pre><p>The final value must include the word Basic, followed by a space, followed by the Base64 encoded credentials.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/1*oJ-A3ITrz6Tuly2DUPDYyQ.png" /></figure><h3>Test the endpoint</h3><p>After entering the model name, model ID, URL, and authorization header, use the ODC test option to validate the endpoint.</p><p>If the test succeeds, the model is now available inside ODC.</p><p>From this point forward, you can reference it from your OutSystems ODC agents like any other configured AI model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/611/1*GV0CqvKAosthJssTou_2pQ.png" /></figure><p>That is the key benefit of exposing Ollama through an OpenAI-compatible API.</p><p>OutSystems does not need to know that the model is running on your computer, VM, or internal server. From the application side, it is just another model endpoint.</p><p>The development architecture is now:</p><pre>User<br>  -&gt; OutSystems app<br>  -&gt; ODC agent<br>  -&gt; configured AI model endpoint<br>  -&gt; ngrok<br>  -&gt; Ollama<br>  -&gt; local LLM</pre><p>For a demo or proof of concept, this is enough to prove the integration works.</p><p>For production, I would replace ngrok with a controlled network path, such as an API gateway, private endpoint, VPN, internal reverse proxy, or cloud-hosted inference service. The same concept still applies, but the endpoint should be secured and managed like any other enterprise integration.</p><p>Hopefully this helps you save a few tokens. 🙂</p><p>Happy coding.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0b91625bf6f0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How we used OutSystems in a Blockchain Hackathon!]]></title>
            <link>https://raphael-ranieri.medium.com/how-we-used-outsystems-in-a-blockchain-hackathon-4cc4adcd4fed?source=rss-1bf90dabdcea------2</link>
            <guid isPermaLink="false">https://medium.com/p/4cc4adcd4fed</guid>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[outsystems]]></category>
            <category><![CDATA[metamask]]></category>
            <dc:creator><![CDATA[Raphael Ranieri]]></dc:creator>
            <pubDate>Thu, 09 Jan 2025 01:53:52 GMT</pubDate>
            <atom:updated>2025-01-09T01:53:52.864Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vCm0wttrbT7VMBT6uA_GUg.png" /></figure><h3><strong>Introduction to blockchain</strong></h3><p>If you are someone who follows technology trends, works in the IT field, or even in the financial sector, you most likely have already heard the term ‘Blockchain.’</p><p>You might not know exactly what it is, but since it is a term commonly associated with cryptocurrencies like Bitcoin or Ethereum — hot topics nowadays — you must have heard it at least once during a conversation with geek investors or friends.</p><p>And in case you took some time to really understand it and also know OutSystems, you might be wondering:</p><p><em>“What the hell does it have in common with OutSystems?”</em></p><p>Well…<br>With OutSystems, a lot is possible!</p><p>But before we jump into the OutSystems + Blockchain realm and answer this question, let’s very briefly understand a little about what the term ‘Blockchain’ means.</p><p>If you Google it, you might find something like:</p><blockquote>A blockchain is a distributed database that maintains a continuously growing list of ordered records, called blocks. These blocks are linked using cryptography. Each block contains a cryptographic hash of the previous block, a timestamp, and transaction data. A blockchain is a decentralized, distributed, and public digital ledger that is used to record transactions across many computers so that the record cannot be altered retroactively without the alteration of all subsequent blocks and the consensus of the network.</blockquote><p>In simple terms, we could say that blockchain is a concept of a database maintained by people (or nodes) that stores transactions (or blocks) that always reference the previous block, forming a chain of blocks (aka Blockchain).</p><p>Since multiple people/nodes maintain this network, it is considered decentralized. And as each block is protected by cryptography and relies on these people to retrieve the information, it is considered very secure.</p><p>After all, you can’t change something yourself if everyone in the world knows the truth.</p><p>You can also have multiple blockchains. That’s why we have so many cryptocurrencies, such as Bitcoin, and they don’t impact each other because each one is a different blockchain.</p><p>I don’t want to delve too deeply into how blockchain itself works, as it is not the objective of this article, but if you are really interested in understanding it, I recommend this <a href="https://blockchaindemo.io/">link </a>or this <a href="https://blockchaindemo.org/">link</a>, which visually explain the interactions in a blockchain step by step.</p><p>Anyways, the best part about it is that, as blockchain is a ‘database,’ you can use it for multiple different use cases.</p><p>In the Bitcoin use case, which is to provide an alternative to physical currency, the blocks mentioned above contain information about the financial transactions made inside that network. But nothing stops you from creating different networks to be used for something else.</p><p>In fact, most blockchains have their own objectives.</p><p>Another famous one is Ethereum, which uses blockchain technology to maintain a decentralized payment network and seeks to become the foundation for Web 3, the infrastructure being built to decentralize the Internet.</p><p>Unlike Bitcoin, Ethereum is not only a currency; it is actually meant for more complex transactions that are enforced by what they call Smart Contracts.</p><p>Smart Contracts, in turn, are programming codes that are stored in the blockchain and serve as an agreement between two different parties. When triggered, the code is executed, and the transaction results are also stored in the blockchain, making it trackable and irreversible.</p><p>You can imagine how powerful this is: it’s a contract that can never be broken and that everyone can check at any time.</p><p>With this in mind, we decided to use OutSystems to integrate with them. So let’s see how it went!</p><h3><strong>Where the idea came from?</strong></h3><p>In the middle of 2024, <a href="https://www.linkedin.com/in/pgneto/"><strong>Pedro Neto</strong></a><strong>,</strong> a friend of mine and an OutSystems Champion, challenged me to participate in a Blockchain Hackathon with him.</p><p>This Hackathon was for ChainLink, a decentralized network that connects off-chain data to smart contracts on blockchains.</p><p>But honestly, we had no idea what to do at first.<br>Pedro had some experience in the crypto world but was no expert.<br>And I was starting from scratch, with little to no knowledge at all in the area — a complete rookie.</p><p>We started our discussions based on the little we knew and decided that doing something related to NFTs and games would be fun.</p><p>We defined our high-level objectives, had great technical ideas, researched what we would need, and started doing PoCs with OutSystems.</p><p>However, we quickly realized that we would need a good UI and art for our NFTs, so we also invited <a href="https://www.linkedin.com/in/robert-munoz/"><strong>Robert Muñoz</strong></a>, another friend of ours and a designer, to help with the process.</p><p>That’s how we started the development of our first OutSystems + Blockchain project, codename <a href="https://www.outsystems.com/forge/component-overview/18872/frankie-nft-maker-o11"><strong>Frankie</strong></a><strong>.</strong></p><h3><strong>Frankie — NFT Maker</strong></h3><p>Frankie was the codename for our first project. Our inspiration for the name came from <em>Frankenstein</em>, and you will understand why in a second.</p><p>Our main goal was to enable people to create their own Dynamic NFT Collections on the blockchain.</p><p>These collections can be used for any use case, such as games, art, etc.</p><p>As part of the app, you can define different traits or attributes your NFT should have. For example, an arm, a leg, a body, etc, ultimately forming a Frankenstein, hence the name.</p><p>Frankie was also the project that drove us to create some other Forge components related to Blockchain.</p><p>For example:</p><ul><li><a href="https://www.outsystems.com/forge/component-overview/20426/evm-smart-contracts-metamask-connector-o11"><strong>EVM Smart Contracts MetaMask Connector</strong></a>: A component to call methods from Smart Contracts on the client side, using MetaMask to sign your messages.</li><li><a href="https://www.outsystems.com/forge/component-overview/20425/nethereum-o11"><strong>Nethereum</strong></a>: A component to interact with Smart Contract methods by invoking them programmatically on the server side and programmatically deploy a smart contract to the blockchain.</li><li><a href="https://www.outsystems.com/forge/component-overview/20548/alchemy-api-services-o11"><strong>Alchemy API Services</strong></a>: A wrapper for Alchemy APIs for smart contracts and NFT operations on the Ethereum blockchain.</li></ul><p>Each of these components deserves its own article, so I will not dive into details here. Maybe, in the future, if time permits, we can expect new articles about them.</p><p>However, Frankie itself was already a huge learning opportunity — <br>not only with OutSystems by creating all these components, but also in different technologies, such as <strong>Solidity </strong>and <strong>MetaMask</strong>.</p><p>Solidity is the language we used to create the Smart Contracts. Once created, we could deploy them to the blockchain and use an OutSystems app to interact with it.</p><p>MetaMask is an Ethereum wallet that allows users to store and manage account keys (private keys that only you should have) and, in this way, interact with smart contracts, different apps and the Web3 through the browser. We will take a closer look at it in the next section.</p><p>It is important to note that we used a Test Net to develop our code, which is a test version of the main network. This was important because each transaction on the blockchain has a cost. In the Ethereum network, for instance, you have to pay ETH.</p><p>When using a Test Net, you don’t need to use real ETH, so you don’t spend your own money.</p><p>If you want to set up the app for your own use, you will probably need to configure all site properties to point to a specific test network and deploy the smart contracts there as well.</p><p>You can find the source code for the Smart Contracts on <a href="https://github.com/zingzongzung/Frankie">this </a>GitHub.</p><p>Also, check our submission link <a href="https://devpost.com/software/frankie">here</a> for the Hackathon for a more detailed view of the Smart Contract architecture, along with a cool video presenting it.</p><p>In fact, check out the video right away if you are interested:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F58rh1Npv65c%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D58rh1Npv65c&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F58rh1Npv65c%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/b4a5a7d7d95135c79dbd5c330b2b93cd/href">https://medium.com/media/b4a5a7d7d95135c79dbd5c330b2b93cd/href</a></iframe><h3>Smart Contract, Solidity, MetaMask, Web3, DApp? How to use them?</h3><p>So far, we have introduced many concepts that might be new to you.</p><p>To recap:</p><ul><li>A Smart Contract is code that is stored on the Ethereum blockchain and, when executed, also stores its result on the blockchain so it can always be checked.</li><li>Solidity is the programming language used to write those Smart Contracts.</li><li>MetaMask is a wallet that allows you to organize your accounts and use them securely to interact with the smart contracts.</li><li>Web3, also known as Web 3.0, is a vision for the next generation of the World Wide Web (WWW). It’s built on blockchain technology and other concepts, and aims to create a more decentralized, open, and user-centric internet.</li><li>A ‘dApp’, or decentralized application, is an application built on a decentralized network that typically consists of a smart contract backend and a user interface frontend.</li></ul><p>However, to make it clearer, let’s understand how they really interact with each other.</p><p>If we start with a Solidity Smart Contract to have an idea, this is how it looks:</p><pre>// SPDX-License-Identifier: GPL-3.0<br>pragma solidity &gt;=0.4.16 &lt;0.9.0;<br><br>contract SimpleStorage {<br>    uint storedData;<br><br>    function set(uint x) public {<br>        storedData = x;<br>    }<br><br>    function get() public view returns (uint) {<br>        return storedData;<br>    }<br>}</pre><p>You can notice that it looks very similar to a C# class, where you have attributes and methods.</p><p>If we want to be more technical using the example above we can add the following information (Source <a href="https://docs.soliditylang.org/en/latest/introduction-to-smart-contracts.html">here</a>):</p><blockquote>A contract in the sense of Solidity is a collection of code (its <em>functions</em>) and data (its <em>state</em>) that resides at a specific address on the Ethereum blockchain. The line uint storedData; declares a state variable called storedData of type uint (<em>u</em>nsigned <em>int</em>eger of <em>256</em> bits). You can think of it as a single slot in a database that you can query and alter by calling functions of the code that manages the database. In this example, the contract defines the functions set and get that can be used to modify or retrieve the value of the variable.</blockquote><p>You can use it to define your own functions according to your needs, and once ready, you can use a compiler, such as <a href="https://remix.ethereum.org/">Remix</a>, to compile this contract and create some artifacts.</p><p>Here is an example of the above contract compiled in Remix and the artifacts generated:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7zCFrKX1E2AwY1NpP6YkYQ.png" /></figure><p>Among these artifacts are some JSON files that contain important information, such as the Smart Contract:</p><ul><li><strong>Bytecode</strong>: The machine-readable version of a smart contract that is stored on the blockchain and executed by the Ethereum Virtual Machine (EVM).</li><li><strong>ABI</strong>: The Application Binary Interface (ABI), which is a human-readable representation of a smart contract’s code interface and defines how to interact with it in the Ethereum ecosystem.</li></ul><p>Using this information, you will be able to deploy the contract to the blockchain, which will create a contract address. This address is a unique identifier that represents the smart contract and is used to interact with it to trigger its functions or transfer tokens.</p><p>However, in order to interact with this contract address as a user, you also need your own identification. And that’s where MetaMask comes into play.</p><p>After you create an Ethereum account, you can add it to your MetaMask wallet. You do this by adding your account’s private key, which is later used to sign all transactions you make and ensure you are really who you say you are.</p><p>The private key you add to MetaMask is always kept locally and never shared, so only you have this information.</p><p>In the Chrome browser, for example, it is used as a Chrome extension, and it exposes some JavaScript functions that developers can use to interact with a smart contract, by passing the contract address and method information, including any input parameters.</p><p>Whenever these MetaMask JavaScript functions are called, the MetaMask extension prompts the user to confirm the operation and sign the transaction. For example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/343/1*mmlSOplMiKM0CVpj7izTFQ.png" /></figure><p>The private key is never shared and is only used to sign the message.</p><p>A good example to understand this interaction is the <a href="https://www.outsystems.com/forge/component-overview/20426/evm-smart-contracts-metamask-connector-o11">EVM Smart Contracts MetaMask Connector</a> forge component.</p><p>You can access the “Try Now” page <a href="https://raphaelcr93.outsystemscloud.com/EVM_SmartContractsSample/Methods">here</a>.</p><p>There, you can provide your Smart Contract information, including the ABI and address, and it will list all available methods that you can use with MetaMask.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QbxyKHDFmn3_-nMYG2U-Og.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X_0u8dEB6-sv0h_Tg1jLlQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JOSn8n506tgLURFbc-kPMQ.png" /></figure><blockquote>Please note that the sample contract provided on the “Try Now” page is deployed on a Test Net, so it might stop working at any time.</blockquote><p>MetaMask also uses the official <a href="https://web3js.readthedocs.io/en/v1.10.0/">Web3 official JavaScript SDK</a>, making the life of developers much easier by streamlining the process required for dApps to interact with Web3 elements, such as Smart Contracts.</p><p>Everything we just saw is just the tip of the iceberg that we had to learn to create our project, Frankie.</p><p>To give a high-level idea of the scope in more details, check out some of the features Frankie has in the next section.</p><h3><strong>OutSystems’ app Frankie Features</strong></h3><p>In case you want to check the source code of Frankie, you can go to Forge <a href="https://www.outsystems.com/forge/component-documentation/18872/frankie-nft-maker-o11/0">here</a> and download it yourself.</p><p>It is not updated with all our new components, but it has pretty much the base we used for them.</p><p>Among the features we developed, we can highlight the following:</p><p><strong>1.1 — Collection Creations</strong></p><p>‘Collection Creation’ is the UI that lets the user define which traits their NFT will have and automates the creation and deployment of the smart contracts needed to create these dynamic NFTs.</p><p>To start a collection, you first need to log in to our product, make sure your wallet is connected, and click on the “Create a new Frankie” button in the ‘Creations’ menu:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2k_CwStNUB4Q6jB8mhgI_g.png" /></figure><p>After clicking, you will be redirected to our lab, where you can start customizing your Frankie:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u_s4rHXK7DEGC5cVX-WCBg.png" /></figure><p>Here, you will give a name to your collection, select the blockchain you want it to be deployed on (for now, only Avalanche Fuji is supported), and define the price of your NFT.</p><p>Here you will also find an advanced section:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cxg4MhVrpWTXXNcR8lACNw.png" /></figure><p>This section contains fields that, for now, are blocked but are also part of the collection.</p><p>The future idea is to allow users more freedom in their creation.</p><p>The integration hostname, for example, is the address the collection will use as the base domain for its URI operations. For example, the GetURI method of the NFT will use this hostname as a base and attach /GetTokenURI to the end. This link will be used by external sites like OpenSea to retrieve the NFT’s information. For now, we use our own server as a proxy, always getting the information directly from the blockchain. In the future, the idea will be to make it customizable so users can use their own logic or external providers like IPFS.</p><p>The NFT dimensions represent the size of the canvas your appearance traits will have.</p><p>This means that all your images need to use these dimensions as the ViewBox they will be on.</p><p>This is to ensure that all the layers are correctly positioned when merged. For the time being, we are locking the NFT size to always be a square of W 500 x H 500. In the future, this is something that will be customizable.</p><p>Once you define all the required fields and click on ‘Start Mutating,’ you will be prompted to sign a message using MetaMask:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/348/1*ZJPtQfN-Cs8sC8m-RCDv5w.png" /></figure><p>This will be used to define the ownership of your collection.</p><p>After you sign it, you will be redirected to a new screen:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a68SjbDQNk9hInheyqkeFw.png" /></figure><p>Here you will be able to define which traits the NFTs of this collection will have.</p><p>You can create four different types of traits: Appearance, Option, Range, and Label.</p><p>To add a new trait of a given type, select the tab of the trait you want to add, and click on the ‘Add new [Trait type] trait’ button on the top right:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0BPdfyNY9WBT0_QvS3WUGQ.png" /></figure><p><strong>‘Appearance’ Trait Type</strong></p><p>The appearance traits are those that have a visual representation on the NFT.</p><p>Once you click on the Add button, you will be able to define its details:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wcut1J_xn1UgDDXVePIzSg.png" /></figure><p>First, you need to define the trait name. In this example, we want to add the body of our NFT.</p><p>So, we will define the name as ‘Body.’</p><p>Then, you can define if this trait is optional or not. If it is optional, you need to define the chance it has of appearing when you mint an NFT:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/790/1*F_arlKREO2cLXgrsIlRWQw.png" /></figure><p>When an end user mints an NFT, the smart contract will use the VRF Chainlink product to get a random number and use this random number and the ‘Chance of Appearing’ field to determine if the trait will be present in the NFT. (The VRF interactions will be explained later in this article.)</p><p>The fields ‘Trait Name,’ ‘Optional Trait,’ and ‘Chance of Appearing’ are common to all trait types and follow the same structure and rules.</p><p>For the Appearance trait type specifically, you can also define the different options it will have.</p><p>To add a new option, click on the ‘Add new option’ link, and you will be able to define the option’s details:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/739/1*xmRbMjj91UFNm3Ez7h8ufA.png" /></figure><p>You can add as many options as you want, and each option will have an image, a name, and also an appearing chance.</p><p>The ‘Option Image’ is the image this option will have on the NFT when it’s minted, and it needs to be an SVG, with 500 x 500 dimensions. The choice of using an SVG at this point was simply to allow CSS customizations in web games, like animations or effects. In the future, the plan is to allow different image formats, such as PNG.</p><p>The ‘Option Name’ is the value the trait will have on the minted NFT.</p><p>The ‘Option Appearing Chance’ is how likely this option will appear on a minted NFT compared to the other options. All the options’ ‘Appearing Chances’ summed up need to have a total value of 100%.</p><p>For example, in this case, we have two options for the Body trait: ‘Blue Body’ and ‘Yellow Body.’</p><p>Both will have the same chance of appearing, so each one’s ‘Appearing Chance’ is 50%:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/775/1*VjhW4F_bXk4vTUZA3PXGig.png" /></figure><p>When an end user mints an NFT, the smart contract will use the VRF Chainlink product to get a random number and use this random number and the ‘Appearing Chance’ field to determine what option will be present in the NFT. (The VRF interactions will be explained later in this article.)</p><p>Once you define your options and click save, you will see them on the left list. You will also see a preview of a possible NFT on the right:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mrgbP0LRjkBC2sH1L7IJXQ.png" /></figure><p>To give a better idea, we will also add some wings and eye appearance traits to our demo collection. It should look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lZtdMEzP30Ij4G9ZptpRug.png" /></figure><p>You will notice that the wings are on top of the body. To fix that, you can use the arrows on the left to change the order of the traits:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*plIT-3M3oCUB5QONmkYRoQ.png" /></figure><p><strong>‘Option’ Trait Type</strong></p><p>An ‘Option’ trait is very similar to an ‘Appearance’ trait.<br>The only difference is that it doesn’t have an image:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/789/1*kn8dPgo8Xf66pqiQ1-gWmQ.png" /></figure><p>If creating an NFT for a game, for example, you could use it to define what the character class would be — whether the NFT will be a Warrior or a Mage, for instance:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/789/1*kn8dPgo8Xf66pqiQ1-gWmQ.png" /></figure><p>Once you add your options and save, you will also see them on the NFT preview:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6iJVulYuggmw8mgqPrS_AA.png" /></figure><p><strong>‘Range’ Trait Type</strong></p><p>A ‘Range’ trait is a number that will be between a range. For example, if using an NFT for a game, you could have a ‘Range’ trait called Strength that would have a value between 10 and 40:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/760/1*DLH0vIV0RG7GrAaOk96XeA.png" /></figure><p>When an end user mints an NFT, the smart contract will use the VRF Chainlink product to get a random number and use this random number and the defined range to determine the value of the trait that will be present in the NFT. (The VRF interactions will be explained later in this article.)</p><p><strong>‘Label’ Trait Type</strong></p><p>A ‘Label’ trait is as simple as a static field.<br>This type is not random and will always have the same value.</p><p>You can use it if you need to define a specific address, link, or string:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/751/1*93jBmzNwFkoA4WXUIB4Mnw.png" /></figure><p>Finally, after you define all the traits you need, you can publish your collection:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bUEgqLgM_iKm4ifVCV_lnQ.png" /></figure><p>Once you click this button, the system will first check if you have a pass to be able to publish your collection.</p><p>A pass is how we monetize our product.</p><p>It will give you the right to publish a collection and is a single-use.<br>Meaning that after you use it, if you want to publish another collection, you will need to buy a new one.</p><p>If the system identifies you have an unused pass, it will use it automatically. Otherwise, it will prompt you to buy a new one using MetaMask:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/854/1*2_4sTXg7WolTiU8dpqLCYA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/337/1*36S-nQbz9FSyhgsXor75LA.png" /></figure><p>Once you confirm and buy a new pass, you will be prompted to sign another message to start the deployment and configuration of the smart contracts needed for your collection:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yx2WgVJZzdMW8nc0wvSF_Q.png" /></figure><p>This signature is just to validate the ownership of the pass and the collection.</p><p>All the deployments and configurations are done from the server side and will be explained later in this article.</p><p>After the deployment is complete, we sync all traits of the collection:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a1MJlQ8AObS9lepRcHRCFQ.png" /></figure><p>And finally, make sure all the final adjustments are defined, and the collection is now locked so no one can change it anymore:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EsicjObQGMWS2-C5X1dgPg.png" /></figure><p>When everything is done, you can’t edit anything else, but you can mint an NFT for this collection using the “Mint” button on the bottom right:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8pSlMnP2TumTdkEm2DfQ6A.png" /></figure><p>If you click it, you will be prompted to give your NFT a name:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/818/1*7Ky7giL-4DjmbFyAUlWcbA.png" /></figure><p>When you click mint, we use the Price Feed Chainlink product to calculate how much the NFT costs in AVAX (since the chain being used is Avalanche), based on the dollar price defined in the collection.</p><p>The user is then prompted to accept the transaction:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/358/1*_tcxhDxqUOUpHw0pG4bf4A.png" /></figure><p>And an NFT is generated:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/1*df1O6TVps-_dwnBJOOGtag.png" /></figure><p><strong>1.2 — Ghoul Store</strong></p><p>The Ghouls Store is where you can check all the different collections published using Frankie. Here, you can also select one collection and mint your own NFT:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mkcCYbCb0VKXIPqTSYnWyQ.png" /></figure><p><strong>1.3 — Surf Game</strong></p><p>The Surf Game is a very simple sample game showing how people can use the collections created on Frankie to build their own games.</p><p>You basically need to mint your own surfer and board NFTs from the surf collections and deploy them to a queue that will be processed to define your surfer’s output.</p><p>It uses real-time data from Australian beaches to check how difficult it is to surf a certain wave at a given moment, and the NFT traits to check if your surfer is good enough to surf that wave.</p><p>hen, using VRF random elements, it decides if your surfer can do certain tricks and gain experience.</p><p>The game uses Chainlink Automation to process the queue of surfers and VRF to decide if the surfer will succeed.</p><p><strong>1.4 — Admin Section</strong></p><p>If you use an Admin user, you will also notice that we have an Admin Section:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/284/1*qgWCa64OmP3BojSH1YCAPg.png" /></figure><p>Here, we define certain info to support the product.</p><p>The Smart Contract Codes is where we define the ABIs, bytecodes, and addresses of all contracts we need to deploy and use during our process:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yBiccWKjOTltWzQET-r-lQ.png" /></figure><p>These contracts are automated in a way that every time we publish a new contract, it is automatically uploaded to our product, and all collections start using the new version right away.</p><p>The Smart Contract Roles is where we define the roles we use for given permissions on the collections.</p><p>The Legacy Collections is a developer view of the collections that allows us to access the contract’s methods directly.</p><p>The Royalties is where we define how much a pass costs and how much we get when an NFT is minted using our collections.</p><p>The Surf Game Admin is the place where we configure which collections are used by the Surf Game.</p><h3><strong>Conclusion</strong></h3><p>And that’s it! We didn’t win the Hackathon, but the experience we gained is priceless.</p><p>After Frankie, we also participated in another Hackathon and created the app <a href="https://www.outsystems.com/forge/component-overview/20550/businessonchain-o11">BusinessOnChain</a>, which is yet another topic for a future article.</p><p>I hope you enjoyed this and that it helps people in the future who have use cases with Blockchain.</p><p>Best regards, and let me know your thoughts and if you have any interest in Blockchain use cases with OutSystems.</p><blockquote>Special thanks to <a href="https://www.linkedin.com/in/pgneto/"><strong>Pedro Neto</strong></a> for encouraging us to participate in this Hackathon and leading the development of the smart contracts with Solidity.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4cc4adcd4fed" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Upgrading your OutSystems Cordova Plugins to use Android 14 (Target API 34) and MABS 10]]></title>
            <link>https://raphael-ranieri.medium.com/upgrading-your-outsystems-cordova-plugins-to-use-android-14-target-api-34-and-mabs-10-cae82390a61d?source=rss-1bf90dabdcea------2</link>
            <guid isPermaLink="false">https://medium.com/p/cae82390a61d</guid>
            <category><![CDATA[androidx]]></category>
            <category><![CDATA[cordova-plugin]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[cordova]]></category>
            <category><![CDATA[outsystems]]></category>
            <dc:creator><![CDATA[Raphael Ranieri]]></dc:creator>
            <pubDate>Mon, 09 Sep 2024 08:11:57 GMT</pubDate>
            <atom:updated>2024-09-13T02:18:00.933Z</atom:updated>
            <content:encoded><![CDATA[<p>If you are reading this article, you probably have apps published on the Google Play Store, and those apps are not yet targeting API level 34 (aka Android 14).</p><p>If this is the case, when you tried to publish a new version of your app to the Play Console, you may have seen a warning like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/968/1*9cnNN-aoBLVwtiDCTsYOCw.jpeg" /></figure><p>That’s because, starting August 31, 2024, Google <a href="https://medium.com/r?url=https%3A%2F%2Fdeveloper.android.com%2Fgoogle%2Fplay%2Frequirements%2Ftarget-sdk">introduced a new requirement</a> for publishing apps on the Play Store:</p><blockquote>New apps and app updates must target Android 14 (API level 34) or higher to be submitted to Google Play; except for Wear OS and Android TV apps, which must target Android 13 (API level 33) or higher.</blockquote><p>If this is the case, you will need to change the target API level of your application as soon as possible.</p><p>In order for OutSystems-generated mobile apps to do this, you will need to start generating your apps using MABS 10.</p><blockquote>If you don’t know what MABS is you can find more information about it <a href="https://success.outsystems.com/support/release_notes/mobile_apps_build_service_versions/">here</a>.</blockquote><p>Using MABS 10 will ensure that your application will target API Level 34 and after that you will have no problems publishing it again.</p><p>If your application is simple, without a lot of plugins, this process will probably be very straightforward. You will just need to ensure you are using MABS 10 and click a button.</p><p>However, if you have a more complex application, especially if it uses Cordova plugins, you will likely see error messages when trying to build your application with MABS 10. For example, messages like:</p><pre>…<br>Error : Program type already present: android.support.v4.app.INotificationSideChannel$Stub$Proxy |<br>Reason: Program type already present: android.support.v4.app.INotificationSideChannel$Stub$Proxy<br>…</pre><p>Or</p><pre>…<br>Duplicate class android.support.v4.app.INotificationSideChannel found in modules classes.jar (androidx.core:core:1.0.0) and classes.jar (com.android.support:support-compat:28.0.0)<br>…</pre><p>This means that your Cordova plugins have conflicting libraries that are not supported by MABS 10 and to fix this, you will need to update your plugins.</p><p>If the plugins you use are supported by OutSystems, hopefully you will only need to update them from Forge. <a href="https://success.outsystems.com/support/release_notes/mobile_apps_build_service_versions/mabs_10_release_notes/">Here</a> is a list of the MABS 10 compatible versions of plugins supported by OutSystems.</p><p>However, if you have custom plugins, this process may not be as straightforward.</p><p>But fear not, to guide you through this process and give you an idea of ​​what you will need to do, I will use a forge component that I had to update as an example and show you what the process is to do so.</p><p>The plugin we will be updating in this guide is the <a href="https://www.outsystems.com/forge/component-overview/1727/backgroundmode-plugin-o11">Background Mode plugin</a> (version 2.0)</p><p>Before we dive into the technical details, let’s understand what the errors we receive are.</p><p>If you try to use MABS 10 to generate an application that uses the Background Mode plugin (version 2.0), you will receive an error similar to this:</p><pre>...<br>[2024-09-07T03:14:34.325Z] [ERROR] [Build] The build phase failed to complete!<br>[2024-09-07T03:14:34.326Z] [ERROR] [Build] Reason: There was an issue generating the app. At least one Cordova plugin uses Android Support Library components, which are not compatible with MABS 10 and onwards. Check your plugin configurations and try again.<br>[2024-09-07T03:14:34.326Z] [ERROR] [Build] Additional information:<br>[2024-09-07T03:14:34.326Z] [ERROR] [Build] Note: Some input files use or override a deprecated API.<br>[2024-09-07T03:14:34.326Z] [ERROR] [Build] Note: Recompile with -Xlint:deprecation for details.<br>[2024-09-07T03:14:34.326Z] [ERROR] [Build] FAILURE: Build failed with an exception.<br>[2024-09-07T03:14:34.326Z] [ERROR] [Build] * What went wrong:<br>[2024-09-07T03:14:34.326Z] [ERROR] [Build] Execution failed for task &#39;:app:checkDebugDuplicateClasses&#39;.<br>[2024-09-07T03:14:34.326Z] [ERROR] [Build] &gt; A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable<br>[2024-09-07T03:14:34.326Z] [ERROR] [Build]    &gt; Duplicate class android.support.v4.app.INotificationSideChannel found in modules core-1.9.0-runtime (androidx.core:core:1.9.0) and support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1)<br>[2024-09-07T03:14:34.326Z] [ERROR] [Build]      Duplicate class android.support.v4.app.INotificationSideChannel$Stub found in modules core-1.9.0-runtime (androidx.core:core:1.9.0) and support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1)<br>[2024-09-07T03:14:34.326Z] [ERROR] [Build]      Duplicate class android.support.v4.app.INotificationSideChannel$Stub$Proxy found in modules core-1.9.0-runtime (androidx.core:core:1.9.0) and support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1)<br>[2024-09-07T03:14:34.326Z] [ERROR] [Build]      Duplicate class android.support.v4.os.IResultReceiver found in modules core-1.9.0-runtime (androidx.core:core:1.9.0) and support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1)<br>[2024-09-07T03:14:34.326Z] [ERROR] [Build]      Duplicate class android.support.v4.os.IResultReceiver$Stub found in modules core-1.9.0-runtime (androidx.core:core:1.9.0) and support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1)<br>[2024-09-07T03:14:34.326Z] [ERROR] [Build]      Duplicate class android.support.v4.os.IResultReceiver$Stub$Proxy found in modules core-1.9.0-runtime (androidx.core:core:1.9.0) and support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1)<br>[2024-09-07T03:14:34.326Z] [ERROR] [Build]      Duplicate class android.support.v4.os.ResultReceiver found in modules core-1.9.0-runtime (androidx.core:core:1.9.0) and support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1)<br>[2024-09-07T03:14:34.326Z] [ERROR] [Build]      Duplicate class android.support.v4.os.ResultReceiver$1 found in modules core-1.9.0-runtime (androidx.core:core:1.9.0) and support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1)<br>[2024-09-07T03:14:34.326Z] [ERROR] [Build]      Duplicate class android.support.v4.os.ResultReceiver$MyResultReceiver found in modules core-1.9.0-runtime (androidx.core:core:1.9.0) and support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1)<br>[2024-09-07T03:14:34.326Z] [ERROR] [Build]      Duplicate class android.support.v4.os.ResultReceiver$MyRunnable found in modules core-1.9.0-runtime (androidx.core:core:1.9.0) and support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1)<br>...</pre><p>The reason behind this is that for Background Mode Plugin (version 2.0) to work, it needs some code from the Android <a href="https://developer.android.com/topic/libraries/support-library/packages">Support Library.</a></p><blockquote>The Android Support Library contains several library packages that can be included in your application. Each of these libraries supports a specific range of Android platform versions and set of features.</blockquote><p>In our plugin case, we have a dependency on the <strong>‘support-compat:27.1.1’</strong> package to import the <strong>‘android.support.v4.app.NotificationCompat’</strong> class, which causes a conflict.</p><p>This conflict is caused because starting with MABS 10, plugins need to support <a href="https://developer.android.com/jetpack/androidx">AndroidX</a>, which is an improvement over the original Support Libraries we mentioned previously, and is intended to replace them:</p><blockquote>AndroidX is a major improvement to the original Android <a href="https://developer.android.com/topic/libraries/support-library">Support Library</a>, which is no longer maintained. androidx packages fully replace the Support Library by providing feature parity and new libraries.</blockquote><blockquote>The androidx namespace comprises the <a href="https://developer.android.com/jetpack">Android Jetpack</a> libraries. Like the Support Library, libraries in the androidx namespace ship separately from the Android platform and provide backward compatibility across Android releases.</blockquote><p>This means that when using multiple plugins at the same time that have dependencies on different support libraries, you will have a conflict when trying to build them.</p><p>Now that we understand that we cannot use both Support Libraries at the same time, how can we fix this?</p><p>First, we need to identify the plugin that is causing the problem.</p><p>To do this, let’s analyze the error file that is generated in Service Center when trying to generate the application:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i8KRhQIhmFmrVfMlN-o5bA.png" /></figure><p>In our case, as we had an error mentioning <strong>‘support-compat’,</strong> as you can see in this line:</p><pre>...<br>[2024-09-07T03:14:34.326Z] [ERROR] [Build]      Duplicate class android.support.v4.os.ResultReceiver$MyRunnable found in modules core-1.9.0-runtime (androidx.core:core:1.9.0) and support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1)<br>...</pre><p>If we try to search the file for this keyword (<strong>‘support-compat’)</strong>, we should find which plugin tried to install this dependency:</p><pre>...<br>1 - [2024-09-07T03:13:38.839Z] [VERBOSE] [Build] Install start for &quot;cordova-plugin-background-mode&quot; on android.<br>2 - [2024-09-07T03:13:38.840Z] [VERBOSE] [Build] Loaded API for android project source/platforms/android/cordova/Api.js<br>3 - [2024-09-07T03:13:38.854Z] [VERBOSE] [Build] Beginning processing of action stack for android project...<br>4 - [2024-09-07T03:13:38.872Z] [VERBOSE] [Build] Installing Android library: com.android.support:support-compat:27.1.1<br>5 - [2024-09-07T03:13:38.880Z] [VERBOSE] [Build] Action stack processing complete.<br>6 - [2024-09-07T03:13:38.921Z] [VERBOSE] [Build] Updating build files since android plugin contained &lt;framework&gt;<br>7 - [2024-09-07T03:13:38.923Z] [VERBOSE] [Build] Subproject Path: CordovaLib<br>8 - [2024-09-07T03:13:38.924Z] [VERBOSE] [Build] Subproject Path: app<br>9 - [2024-09-07T03:13:38.925Z] [VERBOSE] [Build] Install complete for cordova-plugin-background-mode on android.<br>...</pre><p>You may notice that on line number 1 we have the name of the plugin that is being installed, which is ‘<strong>cordova-plugin-background-mode’.</strong></p><p>Right after, on line 4, we have the <strong>‘support-compat:27.1.1’ </strong>library being installed as a dependency.</p><p>And finally, on line 9, we have confirmation that the installation of the <strong>‘cordova-plugin-background-mode’</strong> plugin has been completed.</p><p>This confirms that the<strong> ‘cordova-plugin-background-mode’</strong> plugin is responsible for this dependency.</p><p>Now that we are sure that this plugin is responsible for this error, let’s analyze its source code.</p><p>If you open the Background Mode plugin module and goes to the Resources folder under the Data tab, you will find a zip file:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/345/1*yj1eMKRISjpRttHMLk8HKg.png" /></figure><p>Inside this zip file, you should find a structure similar to this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/271/1*HikwZwB-66Xm_0rSEZEdfA.png" /></figure><p>Note that if your plugin doesn’t have a zip file in the resource folder, it will probably have a link to a github located in the extensibility configurations of your module:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zhOFM7DfAq3nfv7E9Bl6Zw.png" /></figure><p>And this github repository should have a similar structure than the one mentioned above.</p><p>As part of structure you will always find a <strong>‘plugin.xml’ </strong>file, where you have the configurations for you cordova plugin, including the dependencies and files for each of the platforms it support, like Android, iOS and etc.</p><p>In the Background Mode plugin case, when analyzing this file, on line 96, you can find in the Android settings a dependency for the Support Library that we have in the errors:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t4Bz5cPrvYi9AXlhQVA_ag.png" /></figure><p>In this plugin case, this is required to import a specific class in one of the source files.</p><blockquote>If your plugin has a dependency, the <strong>‘plugin.xml’ </strong>file will most probably be the place you need to check first.</blockquote><p>Then if you need to find where this dependency is used, you can start checking the files inside the <strong>‘/src/android’ </strong>folder.<br>These are the files that are used by the plugin to implement the native code for the Android platform.</p><p>For the Background Mode plugin, if you open the <strong>‘ForegroundService.java’</strong> file, which is located in this folder, you will find an import, on line 36, that is using the dependency for the Support Library:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wIwJLkV3W0ormHmlJ7f0fw.png" /></figure><p>Now that we know what is using the Support Library, we can try to replace those dependencies.</p><p>First, we need to change the <strong>‘plugin.xml’</strong> to use the androidX dependency instead of the original library.</p><p>This can be done by changing the code on line 96, from this:</p><pre>...<br>&lt;framework src=&quot;com.android.support:support-compat:27.1.1&quot; /&gt;<br>...</pre><p>To this:</p><pre>...<br>&lt;framework src=&quot;androidx.core:core:1.0.0&quot; /&gt;<br>...</pre><p>This is how it will look after the change (Old on the left, new on the right):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5LkZn8WQCBRkFtyxbWDQrg.png" /></figure><p>Next, you need to change the import of the class in the <strong>‘ForegroundService.java’ </strong>file we previously mentioned.</p><p>To help with this, you can use <a href="https://developer.android.com/jetpack/androidx/migrate/class-mappings">this guide</a> with mappings of classes from the old support library to the respective AndroidX class.</p><p>According to the mapping, in our case, the class <strong>‘android.support.v4.app.NotificationCompat’</strong> will change to <strong>‘androidx.core.app.NotificationCompat’</strong></p><blockquote>Please note that if you use an older version of the original Support Library, the mapping class may not be 100% compatible and you will need to review the code as well. For more information, check <a href="https://developer.android.com/jetpack/androidx/migrate">this other guide</a>.</blockquote><p>So in our case, after the change, we will have (Old on the left, new on the right):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q5gWWkEYavR1xF6RMJFxRQ.png" /></figure><p>Luckily, this was the only class in the Background Mode plugin, so it was very simple.</p><p>Doing this allowed me to use MABS 10 to generate the app referencing this pluing without any problems.</p><p>I also later found out that it was already updated in the original plugin’s GitHub repository, so I suggest trying that first if your plugin was originally created from a GitHub project.</p><p>That said, I hope this can serve as a guide when you need to update plugins yourself.</p><p>Something that is also worth mentioning and can be extremely useful is that I also came across some more complex scenarios that were not very easy to update.</p><p>Especially plugins that used classes that did not have a change name in the mapping class for androidX. For example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/905/1*deqGF9x3RPEZCq8aYYgmUg.png" /></figure><p>For these cases, the only option that worked for me was to enable some specific options in the gradle.properties file. Specifically:</p><pre>android.useAndroidX=true<br>android.enableJetifier=true</pre><p>These options should enable Jetifier at the time of compiling the plugin, which is a tool that helps migrating the code and should only be used as a last resort as it will increase the build time of your application and ideally should not be necessary.</p><p>In case you really need them, the way I found to easily change the gradle.properties file was by using a cordova hook. I got the idea from <a href="https://medium.com/r?url=https%3A%2F%2Fgithub.com%2Fapache%2Fcordova%2Fdiscussions%2F482">this </a>discussion and it worked great.</p><p>I also created a <a href="https://www.outsystems.com/forge/component-overview/19639/enablejetifier-o11">forge component</a> if you need it.</p><p>All you need to do is reference the plugin action in your application, and the properties will be set when generating the new APK.</p><p>Another idea if you need a quick fix, might be using <a href="https://www.outsystems.com/forge/component-overview/8683/androidx-plugin-o11">this other forge</a> component.</p><p>I didn’t test it, but it is a fork of the <a href="https://github.com/wf9a5m75/cordova-androidx-build">cordova-androidX-build</a> plugin, which is supposed to replace all classes (Just like we did in this guide) automatically in compile time.</p><p>And that’s it!<br>I hope this helps if you find yourself in the same situation.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cae82390a61d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Preparing your OutSystems 11 apps to ODC]]></title>
            <link>https://raphael-ranieri.medium.com/preparing-your-outsystems-11-apps-to-odc-59f5a60a1f18?source=rss-1bf90dabdcea------2</link>
            <guid isPermaLink="false">https://medium.com/p/59f5a60a1f18</guid>
            <category><![CDATA[low-code-development]]></category>
            <category><![CDATA[outsystems]]></category>
            <category><![CDATA[odc]]></category>
            <category><![CDATA[low-code]]></category>
            <dc:creator><![CDATA[Raphael Ranieri]]></dc:creator>
            <pubDate>Tue, 17 Oct 2023 10:09:49 GMT</pubDate>
            <atom:updated>2023-10-18T22:47:19.806Z</atom:updated>
            <content:encoded><![CDATA[<p>If you’ve been using OutSystems recently, you’ve probably heard about ODC. But do you know what to do to prepare for it?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*Tlqya4fpjZ1k-R0Yh5ZE2A.png" /></figure><p>ODC, or OutSystems Developer Cloud, is the next generation of the low-code platform we all love, and as it gains more and more awareness, current O11 (OutSystems 11) customers are planning to migrate their applications to get the most out of it.</p><p>However… as ODC is an entirely new product with different architecture and concepts, it means that migrating your applications from O11 to ODC may not be as easy as the ‘1-Click Publish’ we are used to in the current version and thus, we will need to make some efforts to make this happen.</p><p>Nevertheless, there is no reason to be alarmed or worried.</p><p>Whether you’re planning to move to ODC soon or a year from now, there are a few things we can start or stop doing to make your transition smoother than ever and help us build for the future.</p><blockquote>As a friendly reminder, before we delve deeper into this topic, if you don’t already know the main differences between O11 and ODC, I highly suggest you start by reading <a href="https://medium.com/doitlean/odc-aka-outsystems-project-neo-unboxing-28cfab5b9376">this</a> and <a href="https://www.outsystems.com/blog/posts/o11-to-odc/">this</a> articles and check out the <a href="https://learn.outsystems.com/training/catalog">ODC Training Courses</a>.</blockquote><blockquote>This will help you understand the key differences we need to take into consideration in the future, such as: <br>- Not having modules, only apps; <br>- Difference between a Library and a normal App; <br>- Among others…</blockquote><p>With all that said, let’s take a look at what we should avoid or start doing to prepare our O11 applications for ODC:</p><p><strong>1 — Don’t stop using the Architecture Canvas!</strong></p><p>If for some reason, when reading about the main differences between O11 and ODC you had the idea that no more modules meant everything in one app, you might think:</p><p><em>Well… If I’m not going to have modules in ODC, why don’t I stop following best practices regarding splitting my code into the 3-layer canvas in my new O11 apps? This way, as soon as I migrate to ODC, everything will be in a single app and it will be as simple as ctrl+c / ctrl+v.</em></p><p>Makes sense… right?!</p><p>No! It really doesn’t! If you are following this line of thinking, stop right there!</p><p>You shouldn’t compromise your O11 applications just because you think it will be easier to migrate.</p><p>Even worse, you could be making it even more difficult!</p><p>The recommendation is to continue following the <a href="https://success.outsystems.com/documentation/best_practices/architecture/designing_the_architecture_of_your_outsystems_applications/the_architecture_canvas/">Architecture Canvas</a> best practices, still dividing your modules into 3 different layers.</p><p>This way you will ensure that your applications do not have misconceptions or mixed concepts that may be even more difficult to split in the future.</p><p>Additionally, I’m sure OutSystems will provide tools that will help you merge your O11 modules into a single application, so don’t stop following the O11 architecture best practices and keep tracking the architecture findings in AI Mentor.</p><p><strong>2 — Consider start using Domain Driven Architecture.</strong></p><p>If you are not familiar with <a href="https://success.outsystems.com/documentation/best_practices/architecture/outsystems_domain_driven_architecture/">Domain Driven Architecture</a>, I recommend you start familiarizing yourself right now!</p><p>The concept brought to O11 by this type of architecture is very much in line with the ODC architecture.</p><p>In ODC, different applications communicate with each other using ‘Service Actions’.</p><p>‘Service Actions’ unlike ‘Server Actions’, are executed in a different transaction having their own context and scope, they are basically REST API calls that you can easily use on the platform.</p><p>This means that in ODC you will need to handle your reusable services practically as Micro-Services, and if you can start doing this already in O11 by applying a Domain Driven Architecture, it means that your journey to ODC will be halfway there.</p><p>If you can successfully define your different domains in O11, based on different sponsors and lifecycles, this means they will likely map to your new applications when using ODC.</p><p>A very common scenario I expect is to have a mobile app and a desktop app sharing a common core app.</p><p>If this is your scenario, what you could do is have 3 different domains on O11.</p><ul><li>Mobile domain</li><li>Desktop domain</li><li>Core service domain</li></ul><p>In O11 you can still have multiple modules and applications in each domain. But when migrating to ODC, you will probably have 3 Apps, one for each domain, and more than one Library to have your common UI elements.</p><p><strong>3 — Consider reworking your Traditional Web Apps, and keep your technical debt under control!</strong></p><p>If you have TWAs (Traditional Web Applications) in your factory, you will have to choose between two options.</p><p>The first is to consider <a href="https://success.outsystems.com/documentation/how_to_guides/development/introduction_to_migrating_traditional_web_to_reactive_web_apps/">turning them into Reactive Applications</a> as soon as possible.<br>The second is waiting for rewriting them on ODC.</p><p>The fact is that ODC will not support TWA, so that means any tools OutSystems makes available to help you migrate from O11 to ODC won’t work for you!</p><p>If you want to migrate to ODC but still can’t because ODC doesn’t have all the features you need yet, what you can do is turn your applications into reactive while using O11, which will save you time when the time to migrate comes.</p><p>If you don’t want to convert your TWA to reactive while using O11, you can wait for the ODC to meet all your requirements and then rebuild it directly in ODC.</p><p>Furthermore, work to reduce your technical debt as much as possible by using AI Mentor to track your findings.</p><p>This will ensure that your application follows best practices and you can migrate without any major problems.</p><p><strong>4 — Consider other integrations protocols other than SOAP</strong></p><p>If you still consume or expose SOAP APIs, consider using REST or different protocols.</p><p>ODC will still allow you to <a href="https://success.outsystems.com/documentation/outsystems_developer_cloud/building_apps/extend_your_apps_with_external_logic_using_custom_code/supporting_soap_in_odc/">consume SOAP APIs</a>. It won’t be as easy as O11, as you’ll need to use C# extensions with high code, but you’ll still have an option if absolutely necessary.</p><p>Exposing a SOAP API, on the other hand, is not a top priority for ODC going forward, so if you hope to migrate sooner rather than later, focus on changing your SOAP APIs as quickly as possible.</p><p><strong>5 — Keep an eye on your advanced SQL queries.</strong></p><p>In O11, you can choose to use SQL Server, Azure SQL Database, Oracle, or DB2 as the database for your applications.</p><p>On ODC, your applications will be required to use AWS Aurora PostgreSQL.</p><p>While SQL Server and the older options are relational databases, AWS Aurora PostgreSQL is an object-relational database.</p><p>This means that in ODC you can build SQL queries with complex data types and object inheritance and will inevitably use different syntax.</p><p>In other words, if you use a lot of advanced SQL queries, you may run into some problems. Especially if you are using Oracle or DB2.</p><p>To help you understand the differences you will face, <a href="https://success.outsystems.com/documentation/outsystems_developer_cloud/onboarding_for_outsystems_developers/sql_queries_compared_to_outsystems_11/?_gl=1*937t9k*_ga*MTAwOTU0NDI2NS4xNjc2ODc4OTY4*_ga_ZD4DTMHWR2*MTY5NzQ0MTE4MS4xMDguMS4xNjk3NDQxMTkyLjQ5LjAuMA..">here </a>is a mapping of O11 queries to ODC.</p><p>I don’t want to create false expectations, but this is something that could be included as part of an O11 to ODC migration tool in the future, who knows?</p><p><strong>6 — Keep an eye on your custom code extensions and Forge components.</strong></p><p>Another big difference from O11 to ODC, is the way custom code extensions (.xif) <a href="https://success.outsystems.com/documentation/outsystems_developer_cloud/building_apps/extend_your_apps_with_external_logic_using_custom_code/">will work</a>.</p><p>In ODC, all your custom code extensions (like C#) will run using AWS Lambda.</p><p>This means that your code will run in a serverless service, which will be accessed through a REST API, and not in your application container.</p><p>In other words, your custom code will follow the principle of FaaS (Function as a Service).</p><p>This is different from O11 where your code was hosted and executed directly on the server where your code was also running:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l1NTLBIZZh4JvRNkOivoeA.jpeg" /></figure><p>In more technical terminology, in O11 each Front End will have a version of your customized C# code running on its application server (IIS), this makes it possible to change the front end configuration programmatically, for example, and even create a static object that can be reused for different requests.</p><p>In ODC, your code will be executed as a serverless function and, therefore, after the request the entire context will be discarded.<br>This also means that you cannot programmatically change anything in your application’s container as it is running in a different scope.</p><p>If you have any extensions that access server resources or need extreme performance with low latencies, you will need to rethink how things are done.</p><p>Another important point to keep in mind is related to the different forge components you use.</p><p>As ODC is a new platform, don’t expect to find all of the Forge components already there. Migrating all O11 components to ODC is also a work in progress.</p><p><strong>7 — Refactor your core widgets modules if possible</strong></p><p>In ODC the way you reuse elements will be a little different from what we are used to.</p><p>We currently have only two types of applications that can be created in ODC. App or Library:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*qnbdfyVp3-Civw1dkDICzw.png" /></figure><p>The important information about Apps is:</p><ul><li>It can have all kinds of different elements, including Entities.</li><li>Entities can only be exposed as read-only and if you need to update a record in an entity you will need to do so by exposing a Service Action with the logic to update your record.</li><li>Although Apps can have web blocks, they cannot be exposed as public.</li></ul><p>Here are the different types of elements an App can have:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cxaSHpOOw2MiE623_2Hq8Q.png" /></figure><p>A Library is a little different, what you need to know about this type of application is:</p><ul><li>It can contain only some types of elements.</li><li>One of the element types that it <strong>can’t contain are Entities</strong>.</li><li>A Library can also <strong>only </strong>consume elements from <strong>other Libraries </strong>or consume external REST APIs.</li></ul><p>Here are the different types of elements a Library can have:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dzxs7fn-29JJj7FK8YCSMw.png" /></figure><p>For a more detailed look at what types of elements can be public or exposed in each type of app, check out <a href="https://success.outsystems.com/documentation/outsystems_developer_cloud/building_apps/app_architecture/reuse_elements_across_apps/">this </a>link.</p><p>Also, take a look at this diagram, which shows how an App and Library interact with each other:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*23VLuurzDKlZnOvhik2GjQ.png" /></figure><p>If you understood correctly, you may have already noticed that a Library cannot interact with normal entities.</p><p>It can’t have a server action that updates a record, for example.</p><p>Libraries should only have reusable UI elements and actions that do not interact directly with the database.</p><p>Therefore, if your Core Widgets modules (which are supposed to be reusable) have actions that use database entities, you will not be able to turn them into Libraries in ODC, and you will not be able to reuse the web blocks in different applications.</p><p>This means that you will, either:</p><ul><li>Need to refactor your blocks to remove database dependencies. And trigger events for the consuming App to handle database operations.</li><li>Or move the blocks into your App and if they need to be reused, duplicate the code.</li></ul><p>This isn’t the ideal solution, but for now it’s all we can do in these scenarios.<br>We hope that in the future we will have another way to deal with this.</p><p><strong>8 — Prepare to change your BPT (Business Process Technology) processes. And your CMF (Case Management Framework) and Workflow Builder use cases.</strong></p><p>At this point, it’s still unclear how exactly BPT will work on ODC.</p><p>We’ll definitely have something, but it’s more likely to be reworked and work differently than we’re used to in O11, so be prepared to spend some effort changing your code.</p><p>The same is true for <a href="https://success.outsystems.com/documentation/11/developing_an_application/create_case_management_and_workflow_apps/use_case_management_framework/">CMF</a> (Which is built on top of BPT) and <a href="https://success.outsystems.com/documentation/11/developing_an_application/create_case_management_and_workflow_apps/create_workflow_apps_with_workflow_builder/">Workflow Builder</a>.</p><p>They will probably be rebuilt and have major changes.</p><p>If you use a lot of BPTs, keep an eye on announcements so you can react as quickly as possible.</p><p><strong>9 — Start considering manual referential integrity checks on entities from different modules.</strong></p><p>This may seem complex, but let’s try to understand what it means.</p><p>In ODC, an App can only expose entities as read-only.</p><p>This Entity can be consumed by another App and even be used to create a Foreign Key in another table.</p><p>However, because ODC is designed to use a microservices architecture, this means that each application will have its own scope.</p><p>Due to this, FKs of entities that exist in different apps will not have indexes created and therefore will not be validated.</p><p>This means you can create a record in a table and set a value to an FK that doesn’t actually exist in the table you are consuming from the other application.</p><p>Or that you can remove a record that is being referenced in another table from a different application and it won’t throw a constraint error.</p><p>If you need to ensure data integrity, remember that in the future you may need to manually implement checks to avoid inconsistent data in your database.</p><p><strong>And that’s all!</strong></p><p><strong>I know it is a significant effort and might take time to prepare your apps to ODC. But if you try to follow all these suggestions from now on, your migration will certainly go more smoothly in the future, and you will be able to start using ODC very soon.</strong></p><p><strong>Thank you for reading!</strong></p><p><strong>RR</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=59f5a60a1f18" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OutSystems DevOps Model Series: 5-Support]]></title>
            <link>https://raphael-ranieri.medium.com/outsystems-devops-model-series-5-support-366b796365ac?source=rss-1bf90dabdcea------2</link>
            <guid isPermaLink="false">https://medium.com/p/366b796365ac</guid>
            <category><![CDATA[release-management]]></category>
            <category><![CDATA[outsystems]]></category>
            <category><![CDATA[support]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[access-control]]></category>
            <dc:creator><![CDATA[Raphael Ranieri]]></dc:creator>
            <pubDate>Thu, 17 Mar 2022 20:36:16 GMT</pubDate>
            <atom:updated>2022-03-17T20:36:16.062Z</atom:updated>
            <content:encoded><![CDATA[<p>We are finally reaching the end of our journey.</p><p>Last but not least, we need to talk about support, especially in mission critical scenarios that are already being used by End Users.</p><p>In our model we work with multiple teams and projects and in case we need to support the application with multiple maintenance teams as well, how can we keep that organized too?</p><p>Who should be involved in each case?</p><p>Depending on the type of problem we should send this issue to the right person.</p><p>The “Issue Journey” in a high-level overview would be:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*OODvELGbL_H0cxfLo-MtOg.png" /></figure><p>However, just this is not enough. We have multiple possible scenarios for bugs in a CD process.</p><p>And now that we have all our roles and releases phases, when we have a PRD issue who we should involve?</p><p>Well… it depends.</p><p>As we said we may have different scenarios for that, and we should handle them accordingly:</p><ul><li>In case it is not a critical issue we should create a backlog item and follow the normal path:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*rjM-eMPO1BQvoI2zjJGahA.png" /></figure><ul><li>In case it is a critical issue and we have different versions in PRD and DEV, we should hot fix it in PP and Merge the code with the DEV version if needed:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*2uM-ObGBGNgPBAPZTg8g6A.png" /></figure><ul><li>In case it is a critical issue and we have the same versions in PRD and DEV, we should hot fix it in PP and backport the fix to DEV:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*LeTfCOAEfWkWAJM3ZcCrJw.png" /></figure><p>And that completes our Model!</p><p>With it you will be able to work in an organized way with multiple teams and still keep it secure.</p><p>I hope this can help you to organize your DevOps Model when using OutSystems.</p><p>Previous: <a href="https://medium.com/@raphael.ranieri/outsystems-devops-model-series-4-release-management-b47b1285479d">4 — Release Management</a></p><p>OutSystems DevOps Series Articles:</p><p><a href="https://medium.com/@raphael.ranieri/outsystems-devops-model-series-1-introduction-5d20ebdbf36a">1 — Introduction</a></p><p><a href="https://medium.com/@raphael.ranieri/outsystems-devops-model-series-2-requirements-304f5e6247f0">2 — Requirements</a></p><p><a href="https://medium.com/@raphael.ranieri/outsystems-devops-model-series-3-access-control-policy-2ee24bfca6d7">3 — Access Control Policy</a></p><p><a href="https://medium.com/@raphael.ranieri/outsystems-devops-model-series-4-release-management-b47b1285479d">4 — Release Management</a></p><p><a href="https://medium.com/@raphael.ranieri/outsystems-devops-model-series-4-support-366b796365ac">5 — Support</a></p><blockquote>Disclaimer: Most of the material was gotten from OutSystems documents</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=366b796365ac" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OutSystems DevOps Model Series: 4-Release Management]]></title>
            <link>https://raphael-ranieri.medium.com/outsystems-devops-model-series-4-release-management-b47b1285479d?source=rss-1bf90dabdcea------2</link>
            <guid isPermaLink="false">https://medium.com/p/b47b1285479d</guid>
            <category><![CDATA[support]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[outsystems]]></category>
            <category><![CDATA[access-control]]></category>
            <category><![CDATA[release-management]]></category>
            <dc:creator><![CDATA[Raphael Ranieri]]></dc:creator>
            <pubDate>Thu, 17 Mar 2022 20:35:28 GMT</pubDate>
            <atom:updated>2022-03-17T20:35:28.298Z</atom:updated>
            <content:encoded><![CDATA[<p>During the lifecycle of each Product, new versions of software can be deployed to Production using 2 distinct release processes:</p><p><strong>- Product Release</strong></p><ul><li>Has an expected schedule (min. 2 weeks), following-up 1 or more development sprints</li><li>Originated from <strong>QA</strong> environment</li><li>Includes new features, bug fixing and enhancements based on the Product Owner priorities</li></ul><p><strong>- Hotfix Release</strong></p><ul><li>Triggered by urgent maintenance actions in response to critical issues (P1) occurring in PRD</li><li>Originated from <strong>PP</strong> environment</li><li>Includes corrections to critical issues reported by end-users or identified by Product Ops monitoring activities</li></ul><p>Every issued release should have the following attached information for traceability:</p><ul><li>Backlog: user stories and defects</li><li>Manifest: included LifeTime applications (tags)</li><li>Runbook: deployment and configuration guide</li></ul><p>All release information can be compiled and managed centrally in third party tools. e.g: JIRA and Confluence</p><p>Runbook content can be stored and edited in Confluence (linking from JIRA) while release manifest can be synced automatically to JIRA through a LifeTime plugin.</p><blockquote>Spoiler Alert: In this series we will not talk about Jira/Confluence Integrations but this can be our next topic in the future.</blockquote><p>This way every Product backlog item can be traced forward to the specific release that implemented it.</p><p>It is also important to say that each <strong>release </strong>should be properly <strong>versioned</strong>, and for that we can follow the following schema:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HcqO83nJcy6p3DLUM_LL4g.png" /></figure><p><strong>Major</strong>: Software major version, introducing <strong>significant </strong>improvements and <strong>breaking changes </strong>from the previous Major release version</p><p><strong>Minor</strong>: Software minor version, which may include improvements and <strong>non-breaking changes</strong> for the corresponding Major release version</p><p><strong>Revision</strong>: Increments only when a new batch of corrections is included in the same version</p><p>With that being said, let talk about roles and activities.</p><p>Each role in our Model will have a specific function in a determined time.</p><p>As an overview this is the release proccess, with the roles defined:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*_X66WIzTGAHPsTBxzXNiLw.png" /></figure><p>Let’s break down each of the steps needed to understand a little bit better the responsabilities of each role in each phase and how to do it properly.</p><h3>Release Inception</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/403/1*N3SqbtNFu9oiqz35kvK5Vg.png" /></figure><p>Every new release should start with <strong>a kick-off meeting</strong> to align Product and Factory teams</p><ul><li>Share business context, release scope and identified risks</li><li>Align delivery timeline and book tentative dates<br>- Applications must follow <strong>technical guidance</strong> guidelines to ensure consistency and best practices compliance</li><li>Regular <strong>audits</strong> are performed to ensure compliance<br>- <strong>Application architecture</strong> should already be defined and sanctioned by the Architecture team<br>- <strong>Infrastructure assessment</strong> is performed prior to development starts to evaluate impacts and mitigate risks</li></ul><h3>Code and Architecture Checkpoint</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/588/1*Kqrr7I2OPMUyhefREeqirw.png" /></figure><ul><li>Architecture role performs code and architecture reviews on a <strong>regular basis<br>- </strong>Scheduled at the end of every Product <strong>release cycle</strong> (ideally at the end of each <strong>sprint</strong> to minimize delta)<br>- Uses <strong>code review checklist</strong> and supporting <strong>tools</strong> such as <strong>Discovery</strong> and <strong>Architecture Dashboard</strong></li><li>Ensures <strong>compliance</strong> with internal development best practices and global factory architecture</li><li><strong>Normalizes</strong> code deliverables while promoting overall code <strong>quality</strong> and <strong>documentation</strong></li><li>Identifies <strong>issues</strong> earlier in the delivery pipeline reducing technical debt and maintenance costs</li></ul><h3>Application Staging — DEV -&gt; QA</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/552/1*Y1CWpoQ_Y5GZZGRhCOhnQg.png" /></figure><ul><li>Performed by the SD of the owner Product team with full <strong>autonomy</strong> (if non-impacting)</li><li>Can occur <strong>multiple times</strong> during release cycle</li><li>Requires <strong>alignment</strong> with Product testing plan<br>- If there are cross-team dependencies, Factory team takes over deployment operation<br>- Runbook information is <strong>compiled</strong> during development cycle<br>- Runbook is <strong>validated</strong> and fine-tuned by SD before handover to Product Ops</li></ul><p>Note: Developers may use <a href="https://www.outsystems.com/forge/component-overview/9664/feature-toggle-management"><strong>Feature Toggle</strong></a><strong>,</strong> an open source component available for free download from the Forge, to hide unfinished code or exclude deployment of a feature that is not intended for the current release.</p><h3>Application Staging — QA -&gt; PP</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*osP7I8FcjRFl1xkVfKnw_w.png" /></figure><ul><li>After release <strong>approval</strong> from Product Owner, SD role <strong>requests</strong> deployment to PP and PRD<br>- Tentative deployment dates are confirmed<br>- Factory team is notified and kept in the loop</li><li>Runbook is <strong>handed over</strong> to Product Ops who executes it <strong>step-by-step </strong>if there are <strong>no cross-team</strong> dependencies</li><li>Factory team <strong>takes over</strong> when release <strong>impacts</strong> other Products or requires Factory intervention (e.g. configurations)</li><li>Whenever deployment fails, Runbook needs to be reviewed and kept up-to-date</li></ul><h3>Application Staging — PP → PRD</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/613/1*-BkVTwAhYggI-EDWKFVikQ.png" /></figure><ul><li>Executed by Product Ops or Factory team on scheduled date, after <strong>successful execution</strong> in <strong>PP<br>- </strong>Runbook is executed <strong>step-by-step</strong> replicating the same procedure as in PP<br>- Factory must be <strong>aware</strong> of all PRD deployments (even if not executing them)</li><li>Release differences between PP and PRD environments must be limited to the minimum timespan for <strong>hot fixing</strong> purposes</li><li>Technical handover to Product Mnt/Ops is done according to the <strong>handover checklist</strong></li></ul><p><strong>Testing Strategy</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*s5aMpG9Zteq1ehY7I0OEXg.png" /></figure><ul><li><strong>Unit</strong> testing performed by Dev/SD roles in <strong>DEV</strong></li><li><strong>Integration</strong> testing performed by SD role in <strong>DEV or QA</strong> (if mocks are used)</li><li>Acceptance/Regression testing performed by testers in QA<br> — Release is <strong>accepted</strong> by PO</li><li><strong>Deployment</strong> plans are <strong>validated</strong> in <strong>PP</strong> prior to PRD execution</li><li><strong>Performance/Load testing</strong> performed by Factory team in <strong>PP</strong> with SD support<br> — Can halt release progression to PRD</li><li><strong>Smoke</strong> tests performed by Ops role after deploying to <strong>PP</strong> or <strong>PRD</strong></li></ul><h3>Operational Monitoring:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/293/1*Kl61r22Q2A3C3v7mxhZdGQ.png" /></figure><ul><li>Covers <strong>infrastructure, platform</strong> and <strong>application</strong> layers</li><li>Uses server-side and client-side metrics collected in <strong>real-time</strong></li><li>Product Ops engages in <strong>product-specific</strong> monitoring, oriented towards assessing business impacts</li><li>Factory Ops focus in <strong>platform-wide</strong> monitoring activities and global platform health check</li><li>Monitoring should be <strong>proactive </strong>to identify trends and anticipate problems</li><li>Collected <strong>findings</strong> to be incorporated into new release cycles</li></ul><p>Now that we have a nice release process lets talk about Support.<br>In our next article of this series we will see how we should handle bugs, especially when they are critical and happens on Production environment that is already being used.</p><blockquote>If you want to enhance even more your release cycle management and go for a more automated and advanced CI/CD approach you should read<a href="https://success.outsystems.com/Documentation/Best_Practices/Lifecycle/Application_Lifecycle_Management_in_OutSystems%3A_CI%2F%2FCD"> this other article </a>from OutSystems related to Application Lifecycle Management and CI/CD.</blockquote><p>Next: <a href="https://medium.com/@raphael.ranieri/outsystems-devops-model-series-4-support-366b796365ac">5 — Support</a></p><p>Previous: <a href="https://medium.com/@raphael.ranieri/outsystems-devops-model-series-3-access-control-policy-2ee24bfca6d7">3 — Access Control Policy</a></p><p>OutSystems DevOps Series Articles:</p><p><a href="https://medium.com/@raphael.ranieri/outsystems-devops-model-series-1-introduction-5d20ebdbf36a">1 — Introduction</a></p><p><a href="https://medium.com/@raphael.ranieri/outsystems-devops-model-series-2-requirements-304f5e6247f0">2 — Requirements</a></p><p><a href="https://medium.com/@raphael.ranieri/outsystems-devops-model-series-3-access-control-policy-2ee24bfca6d7">3 — Access Control Policy</a></p><p><a href="https://medium.com/@raphael.ranieri/outsystems-devops-model-series-4-release-management-b47b1285479d">4 — Release Management</a></p><p><a href="https://medium.com/@raphael.ranieri/outsystems-devops-model-series-4-support-366b796365ac">5 — Support</a></p><blockquote>Disclaimer: Most of the material was gotten from OutSystems documents</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b47b1285479d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OutSystems DevOps Model Series: 3-Access Control Policy]]></title>
            <link>https://raphael-ranieri.medium.com/outsystems-devops-model-series-3-access-control-policy-2ee24bfca6d7?source=rss-1bf90dabdcea------2</link>
            <guid isPermaLink="false">https://medium.com/p/2ee24bfca6d7</guid>
            <category><![CDATA[support]]></category>
            <category><![CDATA[outsystems]]></category>
            <category><![CDATA[release-management]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[access-control]]></category>
            <dc:creator><![CDATA[Raphael Ranieri]]></dc:creator>
            <pubDate>Thu, 17 Mar 2022 20:34:57 GMT</pubDate>
            <atom:updated>2022-03-17T20:34:57.159Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vR0r8a6pQMuT2P15H8NpOw.jpeg" /></figure><p>Once we have <strong>4 environments</strong>, we can use them to define a proper security access policy and keep things organized.</p><p><strong>However, each environment will have a well-defined objective, </strong>and we must make sure we know it, they are:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zb6ctskGJSaQBjIG8H7eoQ.jpeg" /></figure><p>As you can see, each environment <strong>really </strong>have a well-defined objective!</p><p>This is important because this way we can control what will be done in each of them and most important <strong>who </strong>will have access to do each activity.</p><p>To limit access to each environment and define who can do what, OutSystems provides a very good access control mechanism in LifeTime.</p><p>In a way that each IT User will have a specific main role, and can even have additional privileges in specifics applications.</p><p>To leverage that we have to use LifeTime’s <strong>roles and teams.</strong></p><p>A detailed information on how to create roles and teams can be found <a href="https://success.outsystems.com/Documentation/11/Managing_the_Applications_Lifecycle/Manage_IT_Users/Understand_the_Permission_Model_for_IT_Users">here</a>, <a href="https://success.outsystems.com/Documentation/11/Managing_the_Applications_Lifecycle/Manage_IT_Users">here</a> and <a href="https://success.outsystems.com/Documentation/11/Managing_the_Applications_Lifecycle/Manage_IT_Users/Create_an_IT_Team">here</a>.</p><p>I will not dive in the details of the process on how to create them but I will say which roles and teams we should have to keep our model organized.</p><blockquote>A Lifetime Team is group of Applications and Users.</blockquote><blockquote>Each User can be part of different Lifetime Teams and have different roles in them.</blockquote><blockquote>Each Application however, can only be part of one Lifetime Team.</blockquote><p>To achieve a good level of security and the correct granularity of activities, we will need the following roles and teams:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/1*_9DEDF3RRQzIelrLqHSzMA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/1*XOBlkJx_XrZEqtQgmUR9Pw.png" /></figure><blockquote><em>Please note that when we say Product Team(s) this means that each Product will have a different team using the same roles for its applications. While the Factory Team is only one, and will be responsible for the factory administration and shared components.</em></blockquote><p>Each of these roles will have different permissions level on each environment, the permissions for each role can be found in this table:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/1*bh8XGTBMoW7uk7fgy6Pitw.png" /></figure><h3>*Consumer Role</h3><p>As you must have noticed a special case in the <strong>Product Team</strong> is the consumer role.</p><p>When you have specific <strong>Applications </strong>in your <strong>Product </strong>that can be shared with <strong>different </strong>Products you will have to split your LifeTime Team and assign the consumer role to each of the Users from other <strong>Teams </strong>that will reuse it but not change it.</p><p>To understand even better check the next image:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*Ho_uhSxc1q7tCV9xbk1EMg.png" /></figure><p>Notice that each Product has 2 teams.</p><p>One for shared applications and another one for non-shared applications.</p><h3>High Level View</h3><p>So far, this is what we will have, when looking for the environments and roles:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*sMdnQosP35uoBcMQNdANyQ.png" /></figure><p>Now that we defined all roles and access levels, lets see what each role will be responsible for in our release cycle. On the next article of this series we will talk about Release Management Cycle and what are the activities of each role in it.</p><p>Next: <a href="https://medium.com/@raphael.ranieri/outsystems-devops-model-series-4-release-management-b47b1285479d">4 — Release Management</a></p><p>Previous: <a href="https://medium.com/@raphael.ranieri/outsystems-devops-model-series-2-requirements-304f5e6247f0">2 — Requirements</a></p><p>OutSystems DevOps Series Articles:</p><p><a href="https://medium.com/@raphael.ranieri/outsystems-devops-model-series-1-introduction-5d20ebdbf36a">1 — Introduction</a></p><p><a href="https://medium.com/@raphael.ranieri/outsystems-devops-model-series-2-requirements-304f5e6247f0">2 — Requirements</a></p><p><a href="https://medium.com/@raphael.ranieri/outsystems-devops-model-series-3-access-control-policy-2ee24bfca6d7">3 — Access Control Policy</a></p><p><a href="https://medium.com/@raphael.ranieri/outsystems-devops-model-series-4-release-management-b47b1285479d">4 — Release Management</a></p><p><a href="https://medium.com/@raphael.ranieri/outsystems-devops-model-series-4-support-366b796365ac">5 — Support</a></p><blockquote>Disclaimer: Most of the material was gotten from OutSystems documents</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2ee24bfca6d7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OutSystems DevOps Model Series: 2-Requirements]]></title>
            <link>https://raphael-ranieri.medium.com/outsystems-devops-model-series-2-requirements-304f5e6247f0?source=rss-1bf90dabdcea------2</link>
            <guid isPermaLink="false">https://medium.com/p/304f5e6247f0</guid>
            <category><![CDATA[outsystems]]></category>
            <category><![CDATA[release-management]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[support]]></category>
            <category><![CDATA[access-control]]></category>
            <dc:creator><![CDATA[Raphael Ranieri]]></dc:creator>
            <pubDate>Thu, 17 Mar 2022 20:34:08 GMT</pubDate>
            <atom:updated>2022-03-17T20:34:08.745Z</atom:updated>
            <content:encoded><![CDATA[<p>If you already used OutSystems in a real-life scenario you know that a standard license normally starts with 3 environments (Dev, QA and Prod) plus Lifetime:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QYDz0Ep3ksaji2SuzHo7kA.jpeg" /></figure><p><strong>However, is it enough?</strong></p><p>Well… <em>if you used OutSystems long enough in a real-life scenario</em>… you may answer no to this question.<br> <br>Especially when you are supporting mission critical apps that are already in production and still evolving, you most probably must have had issues with hotfixes and new releases trying to co-exist in the same lifecycle.</p><p>The problem becomes even worse when you have a<strong> large factory</strong> with lots of <strong>different apps</strong>, from <strong>different sponsors</strong> sharing common Libraries.</p><p>And add an extra layer of complexity when you have <strong>multiple squads</strong>, <strong>third party vendors and projects </strong>working on the same environment.</p><p>With all that being said, how can we still use OutSystems and Lifetime in an organized way in these scenarios?</p><p><strong>The good news is: </strong>That is possible! And with a little bit of planning this can be implemented right now with the Model we want to propose!</p><p><strong>The bad news is:</strong> You will need an extra environment on top of your 3 initial ones!</p><p>If you already have it… perfect!</p><p>Otherwise, this can be something you should consider, because it will make your life a lot easier.</p><p>Let’s start with the ‘why’!</p><blockquote>Why we need this extra environment?</blockquote><p>After that… once we understand it lets jump in the DevOps Model and understand how we keep it organized when using in a large factory, with lots of squads and different apps<em>.</em></p><blockquote><em>If you are already familiar with this concept you may want to jump straight to the part 3 of this series. Where we will talk about how to setup your environment in the proper way.</em></blockquote><p>Normally when we have 3 environments what we do is:</p><ul><li>Use <strong>DEV </strong>environment to develop</li><li>Once our development is completed, we use <strong>LifeTime </strong>to stage the code to the <strong>QA </strong>environment.</li><li>On <strong>QA</strong>, the testers will test it and accept the features.</li><li>Then, after the testing we finally use <strong>LifeTime </strong>again to stage to <strong>Prod </strong>where the end users will use it.</li></ul><p>You can have an idea looking at the follow image:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bEOsceoQKsrQbuvvILVsXA.jpeg" /></figure><p>However, what would happen if:</p><ul><li>My app is already been used in <strong>Prod </strong>by my end users.</li><li>Some new features are already being tested in <strong>QA </strong>by my testers.</li><li>And I find a critical issue in <strong>Prod </strong>that I must handle right away?</li></ul><p>I can’t use the normal path (Dev -&gt; QA -&gt; Prod) because if I do it I will release features that were not accepted and tested to Prod.</p><p>The only answer would be to fix it directly in Prod!</p><p>And ideally, we don’t want to do that! For numerous reasons such as:</p><ul><li>I will not have a proper test because I’m doing it directly in Prod.</li><li>I can delete prod information.</li><li>I can break other features.</li><li>And the list goes on</li></ul><p>It is a huge risk to change thing directly on Prod! So, what we can do to solve this?</p><p>The answer is… add an extra environment:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KWzVU2yvLYzL1Zf3MOqN7Q.jpeg" /></figure><p>Let’s call this new environment <strong>‘Pre-Prod’.</strong></p><p>Once we have this environment what we can do is to use <strong>QA </strong>to test the new features, and keep the <strong>Pre-Prod</strong> with the same code version as <strong>Prod</strong>. This way when we find a critical issue, we can fix it on<strong> Pre-Prod</strong> where we will have time to test and then stage it to <strong>Prod</strong>.</p><p>Now that we understand the main reason and benefit of this extra environment let’s go to the next article of this series where we will talk about Security and Access Control on all these environments.</p><p>Next: <a href="https://medium.com/@raphael.ranieri/outsystems-devops-model-series-3-access-control-policy-2ee24bfca6d7">3 — Access Control Policy</a></p><p>Previous: <a href="https://medium.com/@raphael.ranieri/outsystems-devops-model-series-1-introduction-5d20ebdbf36a">1 — Introduction</a></p><p>OutSystems DevOps Series Articles:</p><p><a href="https://medium.com/@raphael.ranieri/outsystems-devops-model-series-1-introduction-5d20ebdbf36a">1 — Introduction</a></p><p><a href="https://medium.com/@raphael.ranieri/outsystems-devops-model-series-2-requirements-304f5e6247f0">2 — Requirements</a></p><p><a href="https://medium.com/@raphael.ranieri/outsystems-devops-model-series-3-access-control-policy-2ee24bfca6d7">3 — Access Control Policy</a></p><p><a href="https://medium.com/@raphael.ranieri/outsystems-devops-model-series-4-release-management-b47b1285479d">4 — Release Management</a></p><p><a href="https://medium.com/@raphael.ranieri/outsystems-devops-model-series-4-support-366b796365ac">5 — Support</a></p><blockquote>Disclaimer: Most of the material was gotten from OutSystems documents</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=304f5e6247f0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OutSystems DevOps Model Series: 1-Introduction]]></title>
            <link>https://raphael-ranieri.medium.com/outsystems-devops-model-series-1-introduction-5d20ebdbf36a?source=rss-1bf90dabdcea------2</link>
            <guid isPermaLink="false">https://medium.com/p/5d20ebdbf36a</guid>
            <category><![CDATA[release-management]]></category>
            <category><![CDATA[support]]></category>
            <category><![CDATA[outsystems]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[access-control]]></category>
            <dc:creator><![CDATA[Raphael Ranieri]]></dc:creator>
            <pubDate>Thu, 17 Mar 2022 20:33:23 GMT</pubDate>
            <atom:updated>2022-03-17T20:44:36.615Z</atom:updated>
            <content:encoded><![CDATA[<p>This article is the first one of a series that will talk about DevOps Model within OutSystems</p><p>As it is bigger than usual, I thought it would be nice to start with the main objective.</p><p>At the end of this article, you will know how to properly define a model to work in a large OutSystems factory with multiple squads and projects co-existing and also how to support your apps while keeping a simple continuous delivery approach in a secure and organized way with Lifetime.</p><p>We will talk about:</p><ul><li>Access Control Policies</li><li>Release Management Cycles</li><li>Support process</li><li>And more</li></ul><p>If this is what you are looking for… keep reading.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KWzVU2yvLYzL1Zf3MOqN7Q.jpeg" /></figure><p>First of all. Let’s talk about definitions!</p><p>What is DevOps?</p><p>Our most famous “common sense definitor” <strong>Wikipedia </strong>defines it as:</p><blockquote><strong>DevOps</strong> is a set of practices that combines software development (<em>Dev</em>) and IT operations (<em>Ops</em>). It aims to shorten the systems development life cycle and provide continuous delivery with high software quality. DevOps is complementary with Agile software development; several DevOps aspects came from the Agile methodology.</blockquote><p><strong>Amazon AWS i</strong>n the other hand says:</p><blockquote><strong>DevOps </strong>is the combination of cultural philosophies, practices, and tools that increases an organization’s ability to deliver applications and services at high velocity: evolving and improving products at a faster pace than organizations using traditional software development and infrastructure management processes. This speed enables organizations to better serve their customers and compete more effectively in the market.</blockquote><p>If we look in the internet, we have all sort of definitions for the term DevOps.</p><p>However, none of them is an official definition. <strong>The truth is that it doesn’t have a universal definition yet.</strong></p><p>Anyway, we can agree that it is a mix of processes and methods to enhance the agility of delivery according to most definitions.</p><p><strong>And how OutSystems helps with that?</strong></p><p>If you know OutSystems well, you may also know that one of the definitions for it is: <strong>full</strong>-<strong>stack</strong> <strong>&amp;</strong> <strong>full lifecycle platform.</strong></p><p>By<strong> full lifecycle</strong>, they mean that OutSystems already delivery a way to easily promote your code across different environments doing its own impact analysis.</p><p>What we can call a <strong>simple delivery pipeline.</strong></p><p>Even if it lacks a integration layer for automated tests out-of-the-box, it still is a very powerful tool to help with deployments and can be called a simple tool for CD (continuous delivery).</p><p>All this is done using <strong>LifeTime</strong>, a very powerful default tool that OutSystems provides as part of their license.</p><p>However, as <strong>spider man’s uncle Ben</strong> used to say:</p><blockquote>“With great power comes great responsibility”</blockquote><p>And because of that we need to make sure this powerful tool is well configured and capable of doing everything that we need while ensuring security and scalability.</p><p>So… Let’s begin our journey and see what we need to make it happen.</p><p>On the next article we will talk about the requirements for this model we are proposing.</p><p>Next: <a href="https://medium.com/@raphael.ranieri/outsystems-devops-model-series-2-requirements-304f5e6247f0">2 — Requirements</a></p><p>OutSystems DevOps Series Articles:</p><p><a href="https://medium.com/@raphael.ranieri/outsystems-devops-model-series-1-introduction-5d20ebdbf36a">1 — Introduction</a></p><p><a href="https://medium.com/@raphael.ranieri/outsystems-devops-model-series-2-requirements-304f5e6247f0">2 — Requirements</a></p><p><a href="https://medium.com/@raphael.ranieri/outsystems-devops-model-series-3-access-control-policy-2ee24bfca6d7">3 — Access Control Policy</a></p><p><a href="https://medium.com/@raphael.ranieri/outsystems-devops-model-series-4-release-management-b47b1285479d">4 — Release Management</a></p><p><a href="https://medium.com/@raphael.ranieri/outsystems-devops-model-series-4-support-366b796365ac">5 — Support</a></p><blockquote>Disclaimer: Most of the material was gotten from OutSystems documents</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5d20ebdbf36a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Speed up development with OutSystems by standardizing External Syncs Behaviors]]></title>
            <link>https://raphael-ranieri.medium.com/speed-up-development-with-outsystems-by-standardizing-external-syncs-behaviors-73f0a772b112?source=rss-1bf90dabdcea------2</link>
            <guid isPermaLink="false">https://medium.com/p/73f0a772b112</guid>
            <category><![CDATA[outsystems-development]]></category>
            <category><![CDATA[sync]]></category>
            <category><![CDATA[patterns]]></category>
            <category><![CDATA[synchronization]]></category>
            <category><![CDATA[outsystems]]></category>
            <dc:creator><![CDATA[Raphael Ranieri]]></dc:creator>
            <pubDate>Tue, 28 Sep 2021 21:45:28 GMT</pubDate>
            <atom:updated>2021-09-29T00:05:06.924Z</atom:updated>
            <content:encoded><![CDATA[<p>A very common requirement in software development is to be able to Synchronize data from an external system in order to cache this data in your own database and thus, among other things, be able to perform data mashup or even to improve your system’s performance.</p><p>With OutSystems this is no different and I think it’s no exaggeration to say that in 95% of the projects I participated in I had to implement something like that.</p><p>We can even understand how common this requirement is by looking at <a href="https://success.outsystems.com/Support/Enterprise_Customers/Maintenance_and_Operations/Designing_the_Architecture_of_Your_OutSystems_Applications/05_Integration_Patterns_for_Core_Services_Abstraction">this </a>OutSystems documentation article (which I personally think is one of the best ever created) that specifically addresses patterns for this.</p><p>Knowing this, over the years I’ve started to identify useful features and common behaviors that could be generalized and standardized regardless of the type or the nature of the Sync we are trying to integrate.</p><p>With that in mind I ended up creating a very simple to use pattern that allows me to be even more efficient with OutSystems and recently I thought it was a good time to share with the community.</p><p>Then, I created a forge component with a generic module that can be used to accelerate your way of synchronize data with OutSystems.</p><p><a href="https://www.outsystems.com/forge/component-overview/11575/rr-generic-synch-pattern">Here is the link.</a></p><h3><strong>Main Features:</strong></h3><ul><li>Keep track of all steps, logs and errors that happens on your synchs.</li><li>Manage different synch types status, periodicity and other properties in a centralized place</li><li>Manually start a synch if needed.</li><li>Keep the history of the synch runs if you want. Also delete it after a specific time if you don’t need anymore.</li><li>Define the default behavior and limit access to change the synch properties using roles.</li><li>Don’t worry about very long processes, the synch will run in background timers which have a control to end and restart if the session is reaching the timeout. (It will stop and on the next run start where it ended on the previous step)</li></ul><h3><strong>What the component has:</strong></h3><p>To help use this pattern I decided to explain in more details how you can make it work with your own code.</p><p>Once you download the component you will see 2 modules. They are just generic modules with common screens and actions that have to be customized:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/474/1*vXC72jEx7v23EPZcz3RfqQ.png" /></figure><p>In order to explain the usage, let’s analyze the Demo App also included on forge looking at its architecture:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/597/1*fFp961Y9miVXN_nrscKlOA.png" /></figure><p>To help me demonstrate the usage, I create 3 more modules besides the ones from the component.</p><p>They are:</p><p><strong>RRGenericSynchPatternSample_DB</strong></p><p>A module that holds my entities and CRUD actions. In a real scenario it would be my real entities that I want to populate with the data from an external source</p><p><strong>RRGenericSynchPatternSample_IS</strong></p><p>My Integration Service Module which consumes external APIs and normalize the data to be consumed by my other OutSystems’ apps</p><p><strong>RRGenericSynchPatternSample_API</strong></p><p>A module created just to mimic an external source. It just exposes APIs to be consumed by the IS module. In a real scenario it would not exist, since the external source would be another system</p><p>With that being said let’s start.</p><h3><strong>How to use?</strong></h3><p>To start using and customizing it we just need <strong>8 steps</strong></p><p><strong>1 — Clone the modules:</strong></p><p>The first step after downloading the component is to clone it to ensure it can be used multiple times.</p><p><strong>2 — Rename the modules:</strong></p><p>So, to keep it organized, it’s a good idea to rename it.</p><p>A quick way is to look up the string ‘ModuleName’ in ServiceStudio and replace it with your own module name. (Remember that long names can be a problem as we have some entities and attributes with ModuleName in the name and since the attributes and entity name have a character limit this can lead to unwanted behavior)</p><p><strong>3 — Create your Synch Type in Static Entity:</strong></p><p>The third step is to create a new SynchType record in the Synch_Type Static Entity so that you can manage them</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/385/1*SpIvVjDWJhutnojzsR8RwQ.png" /></figure><p>You will see some sample types that can be used as guides.</p><p><strong>4 — Customize the specific actions for your Sync:</strong></p><p>After creating the type we also have to create 2 specific actions for each sync type, to make sure your logic can be as you want.</p><p>First copy the ‘Synch_GenericSample’ folder to serve as a guide and customize your actions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/375/1*4gdskxCA41ogxIcXqRGfUQ.png" /></figure><p>Keep in mind that if your use case is to have Multiple Runs (MR) the ‘Synch_GenericSampleMultipleRuns’ folder should be used instead:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/381/1*zKcESl5z4BLXFRauCkuViQ.png" /></figure><p>We will see more details about MR in the end of this article</p><p><strong>5 — Fisrt Action to be customized, Synch_<em>NameOfYourSynch</em></strong></p><p>Inside the folder you copied you will find an action named <em>SynchGeneric.</em></p><p>You should change the generic part of the name to something that can help you identify it.</p><p>Inside it you will have to call your data source action (Probably from IS Module) and delete the variable list to use the new List from your data source action, the list variable is only being used as a placeholder at this time:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/601/1*byYJiPtAnFWksxEpd2Q6eQ.png" /></figure><p>You will have to handle the errors replacing the old list variable by the new list from your actions:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*rf-oZ7HKAsaex7jH_m63Hw.png" /></figure><p>If you look at the Sample App you can see the final result, and you should have something like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*ybAsLYH9NaECsZ6AkdoDwA.png" /></figure><p>6 —<strong>Second Action to be customized, CommitSingle_<em>YourTypeName:</em></strong></p><p>The second action is the <em>CommitSingleGenericSample.</em></p><p>It will be responsible to validate and persist each of your records on the DB.</p><p>The record input parameter should match the type of your data source list response:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*Lehyf-K_VE4hI1OWMHTb_A.png" /></figure><p>Looking at the Sample you can have an idea:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/601/1*W6MFPi_DXQOsLemcomrxvg.png" /></figure><p><strong>7 — Create the 3 timers:</strong></p><p>Each sync type must have 3 different timers.<br>So create 3 timers to be used by your Sync and change your SynchTypeId:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/190/1*zFmzvLieeW-HQDejqsjJ8g.png" /></figure><p>They will be used to trigger your logic.</p><p>8 —<strong> Change the switches needed:</strong></p><p>Finally, set the correct timers wakes and actions for the switches. Don’t worry, within the module you’ll see reminders in the warning tab to help you figure out where to do this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*OOwPqm13somos66yjSvKDg.png" /></figure><p>And that’s it!</p><p>Just repeat this same process for new sync types (except steps 1 and 2) and you’ll have the same features and a good pattern for all of them.</p><p>In the ‘StartsSynch’ action, you will find some instructions to remind you what you need:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*MKeWbjr8kE9HP0j2pe5JhA.png" /></figure><p>You’ll be able to set the frequency which you want to run your sync, view the history of executions, see possible errors, set the sync as active or inactive and much more. We’ll see it in action at the end if this article:)</p><h3><strong>Other Features:</strong></h3><p>There are some other features that are out-of-the-box.</p><p><strong>Multiple Runs (MR) and Last Date:</strong></p><p>For example, in the synchType entity you will see 2 attributes:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/183/1*BKA-yluFQ3y7GWmDd8b8xg.png" /></figure><p><em>HasLastDate </em>and <em>CanHaveMultipleRuns</em></p><p>If set as true for your Synch Type it will slightly change the Synch behaviour.</p><p>HasLastDate can be used to set the base date to sync to fetch only offset data. If your external API supports a datetime parameter where you can change the date only after a specific date, for example, you can use it. It can also be changed manually in the UI if you want to replace it.</p><p>The CanHaveMultipleRuns field can be used if you need to call the source data action more than once in the same sync. Let’s say you already have departments in your solution and for each department you have to call an API to fetch employees. You can use this to make it happen. Remember that in this case some other things must be customized, we also leverage some other fields to help this process, for example GenericIdentifier or LineLvl2 of TempSynch Entity:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/225/1*PhCoyhfB8-njKKVGq2rvGg.png" /></figure><p><strong>Site Properties:</strong></p><p>In addition, we have some site properties that can change the behavior of the system:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/343/1*PxPzpr46ggmQBbf6bL8Bug.png" /></figure><p>isActiveManagementEnabled and isPeriodicityManagementEnabled, for example, will enable and disable the end user’s ability to change some properties of each synchronization.<br>This can be used if you want to leverage logs and logic but don’t want the user to change anything.</p><p><strong>Delete pattern at the end of the Synch:</strong></p><p>In the sample app, you’ll find a way to remove items that haven’t been synced as well. Depending on your use case, it might be helpful.:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*It62ouA255MzesrRttIs8A.png" /></figure><p>You can also create a pattern to invalidate the cache, if you wish, in case of changes.</p><h3>The sample in Action:</h3><p>Before using the sample, make sure you configure the correct username / password and integration link to be used in the Service Center.</p><p>In the demo app we have 3 different types of synch.</p><p><strong>The first one is a Department Synch:</strong></p><p>In the back office you can define whether synchronization is enabled or disabled, how often you want to run and even start a manual run.</p><p>After each round, a log is created where you can check what happened.</p><p>You can always check the entire history too.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bdAWiNgISSCRM8ac0GPRzA.gif" /></figure><p><strong>The second sample is an Employee Synch.</strong></p><p>This one has some validation to check if the departments already exist and if not the specific item won’t be created.</p><p>Of course, we can also change all properties for this synch:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*inTw36fRgHmd8jtlD_vBjw.gif" /></figure><p>In order to show an error case, I manually deleted some of the departments from my database and the result was as expected. After that, I ran department sync again and then I ran employee sync as well, and once again the sync was successful:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4B-6v_5NYzwuXNZoZJD9Fw.gif" /></figure><p><strong>The third sample is a special case, it is the Employee By Department Synch.</strong></p><p>This synch is a case of MR (Multiple Runs).</p><p>Where we must use the same process for different items.<br>For example, imagine that your external system only provides an API to fetch the Employees of each Department individually.</p><p>Therefore, we have to run the synch for each department. And this is the case with this sample.<br>You can see that before changing properties or manually initiating a synch, you must select which instance to use:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ckKP0bnLP3Ats2nHapxaJA.gif" /></figure><p>That’s it!<br>I really hope it helps you and your team be more efficient than ever when using Synchs</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=73f0a772b112" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>