<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>How to Create Flexible Processes</title><link>https://community.appian.com/success/w/guide/3064/how-to-create-flexible-processes</link><description /><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>How to Create Flexible Processes</title><link>https://community.appian.com/success/w/guide/3064/how-to-create-flexible-processes</link><pubDate>Tue, 23 Apr 2024 13:12:00 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6bcb150c-7b0d-4f6d-902f-c2ab47e40283</guid><dc:creator>Appian Max Team</dc:creator><comments>https://community.appian.com/success/w/guide/3064/how-to-create-flexible-processes#comments</comments><description>Current Revision posted to Guide by Appian Max Team on 4/23/2024 1:12:00 PM&lt;br /&gt;
&lt;div style="margin:8px 16% 8px 8%;"&gt;
&lt;h2 id="skills_covered"&gt;Skills Covered&lt;/h2&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;This&amp;nbsp;article outlines how to make flexible, reusable, and dynamic workflows in Appian in an effort to make design, maintenance, and change management easy.&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;&lt;a href="/success/w/article/3048/creating-memory-efficient-models"&gt;Creating Memory Efficient Models &lt;/a&gt;covers many useful strategies for designing process models that follow best practices. This article&amp;nbsp;will dive deeper into design patterns that will assist with creating workflows with many sequential steps. Creating an entire workflow into a single process model has negative memory implications, is difficult to maintain, and can result in backwards compatibility issues for future releases. Below are some strategies for designing processes that alleviate those risks.&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;This type of design can be used for all applications whether they are data-centric or focus more on a linear task-based workflow.&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="legacy_design_pattern"&gt;Legacy Design Pattern&lt;/h2&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The image below shows a simple example of a model that contains all parts of a workflow. Designing all parts of the workflow into a single process provides a readable picture of the overall workflow, but this type of design introduces problems, even though it is nicely broken into sub-processes:&lt;/span&gt;&lt;/p&gt;
&lt;ul style="font-size:115%;"&gt;
&lt;li&gt;&lt;strong&gt;Memory&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;- this parent process instance will be active and its memory in the environment until the full workflow is complete, a timeline the designer cannot control.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Model size&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;- as more functionality is added, this process model will continue to grow over time, which is difficult to maintain.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Backwards compatibility&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;- subsequent releases that change the model have to account for active instances of this version of the model since it lives for so long.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Restarting instances&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;- there is no way to start a process at approval step 1 or approval step 2 when the need arises, as the sub-processes are not independent.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/Flex-SS1.jpeg" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;However, designers can construct their process design to avoid these types of problems by planning ahead and using some of the strategies outlined below.&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="asynchronous_process_linking"&gt;Asynchronous Process Linking&lt;/h2&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;Any workflow that requires multiple touches or approvals from different users has logical break points that can be leveraged in the model design. At the point of a hand-off, call the next step in the flow as an asynchronous process model so that the first model can complete and be archived/deleted, while the rest of the workflow continues. Note that the &lt;a href="https://docs.appian.com/suite/help/latest/Sub-Process_Activity.html"&gt;Sub-Process&lt;/a&gt; node will keep the next process on the same execution engine, but it is convenient when developing and monitoring instances since the sub-process can be opened directly from the parent within the modeler. For scenarios when a parent process starts multiple child processes, use the &lt;a href="https://docs.appian.com/suite/help/latest/Start_Process_Smart_Service.html"&gt;Start Process&lt;/a&gt; node to load balance across execution engines. Using the same example as used for explaining the legacy design pattern, see the image below for an example model that uses this alternate design for the submission step:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/1960x1092/__key/communityserver-wikis-components-files/00-00-00-00-46/Asynchronous-1.jpeg" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;After the submission comes an approval and based on the result of that approval, the process that comes next in the workflow will depend on the decision from the approver. While a send-back in a process model is usually designed as a path that returns to a previous node in the model, this design pattern calls that first step in a send-back loop by continuing forward, starting a new instance of the first step. With some simple updates to the submission model, it can handle the scenario of a first time request or a send-back. The image below depicts how this design pattern can handle the described scenario:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/1960x1092/__key/communityserver-wikis-components-files/00-00-00-00-46/Asynchronous-2.jpeg" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The process linking design pattern is useful because it:&lt;/span&gt;&lt;/p&gt;
&lt;ul style="font-size:115%;"&gt;
&lt;li&gt;Breaks up a large and sequential process model into a series of smaller&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;standalone&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;models.&lt;/li&gt;
&lt;li&gt;Results in a better overall memory profile.&lt;/li&gt;
&lt;li&gt;Gives more flexibility for making changes in future releases of the application.&lt;/li&gt;
&lt;li&gt;Makes reading the process sizing tab within the Health Check simpler since there is only one active instance per request workflow without the parent model that orchestrates the workflow.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="restartable_processes"&gt;Restartable Processes&lt;/h2&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;When using a data driven design, there are more opportunities for developers to design with flexibility in mind. Consider the example above. The request data is likely passed from the submission model to the approval model, but the approval model could also be adapted to read from a data source if only the request id, not all the request data, is passed to it. This provides utility when a support engineer needs to make a change and restart a task or when process instances need to be migrated from one Appian environment to another. These are use cases that are hard to meet with large process models containing all the workflow steps, but easy to meet with these types of flexible designs. The image below shows that the model will go directly to the user input task if all the data is passed as parameters, but will call a script task to query the data if those parameters are not passed:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/1960x1092/__key/communityserver-wikis-components-files/00-00-00-00-46/Asynchronous-3.jpeg" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;If restarting a large number of process instances from the database, a management process model will need to determine what model each request needs initiated. Only the ids and statuses are needed from the database to do this and the new process instances can be started by simply passing the request id. This type of model can be created once and used in a variety of scenarios. The image below shows an example management model that is starting process instances based on data in the database:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/Flex-SS5.jpeg" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The restartable process design pattern is useful because it:&lt;/span&gt;&lt;/p&gt;
&lt;ul style="font-size:115%;"&gt;
&lt;li&gt;Gives flexibility when resolving issues&amp;nbsp;with active processes in Production.&lt;/li&gt;
&lt;li&gt;Allows process instances to be created or restarted at the correct workflow step based on database data.&lt;/li&gt;
&lt;li&gt;Assists in migrating process instances from one Appian environment to another.&lt;/li&gt;
&lt;li&gt;Helps developers test that all data is written correctly to the database during application development.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="router_process_model"&gt;Router Process Model&lt;/h2&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;To be even more flexible, a helper process model can be used to dynamically choose what process model to start next based on rules and not explicit flow in the process model. This is particularly useful when workflows change in the middle of a running process, determined by a data driven workflow that can be managed by end-users. Expressions rules will determine what process to start next via the Start Process Node, based on the data for the request. This keeps reusable logic contained in a single process that can be called in multiple places. The image below shows an example process model that does this:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/Flex-SS6.jpeg" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The router model would be called at the end of each process in the workflow as shown below. Note that the logic regarding which step occurs next does not have to be put into the approval model anymore. This makes updates to running instances easier because a deployed change to the router model will be used by all active instances, which can be extremely powerful. The images below show the router model being used in the same example scenario described in the above sections:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/Flex-SS7.jpeg" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/Flex-SS8.jpeg" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The router model design pattern is useful because it:&lt;/span&gt;&lt;/p&gt;
&lt;ul style="font-size:115%;"&gt;
&lt;li&gt;Allows for dynamic routing of workflows based on rules&lt;/li&gt;
&lt;li&gt;Simplifies process model changes required for workflow updates&lt;/li&gt;
&lt;li&gt;Makes restarting processes based on database data even easier&amp;nbsp;since it can be used within the management process model described earlier&lt;/li&gt;
&lt;/ul&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;Using all or a subset of the design patterns outlined above will give developers far more flexibility managing live applications and planning for subsequent releases.&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: design patterns, Architecture&lt;/div&gt;
</description></item><item><title>How to Create Flexible Processes</title><link>https://community.appian.com/success/w/guide/3064/how-to-create-flexible-processes/revision/9</link><pubDate>Tue, 31 Oct 2023 17:16:24 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6bcb150c-7b0d-4f6d-902f-c2ab47e40283</guid><dc:creator>Kim Day</dc:creator><comments>https://community.appian.com/success/w/guide/3064/how-to-create-flexible-processes#comments</comments><description>Revision 9 posted to Guide by Kim Day on 10/31/2023 5:16:24 PM&lt;br /&gt;
&lt;div style="margin:8px 16% 8px 8%;"&gt;
&lt;h2 id="skills_covered"&gt;Skills Covered&lt;/h2&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;This&amp;nbsp;article outlines how to make flexible, reusable, and dynamic workflows in Appian in an effort to make design, maintenance, and change management easy.&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;&lt;a href="/success/w/article/3048/creating-memory-efficient-models"&gt;Creating Memory Efficient Models &lt;/a&gt;covers many useful strategies for designing process models that follow best practices. This article&amp;nbsp;will dive deeper into design patterns that will assist with creating workflows with many sequential steps. Creating an entire workflow into a single process model has negative memory implications, is difficult to maintain, and can result in backwards compatibility issues for future releases. Below are some strategies for designing processes that alleviate those risks.&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;This type of design can be used for all applications whether they are data-centric or focus more on a linear task-based workflow.&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="legacy_design_pattern"&gt;Legacy Design Pattern&lt;/h2&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The image below shows a simple example of a model that contains all parts of a workflow. Designing all parts of the workflow into a single process provides a readable picture of the overall workflow, but this type of design introduces problems, even though it is nicely broken into sub-processes:&lt;/span&gt;&lt;/p&gt;
&lt;ul style="font-size:115%;"&gt;
&lt;li&gt;&lt;strong&gt;Memory&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;- this parent process instance will be active and its memory in the environment until the full workflow is complete, a timeline the designer cannot control.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Model size&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;- as more functionality is added, this process model will continue to grow over time, which is difficult to maintain.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Backwards compatibility&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;- subsequent releases that change the model have to account for active instances of this version of the model since it lives for so long.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Restarting instances&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;- there is no way to start a process at approval step 1 or approval step 2 when the need arises, as the sub-processes are not independent.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/Flex-SS1.jpeg" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;However, designers can construct their process design to avoid these types of problems by planning ahead and using some of the strategies outlined below.&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="asynchronous_process_linking"&gt;Asynchronous Process Linking&lt;/h2&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;Any workflow that requires multiple touches or approvals from different users has logical break points that can be leveraged in the model design. At the point of a hand-off, call the next step in the flow as an asynchronous process model so that the first model can complete and be archived/deleted, while the rest of the workflow continues. Note that the &lt;a href="https://docs.appian.com/suite/help/latest/Sub-Process_Activity.html"&gt;Sub-Process&lt;/a&gt; node will keep the next process on the same execution engine, but it is convenient when developing and monitoring instances since the sub-process can be opened directly from the parent within the modeler. For scenarios when a parent process starts multiple child processes, use the &lt;a href="https://docs.appian.com/suite/help/latest/Start_Process_Smart_Service.html"&gt;Start Process&lt;/a&gt; node to load balance across execution engines. Using the same example as used for explaining the legacy design pattern, see the image below for an example model that uses this alternate design for the submission step:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/1960x1092/__key/communityserver-wikis-components-files/00-00-00-00-46/Asynchronous-1.jpeg" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;After the submission comes an approval and based on the result of that approval, the process that comes next in the workflow will depend on the decision from the approver. While a send-back in a process model is usually designed as a path that returns to a previous node in the model, this design pattern calls that first step in a send-back loop by continuing forward, starting a new instance of the first step. With some simple updates to the submission model, it can handle the scenario of a first time request or a send-back. The image below depicts how this design pattern can handle the described scenario:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/1960x1092/__key/communityserver-wikis-components-files/00-00-00-00-46/Asynchronous-2.jpeg" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The process linking design pattern is useful because it:&lt;/span&gt;&lt;/p&gt;
&lt;ul style="font-size:115%;"&gt;
&lt;li&gt;Breaks up a large and sequential process model into a series of smaller&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;standalone&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;models.&lt;/li&gt;
&lt;li&gt;Results in a better overall memory profile.&lt;/li&gt;
&lt;li&gt;Gives more flexibility for making changes in future releases of the application.&lt;/li&gt;
&lt;li&gt;Makes reading the process sizing tab within the Health Check simpler since there is only one active instance per request workflow without the parent model that orchestrates the workflow.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="restartable_processes"&gt;Restartable Processes&lt;/h2&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;When using a data driven design, there are more opportunities for developers to design with flexibility in mind. Consider the example above. The request data is likely passed from the submission model to the approval model, but the approval model could also be adapted to read from a data source if only the request id, not all the request data, is passed to it. This provides utility when a support engineer needs to make a change and restart a task or when process instances need to be migrated from one Appian environment to another. These are use cases that are hard to meet with large process models containing all the workflow steps, but easy to meet with these types of flexible designs. The image below shows that the model will go directly to the user input task if all the data is passed as parameters, but will call a script task to query the data if those parameters are not passed:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/1960x1092/__key/communityserver-wikis-components-files/00-00-00-00-46/Asynchronous-3.jpeg" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;If restarting a large number of process instances from the database, a management process model will need to determine what model each request needs initiated. Only the ids and statuses are needed from the database to do this and the new process instances can be started by simply passing the request id. This type of model can be created once and used in a variety of scenarios. The image below shows an example management model that is starting process instances based on data in the database:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/Flex-SS5.jpeg" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The restartable process design pattern is useful because it:&lt;/span&gt;&lt;/p&gt;
&lt;ul style="font-size:115%;"&gt;
&lt;li&gt;Gives flexibility when resolving issues&amp;nbsp;with active processes in Production.&lt;/li&gt;
&lt;li&gt;Allows process instances to be created or restarted at the correct workflow step based on database data.&lt;/li&gt;
&lt;li&gt;Assists in migrating process instances from one Appian environment to another.&lt;/li&gt;
&lt;li&gt;Helps developers test that all data is written correctly to the database during application development.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="router_process_model"&gt;Router Process Model&lt;/h2&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;To be even more flexible, a helper process model can be used to dynamically choose what process model to start next based on rules and not explicit flow in the process model. This is particularly useful when workflows change in the middle of a running process, determined by a data driven workflow that can be managed by end-users. Expressions rules will determine what process to start next via the Start Process Node, based on the data for the request. This keeps reusable logic contained in a single process that can be called in multiple places. The image below shows an example process model that does this:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/Flex-SS6.jpeg" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The router model would be called at the end of each process in the workflow as shown below. Note that the logic regarding which step occurs next does not have to be put into the approval model anymore. This makes updates to running instances easier because a deployed change to the router model will be used by all active instances, which can be extremely powerful. The images below show the router model being used in the same example scenario described in the above sections:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/Flex-SS7.jpeg" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/Flex-SS8.jpeg" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The router model design pattern is useful because it:&lt;/span&gt;&lt;/p&gt;
&lt;ul style="font-size:115%;"&gt;
&lt;li&gt;Allows for dynamic routing of workflows based on rules&lt;/li&gt;
&lt;li&gt;Simplifies process model changes required for workflow updates&lt;/li&gt;
&lt;li&gt;Makes restarting processes based on database data even easier&amp;nbsp;since it can be used within the management process model described earlier&lt;/li&gt;
&lt;/ul&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;Using all or a subset of the design patterns outlined above will give developers far more flexibility managing live applications and planning for subsequent releases.&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: design patterns, Architecture&lt;/div&gt;
</description></item><item><title>How to Create Flexible Processes</title><link>https://community.appian.com/success/w/guide/3064/how-to-create-flexible-processes/revision/8</link><pubDate>Thu, 08 Jun 2023 16:26:32 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6bcb150c-7b0d-4f6d-902f-c2ab47e40283</guid><dc:creator>joel.larin</dc:creator><comments>https://community.appian.com/success/w/guide/3064/how-to-create-flexible-processes#comments</comments><description>Revision 8 posted to Guide by joel.larin on 6/8/2023 4:26:32 PM&lt;br /&gt;
&lt;div style="margin:8px 16% 8px 8%;"&gt;
&lt;h2 id="skills_covered"&gt;Skills Covered&lt;/h2&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;This&amp;nbsp;article outlines how to make flexible, reusable, and dynamic workflows in Appian in an effort to make design, maintenance, and change management easy.&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;&lt;a href="/success/w/article/3048/creating-memory-efficient-models"&gt;Creating Memory Efficient Models &lt;/a&gt;covers many useful strategies for designing process models that follow best practices. This article&amp;nbsp;will dive deeper into design patterns that will assist with creating workflows with many sequential steps. Creating an entire workflow into a single process model has negative memory implications, is difficult to maintain, and can result in backwards compatibility issues for future releases. Below are some strategies for designing processes that alleviate those risks.&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;This type of design can be used for all applications whether they are data-centric or focus more on a linear task-based workflow.&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="legacy_design_pattern"&gt;Legacy Design Pattern&lt;/h2&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The image below shows a simple example of a model that contains all parts of a workflow. Designing all parts of the workflow into a single process provides a readable picture of the overall workflow, but this type of design introduces problems, even though it is nicely broken into sub-processes:&lt;/span&gt;&lt;/p&gt;
&lt;ul style="font-size:115%;"&gt;
&lt;li&gt;&lt;strong&gt;Memory&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;- this parent process instance will be active and its memory in the environment until the full workflow is complete, a timeline the designer cannot control.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Model size&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;- as more functionality is added, this process model will continue to grow over time, which is difficult to maintain.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Backwards compatibility&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;- subsequent releases that change the model have to account for active instances of this version of the model since it lives for so long.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Restarting instances&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;- there is no way to start a process at approval step 1 or approval step 2 when the need arises, as the sub-processes are not independent.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/Flex-SS1.jpeg" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;However, designers can construct their process design to avoid these types of problems by planning ahead and using some of the strategies outlined below.&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="asynchronous_process_linking"&gt;Asynchronous Process Linking&lt;/h2&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;Any workflow that requires multiple touches or approvals from different users has logical break points that can be leveraged in the model design. At the point of a hand-off, call the next step in the flow as an asynchronous process model so that the first model can complete and be archived/deleted, while the rest of the workflow continues. Note that the &lt;a href="https://docs.appian.com/suite/help/latest/Sub-Process_Activity.html"&gt;Sub-Process&lt;/a&gt; node will keep the next process on the same execution engine, but it is convenient when developing and monitoring instances since the sub-process can be opened directly from the parent within the modeler. For scenarios when a parent process starts multiple child processes, use the &lt;a href="https://docs.appian.com/suite/help/latest/Start_Process_Smart_Service.html"&gt;Start Process&lt;/a&gt; node to load balance across execution engines. Using the same example as used for explaining the legacy design pattern, see the image below for an example model that uses this alternate design for the submission step:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/1960x1092/__key/communityserver-wikis-components-files/00-00-00-00-46/Asynchronous-1.jpeg" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;After the submission comes an approval and based on the result of that approval, the process that comes next in the workflow will depend on the decision from the approver. While a send-back in a process model is usually designed as a path that returns to a previous node in the model, this design pattern calls that first step in a send-back loop by continuing forward, starting a new instance of the first step. With some simple updates to the submission model, it can handle the scenario of a first time request or a send-back. The image below depicts how this design pattern can handle the described scenario:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/1960x1092/__key/communityserver-wikis-components-files/00-00-00-00-46/Asynchronous-2.jpeg" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The process linking design pattern is useful because it:&lt;/span&gt;&lt;/p&gt;
&lt;ul style="font-size:115%;"&gt;
&lt;li&gt;Breaks up a large and sequential process model into a series of smaller&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;standalone&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;models.&lt;/li&gt;
&lt;li&gt;Results in a better overall memory profile.&lt;/li&gt;
&lt;li&gt;Gives more flexibility for making changes in future releases of the application.&lt;/li&gt;
&lt;li&gt;Makes reading the process sizing tab within the Health Check simpler since there is only one active instance per request workflow without the parent model that orchestrates the workflow.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="restartable_processes"&gt;Restartable Processes&lt;/h2&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;When using a data driven design, there are more opportunities for developers to design with flexibility in mind. Consider the example above. The request data is likely passed from the submission model to the approval model, but the approval model could also be adapted to read from a data source if only the request id, not all the request data, is passed to it. This provides utility when a support engineer needs to make a change and restart a task or when process instances need to be migrated from one Appian environment to another. These are use cases that are hard to meet with large process models containing all the workflow steps, but easy to meet with these types of flexible designs. The image below shows that the model will go directly to the user input task if all the data is passed as parameters, but will call a script task to query the data if those parameters are not passed:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/1960x1092/__key/communityserver-wikis-components-files/00-00-00-00-46/Asynchronous-3.jpeg" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;If restarting a large number of process instances from the database, a management process model will need to determine what model each request needs initiated. Only the ids and statuses are needed from the database to do this and the new process instances can be started by simply passing the request id. This type of model can be created once and used in a variety of scenarios. The image below shows an example management model that is starting process instances based on data in the database:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/Flex-SS5.jpeg" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The restartable process design pattern is useful because it:&lt;/span&gt;&lt;/p&gt;
&lt;ul style="font-size:115%;"&gt;
&lt;li&gt;Gives flexibility when resolving issues&amp;nbsp;with active processes in Production.&lt;/li&gt;
&lt;li&gt;Allows process instances to be created or restarted at the correct workflow step based on database data.&lt;/li&gt;
&lt;li&gt;Assists in migrating process instances from one Appian environment to another.&lt;/li&gt;
&lt;li&gt;Helps developers test that all data is written correctly to the database during application development.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="router_process_model"&gt;Router Process Model&lt;/h2&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;To be even more flexible, a helper process model can be used to dynamically choose what process model to start next based on rules and not explicit flow in the process model. This is particularly useful when workflows change in the middle of a running process, determined by a data driven workflow that can be managed by end-users. Expressions rules will determine what process to start next via the Start Process Node, based on the data for the request. This keeps reusable logic contained in a single process that can be called in multiple places. The image below shows an example process model that does this:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/Flex-SS6.jpeg" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The router model would be called at the end of each process in the workflow as shown below. Note that the logic regarding which step occurs next does not have to be put into the approval model anymore. This makes updates to running instances easier because a deployed change to the router model will be used by all active instances, which can be extremely powerful. The images below show the router model being used in the same example scenario described in the above sections:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/Flex-SS7.jpeg" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/Flex-SS8.jpeg" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The router model design pattern is useful because it:&lt;/span&gt;&lt;/p&gt;
&lt;ul style="font-size:115%;"&gt;
&lt;li&gt;Allows for dynamic routing of workflows based on rules&lt;/li&gt;
&lt;li&gt;Simplifies process model changes required for workflow updates&lt;/li&gt;
&lt;li&gt;Makes restarting processes based on database data even easier&amp;nbsp;since it can be used within the management process model described earlier&lt;/li&gt;
&lt;/ul&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;Using all or a subset of the design patterns outlined above will give developers far more flexibility managing live applications and planning for subsequent releases.&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Architecture&lt;/div&gt;
</description></item><item><title>How to Create Flexible Processes</title><link>https://community.appian.com/success/w/guide/3064/how-to-create-flexible-processes/revision/7</link><pubDate>Wed, 22 Mar 2023 16:09:46 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6bcb150c-7b0d-4f6d-902f-c2ab47e40283</guid><dc:creator>Devon Lee</dc:creator><comments>https://community.appian.com/success/w/guide/3064/how-to-create-flexible-processes#comments</comments><description>Revision 7 posted to Guide by Devon Lee on 3/22/2023 4:09:46 PM&lt;br /&gt;
&lt;div style="margin:8px 16% 8px 8%;"&gt;
&lt;h2 id="skills_covered"&gt;Skills Covered&lt;/h2&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;This&amp;nbsp;article outlines how to make flexible, reusable, and dynamic workflows in Appian in an effort to make design, maintenance, and change management easy.&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;&lt;a href="/success/w/article/3048/creating-memory-efficient-models"&gt;Creating Memory Efficient Models &lt;/a&gt;covers many useful strategies for designing process models that follow best practices. This article&amp;nbsp;will dive deeper into design patterns that will assist with creating workflows with many sequential steps. Creating an entire workflow into a single process model has negative memory implications, is difficult to maintain, and can result in backwards compatibility issues for future releases. Below are some strategies for designing processes that alleviate those risks.&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;This type of design can be used for all applications whether they are data-centric or focus more on a linear task-based workflow.&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="legacy_design_pattern"&gt;Legacy Design Pattern&lt;/h2&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The image below shows a simple example of a model that contains all parts of a workflow. Designing all parts of the workflow into a single process provides a readable picture of the overall workflow, but this type of design introduces problems, even though it is nicely broken into sub-processes:&lt;/span&gt;&lt;/p&gt;
&lt;ul style="font-size:115%;"&gt;
&lt;li&gt;&lt;strong&gt;Memory&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;- this parent process instance will be active and its memory in the environment until the full workflow is complete, a timeline the designer cannot control.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Model size&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;- as more functionality is added, this process model will continue to grow over time, which is difficult to maintain.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Backwards compatibility&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;- subsequent releases that change the model have to account for active instances of this version of the model since it lives for so long.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Restarting instances&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;- there is no way to start a process at approval step 1 or approval step 2 when the need arises, as the sub-processes are not independent.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/Flex-SS1.jpeg" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;However, designers can construct their process design to avoid these types of problems by planning ahead and using some of the strategies outlined below.&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="asynchronous_process_linking"&gt;Asynchronous Process Linking&lt;/h2&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;Any workflow that requires multiple touches or approvals from different users has logical break points that can be leveraged in the model design. At the point of a hand-off, call the next step in the flow as an asynchronous process model so that the first model can complete and be archived/deleted, while the rest of the workflow continues. Note that the &lt;a href="https://docs.appian.com/suite/help/latest/Sub-Process_Activity.html"&gt;Sub-Process&lt;/a&gt; node will keep the next process on the same execution engine, but it is convenient when developing and monitoring instances since the sub-process can be opened directly from the parent within the modeler. For scenarios when a parent process starts multiple child processes, use the &lt;a href="https://docs.appian.com/suite/help/latest/Start_Process_Smart_Service.html"&gt;Start Process&lt;/a&gt; node to load balance across execution engines. Using the same example as used for explaining the legacy design pattern, see the image below for an example model that uses this alternate design for the submission step:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/Flex-SS2_2D00_crop.jpeg" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;After the submission comes an approval and based on the result of that approval, the process that comes next in the workflow will depend on the decision from the approver. While a send-back in a process model is usually designed as a path that returns to a previous node in the model, this design pattern calls that first step in a send-back loop by continuing forward, starting a new instance of the first step. With some simple updates to the submission model, it can handle the scenario of a first time request or a send-back. The image below depicts how this design pattern can handle the described scenario:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/Flex-SS3.jpg" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The process linking design pattern is useful because it:&lt;/span&gt;&lt;/p&gt;
&lt;ul style="font-size:115%;"&gt;
&lt;li&gt;Breaks up a large and sequential process model into a series of smaller&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;standalone&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;models.&lt;/li&gt;
&lt;li&gt;Results in a better overall memory profile.&lt;/li&gt;
&lt;li&gt;Gives more flexibility for making changes in future releases of the application.&lt;/li&gt;
&lt;li&gt;Makes reading the process sizing tab within the Health Check simpler since there is only one active instance per request workflow without the parent model that orchestrates the workflow.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="restartable_processes"&gt;Restartable Processes&lt;/h2&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;When using a data driven design, there are more opportunities for developers to design with flexibility in mind. Consider the example above. The request data is likely passed from the submission model to the approval model, but the approval model could also be adapted to read from a data source if only the request id, not all the request data, is passed to it. This provides utility when a support engineer needs to make a change and restart a task or when process instances need to be migrated from one Appian environment to another. These are use cases that are hard to meet with large process models containing all the workflow steps, but easy to meet with these types of flexible designs. The image below shows that the model will go directly to the user input task if all the data is passed as parameters, but will call a script task to query the data if those parameters are not passed:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/Flex-SS4.jpeg" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;If restarting a large number of process instances from the database, a management process model will need to determine what model each request needs initiated. Only the ids and statuses are needed from the database to do this and the new process instances can be started by simply passing the request id. This type of model can be created once and used in a variety of scenarios. The image below shows an example management model that is starting process instances based on data in the database:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/Flex-SS5.jpeg" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The restartable process design pattern is useful because it:&lt;/span&gt;&lt;/p&gt;
&lt;ul style="font-size:115%;"&gt;
&lt;li&gt;Gives flexibility when resolving issues&amp;nbsp;with active processes in Production.&lt;/li&gt;
&lt;li&gt;Allows process instances to be created or restarted at the correct workflow step based on database data.&lt;/li&gt;
&lt;li&gt;Assists in migrating process instances from one Appian environment to another.&lt;/li&gt;
&lt;li&gt;Helps developers test that all data is written correctly to the database during application development.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="router_process_model"&gt;Router Process Model&lt;/h2&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;To be even more flexible, a helper process model can be used to dynamically choose what process model to start next based on rules and not explicit flow in the process model. This is particularly useful when workflows change in the middle of a running process, determined by a data driven workflow that can be managed by end-users. Expressions rules will determine what process to start next via the Start Process Node, based on the data for the request. This keeps reusable logic contained in a single process that can be called in multiple places. The image below shows an example process model that does this:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/Flex-SS6.jpeg" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The router model would be called at the end of each process in the workflow as shown below. Note that the logic regarding which step occurs next does not have to be put into the approval model anymore. This makes updates to running instances easier because a deployed change to the router model will be used by all active instances, which can be extremely powerful. The images below show the router model being used in the same example scenario described in the above sections:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/Flex-SS7.jpeg" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/Flex-SS8.jpeg" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The router model design pattern is useful because it:&lt;/span&gt;&lt;/p&gt;
&lt;ul style="font-size:115%;"&gt;
&lt;li&gt;Allows for dynamic routing of workflows based on rules&lt;/li&gt;
&lt;li&gt;Simplifies process model changes required for workflow updates&lt;/li&gt;
&lt;li&gt;Makes restarting processes based on database data even easier&amp;nbsp;since it can be used within the management process model described earlier&lt;/li&gt;
&lt;/ul&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;Using all or a subset of the design patterns outlined above will give developers far more flexibility managing live applications and planning for subsequent releases.&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Architecture&lt;/div&gt;
</description></item><item><title>How to Create Flexible Processes</title><link>https://community.appian.com/success/w/guide/3064/how-to-create-flexible-processes/revision/6</link><pubDate>Wed, 22 Feb 2023 16:04:01 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6bcb150c-7b0d-4f6d-902f-c2ab47e40283</guid><dc:creator>joel.larin</dc:creator><comments>https://community.appian.com/success/w/guide/3064/how-to-create-flexible-processes#comments</comments><description>Revision 6 posted to Guide by joel.larin on 2/22/2023 4:04:01 PM&lt;br /&gt;
&lt;div style="margin:8px 16% 8px 8%;"&gt;
&lt;h2 id="skills_covered"&gt;&lt;img alt=" " src="/resized-image/__size/712x304/__key/communityserver-wikis-components-files/00-00-00-00-46/8117.delivery_5F00_methodology_5F00_1_2D00_02.png" /&gt;&lt;span class="sr-only"&gt;Skills Covered&lt;/span&gt;&lt;/h2&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;This&amp;nbsp;article outlines how to make flexible, reusable, and dynamic workflows in Appian in an effort to make design, maintenance, and change management easy.&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;&lt;a href="/success/w/article/3048/creating-memory-efficient-models"&gt;Creating Memory Efficient Models &lt;/a&gt;covers many useful strategies for designing process models that follow best practices. This article&amp;nbsp;will dive deeper into design patterns that will assist with creating workflows with many sequential steps. Creating an entire workflow into a single process model has negative memory implications, is difficult to maintain, and can result in backwards compatibility issues for future releases. Below are some strategies for designing processes that alleviate those risks.&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;This type of design can be used for all applications whether they are data-centric or focus more on a linear task-based workflow.&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="legacy_design_pattern"&gt;&lt;img alt="Legacy Design Pattern" src="/resized-image/__size/1424x608/__key/communityserver-wikis-components-files/00-00-00-00-46/flexible_5F00_processes_2D00_01.png" /&gt;&lt;span class="sr-only"&gt;Legacy Design Pattern&lt;/span&gt;&lt;/h2&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The image below shows a simple example of a model that contains all parts of a workflow. Designing all parts of the workflow into a single process provides a readable picture of the overall workflow, but this type of design introduces problems, even though it is nicely broken into sub-processes:&lt;/span&gt;&lt;/p&gt;
&lt;ul style="font-size:115%;"&gt;
&lt;li&gt;&lt;strong&gt;Memory&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;- this parent process instance will be active and its memory in the environment until the full workflow is complete, a timeline the designer cannot control.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Model size&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;- as more functionality is added, this process model will continue to grow over time, which is difficult to maintain.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Backwards compatibility&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;- subsequent releases that change the model have to account for active instances of this version of the model since it lives for so long.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Restarting instances&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;- there is no way to start a process at approval step 1 or approval step 2 when the need arises, as the sub-processes are not independent.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/Flex-SS1.jpeg" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;However, designers can construct their process design to avoid these types of problems by planning ahead and using some of the strategies outlined below.&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="asynchronous_process_linking"&gt;&lt;img alt="Asynchronous Process Linking " src="/resized-image/__size/712x304/__key/communityserver-wikis-components-files/00-00-00-00-46/flexible_5F00_processes_2D00_04.png" /&gt;&lt;span class="sr-only"&gt;Asynchronous Process Linking&lt;/span&gt;&lt;/h2&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;Any workflow that requires multiple touches or approvals from different users has logical break points that can be leveraged in the model design. At the point of a hand-off, call the next step in the flow as an asynchronous process model so that the first model can complete and be archived/deleted, while the rest of the workflow continues. Note that the &lt;a href="https://docs.appian.com/suite/help/latest/Sub-Process_Activity.html"&gt;Sub-Process&lt;/a&gt; node will keep the next process on the same execution engine, but it is convenient when developing and monitoring instances since the sub-process can be opened directly from the parent within the modeler. For scenarios when a parent process starts multiple child processes, use the &lt;a href="https://docs.appian.com/suite/help/latest/Start_Process_Smart_Service.html"&gt;Start Process&lt;/a&gt; node to load balance across execution engines. Using the same example as used for explaining the legacy design pattern, see the image below for an example model that uses this alternate design for the submission step:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/Flex-SS2_2D00_crop.jpeg" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;After the submission comes an approval and based on the result of that approval, the process that comes next in the workflow will depend on the decision from the approver. While a send-back in a process model is usually designed as a path that returns to a previous node in the model, this design pattern calls that first step in a send-back loop by continuing forward, starting a new instance of the first step. With some simple updates to the submission model, it can handle the scenario of a first time request or a send-back. The image below depicts how this design pattern can handle the described scenario:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/Flex-SS3.jpg" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The process linking design pattern is useful because it:&lt;/span&gt;&lt;/p&gt;
&lt;ul style="font-size:115%;"&gt;
&lt;li&gt;Breaks up a large and sequential process model into a series of smaller&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;standalone&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;models.&lt;/li&gt;
&lt;li&gt;Results in a better overall memory profile.&lt;/li&gt;
&lt;li&gt;Gives more flexibility for making changes in future releases of the application.&lt;/li&gt;
&lt;li&gt;Makes reading the process sizing tab within the Health Check simpler since there is only one active instance per request workflow without the parent model that orchestrates the workflow.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="restartable_processes"&gt;&lt;img alt="Restartable Processes" src="/resized-image/__size/712x304/__key/communityserver-wikis-components-files/00-00-00-00-46/flexible_5F00_processes_2D00_05.png" /&gt;&lt;span class="sr-only"&gt;Restartable Processes&lt;/span&gt;&lt;/h2&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;When using a data driven design, there are more opportunities for developers to design with flexibility in mind. Consider the example above. The request data is likely passed from the submission model to the approval model, but the approval model could also be adapted to read from a data source if only the request id, not all the request data, is passed to it. This provides utility when a support engineer needs to make a change and restart a task or when process instances need to be migrated from one Appian environment to another. These are use cases that are hard to meet with large process models containing all the workflow steps, but easy to meet with these types of flexible designs. The image below shows that the model will go directly to the user input task if all the data is passed as parameters, but will call a script task to query the data if those parameters are not passed:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/Flex-SS4.jpeg" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;If restarting a large number of process instances from the database, a management process model will need to determine what model each request needs initiated. Only the ids and statuses are needed from the database to do this and the new process instances can be started by simply passing the request id. This type of model can be created once and used in a variety of scenarios. The image below shows an example management model that is starting process instances based on data in the database:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/Flex-SS5.jpeg" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The restartable process design pattern is useful because it:&lt;/span&gt;&lt;/p&gt;
&lt;ul style="font-size:115%;"&gt;
&lt;li&gt;Gives flexibility when resolving issues&amp;nbsp;with active processes in Production.&lt;/li&gt;
&lt;li&gt;Allows process instances to be created or restarted at the correct workflow step based on database data.&lt;/li&gt;
&lt;li&gt;Assists in migrating process instances from one Appian environment to another.&lt;/li&gt;
&lt;li&gt;Helps developers test that all data is written correctly to the database during application development.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="router_process_model"&gt;&lt;img alt="Router Process Model" src="/resized-image/__size/712x304/__key/communityserver-wikis-components-files/00-00-00-00-46/flexible_5F00_processes_2D00_03.png" /&gt;&lt;span class="sr-only"&gt;Router Process Model&lt;/span&gt;&lt;/h2&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;To be even more flexible, a helper process model can be used to dynamically choose what process model to start next based on rules and not explicit flow in the process model. This is particularly useful when workflows change in the middle of a running process, determined by a data driven workflow that can be managed by end-users. Expressions rules will determine what process to start next via the Start Process Node, based on the data for the request. This keeps reusable logic contained in a single process that can be called in multiple places. The image below shows an example process model that does this:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/Flex-SS6.jpeg" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The router model would be called at the end of each process in the workflow as shown below. Note that the logic regarding which step occurs next does not have to be put into the approval model anymore. This makes updates to running instances easier because a deployed change to the router model will be used by all active instances, which can be extremely powerful. The images below show the router model being used in the same example scenario described in the above sections:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/Flex-SS7.jpeg" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/Flex-SS8.jpeg" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The router model design pattern is useful because it:&lt;/span&gt;&lt;/p&gt;
&lt;ul style="font-size:115%;"&gt;
&lt;li&gt;Allows for dynamic routing of workflows based on rules&lt;/li&gt;
&lt;li&gt;Simplifies process model changes required for workflow updates&lt;/li&gt;
&lt;li&gt;Makes restarting processes based on database data even easier&amp;nbsp;since it can be used within the management process model described earlier&lt;/li&gt;
&lt;/ul&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;Using all or a subset of the design patterns outlined above will give developers far more flexibility managing live applications and planning for subsequent releases.&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Architecture&lt;/div&gt;
</description></item><item><title>How to Create Flexible Processes</title><link>https://community.appian.com/success/w/guide/3064/how-to-create-flexible-processes/revision/5</link><pubDate>Wed, 22 Feb 2023 15:59:39 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6bcb150c-7b0d-4f6d-902f-c2ab47e40283</guid><dc:creator>joel.larin</dc:creator><comments>https://community.appian.com/success/w/guide/3064/how-to-create-flexible-processes#comments</comments><description>Revision 5 posted to Guide by joel.larin on 2/22/2023 3:59:39 PM&lt;br /&gt;
&lt;div style="margin:8px 16% 8px 8%;"&gt;
&lt;h2 id="skills_covered"&gt;&lt;img alt=" " src="/resized-image/__size/712x304/__key/communityserver-wikis-components-files/00-00-00-00-46/8117.delivery_5F00_methodology_5F00_1_2D00_02.png" /&gt;&lt;span class="sr-only"&gt;Skills Covered&lt;/span&gt;&lt;/h2&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;This&amp;nbsp;article outlines how to make flexible, reusable, and dynamic workflows in Appian in an effort to make design, maintenance, and change management easy.&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;&lt;a href="/success/w/article/3048/creating-memory-efficient-models"&gt;Creating Memory Efficient Models &lt;/a&gt;covers many useful strategies for designing process models that follow best practices. This article&amp;nbsp;will dive deeper into design patterns that will assist with creating workflows with many sequential steps. Creating an entire workflow into a single process model has negative memory implications, is difficult to maintain, and can result in backwards compatibility issues for future releases. Below are some strategies for designing processes that alleviate those risks.&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;This type of design can be used for all applications whether they are data-centric or focus more on a linear task-based workflow.&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="legacy_design_pattern"&gt;&lt;img alt="Legacy Design Pattern" src="/resized-image/__size/1424x608/__key/communityserver-wikis-components-files/00-00-00-00-46/flexible_5F00_processes_2D00_01.png" /&gt;&lt;span class="sr-only"&gt;Legacy Design Pattern&lt;/span&gt;&lt;/h2&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The image below shows a simple example of a model that contains all parts of a workflow. Designing all parts of the workflow into a single process provides a readable picture of the overall workflow, but this type of design introduces problems, even though it is nicely broken into sub-processes:&lt;/span&gt;&lt;/p&gt;
&lt;ul style="font-size:115%;"&gt;
&lt;li&gt;&lt;strong&gt;Memory&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;- this parent process instance will be active and its memory in the environment until the full workflow is complete, a timeline the designer cannot control.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Model size&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;- as more functionality is added, this process model will continue to grow over time, which is difficult to maintain.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Backwards compatibility&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;- subsequent releases that change the model have to account for active instances of this version of the model since it lives for so long.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Restarting instances&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;- there is no way to start a process at approval step 1 or approval step 2 when the need arises, as the sub-processes are not independent.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/Flex-SS1.jpeg" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;However, designers can construct their process design to avoid these types of problems by planning ahead and using some of the strategies outlined below.&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="asynchronous_process_linking"&gt;&lt;img alt="Asynchronous Process Linking " src="/resized-image/__size/712x304/__key/communityserver-wikis-components-files/00-00-00-00-46/flexible_5F00_processes_2D00_04.png" /&gt;&lt;span class="sr-only"&gt;Asynchronous Process Linking&lt;/span&gt;&lt;/h2&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;Any workflow that requires multiple touches or approvals from different users has logical break points that can be leveraged in the model design. At the point of a hand-off, call the next step in the flow as an asynchronous process model so that the first model can complete and be archived/deleted, while the rest of the workflow continues. Note that the &lt;a href="https://docs.appian.com/suite/help/latest/Sub-Process_Activity.html"&gt;Sub-Process&lt;/a&gt; node will keep the next process on the same execution engine, but it is convenient when developing and monitoring instances since the sub-process can be opened directly from the parent within the modeler. For scenarios when a parent process starts multiple child processes, use the &lt;a href="https://docs.appian.com/suite/help/latest/Start_Process_Smart_Service.html"&gt;Start Process&lt;/a&gt; node to load balance across execution engines. Using the same example as used for explaining the legacy design pattern, see the image below for an example model that uses this alternate design for the submission step:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/Flex-SS2_2D00_crop.jpeg" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;After the submission comes an approval and based on the result of that approval, the process that comes next in the workflow will depend on the decision from the approver. While a send-back in a process model is usually designed as a path that returns to a previous node in the model, this design pattern calls that first step in a send-back loop by continuing forward, starting a new instance of the first step. With some simple updates to the submission model, it can handle the scenario of a first time request or a send-back. The image below depicts how this design pattern can handle the described scenario:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/Flex-SS3.jpg" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The process linking design pattern is useful because it:&lt;/span&gt;&lt;/p&gt;
&lt;ul style="font-size:115%;"&gt;
&lt;li&gt;Breaks up a large and sequential process model into a series of smaller&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;standalone&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;models.&lt;/li&gt;
&lt;li&gt;Results in a better overall memory profile.&lt;/li&gt;
&lt;li&gt;Gives more flexibility for making changes in future releases of the application.&lt;/li&gt;
&lt;li&gt;Makes reading the process sizing tab within the Health Check simpler since there is only one active instance per request workflow without the parent model that orchestrates the workflow.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="restartable_processes"&gt;&lt;img alt="Restartable Processes" src="/resized-image/__size/712x304/__key/communityserver-wikis-components-files/00-00-00-00-46/flexible_5F00_processes_2D00_05.png" /&gt;&lt;span class="sr-only"&gt;Restartable Processes&lt;/span&gt;&lt;/h2&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;When using a data driven design, there are more opportunities for developers to design with flexibility in mind. Consider the example above. The request data is likely passed from the submission model to the approval model, but the approval model could also be adapted to read from a data source if only the request id, not all the request data, is passed to it. This provides utility when a support engineer needs to make a change and restart a task or when process instances need to be migrated from one Appian environment to another. These are use cases that are hard to meet with large process models containing all the workflow steps, but easy to meet with these types of flexible designs. The image below shows that the model will go directly to the user input task if all the data is passed as parameters, but will call a script task to query the data if those parameters are not passed:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/design_2D00_patterns_2D00_4.png" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;If restarting a large number of process instances from the database, a management process model will need to determine what model each request needs initiated. Only the ids and statuses are needed from the database to do this and the new process instances can be started by simply passing the request id. This type of model can be created once and used in a variety of scenarios. The image below shows an example management model that is starting process instances based on data in the database:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/design_2D00_patterns_2D00_5.png" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The restartable process design pattern is useful because it:&lt;/span&gt;&lt;/p&gt;
&lt;ul style="font-size:115%;"&gt;
&lt;li&gt;Gives flexibility when resolving issues&amp;nbsp;with active processes in Production.&lt;/li&gt;
&lt;li&gt;Allows process instances to be created or restarted at the correct workflow step based on database data.&lt;/li&gt;
&lt;li&gt;Assists in migrating process instances from one Appian environment to another.&lt;/li&gt;
&lt;li&gt;Helps developers test that all data is written correctly to the database during application development.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="router_process_model"&gt;&lt;img alt="Router Process Model" src="/resized-image/__size/712x304/__key/communityserver-wikis-components-files/00-00-00-00-46/flexible_5F00_processes_2D00_03.png" /&gt;&lt;span class="sr-only"&gt;Router Process Model&lt;/span&gt;&lt;/h2&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;To be even more flexible, a helper process model can be used to dynamically choose what process model to start next based on rules and not explicit flow in the process model. This is particularly useful when workflows change in the middle of a running process, determined by a data driven workflow that can be managed by end-users. Expressions rules will determine what process to start next via the Start Process Node, based on the data for the request. This keeps reusable logic contained in a single process that can be called in multiple places. The image below shows an example process model that does this:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/design_2D00_patterns_2D00_6.PNG" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The router model would be called at the end of each process in the workflow as shown below. Note that the logic regarding which step occurs next does not have to be put into the approval model anymore. This makes updates to running instances easier because a deployed change to the router model will be used by all active instances, which can be extremely powerful. The images below show the router model being used in the same example scenario described in the above sections:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/design_2D00_patterns_2D00_7.png" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/design_2D00_patterns_2D00_8.png" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The router model design pattern is useful because it:&lt;/span&gt;&lt;/p&gt;
&lt;ul style="font-size:115%;"&gt;
&lt;li&gt;Allows for dynamic routing of workflows based on rules&lt;/li&gt;
&lt;li&gt;Simplifies process model changes required for workflow updates&lt;/li&gt;
&lt;li&gt;Makes restarting processes based on database data even easier&amp;nbsp;since it can be used within the management process model described earlier&lt;/li&gt;
&lt;/ul&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;Using all or a subset of the design patterns outlined above will give developers far more flexibility managing live applications and planning for subsequent releases.&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Architecture&lt;/div&gt;
</description></item><item><title>How to Create Flexible Processes</title><link>https://community.appian.com/success/w/guide/3064/how-to-create-flexible-processes/revision/4</link><pubDate>Wed, 22 Feb 2023 15:49:45 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6bcb150c-7b0d-4f6d-902f-c2ab47e40283</guid><dc:creator>joel.larin</dc:creator><comments>https://community.appian.com/success/w/guide/3064/how-to-create-flexible-processes#comments</comments><description>Revision 4 posted to Guide by joel.larin on 2/22/2023 3:49:45 PM&lt;br /&gt;
&lt;div style="margin:8px 16% 8px 8%;"&gt;
&lt;h2 id="skills_covered"&gt;&lt;img alt=" " src="/resized-image/__size/712x304/__key/communityserver-wikis-components-files/00-00-00-00-46/8117.delivery_5F00_methodology_5F00_1_2D00_02.png" /&gt;&lt;span class="sr-only"&gt;Skills Covered&lt;/span&gt;&lt;/h2&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;This&amp;nbsp;article outlines how to make flexible, reusable, and dynamic workflows in Appian in an effort to make design, maintenance, and change management easy.&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;&lt;a href="/success/w/article/3048/creating-memory-efficient-models"&gt;Creating Memory Efficient Models &lt;/a&gt;covers many useful strategies for designing process models that follow best practices. This article&amp;nbsp;will dive deeper into design patterns that will assist with creating workflows with many sequential steps. Creating an entire workflow into a single process model has negative memory implications, is difficult to maintain, and can result in backwards compatibility issues for future releases. Below are some strategies for designing processes that alleviate those risks.&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;This type of design can be used for all applications whether they are data-centric or focus more on a linear task-based workflow.&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="legacy_design_pattern"&gt;&lt;img alt="Legacy Design Pattern" src="/resized-image/__size/1424x608/__key/communityserver-wikis-components-files/00-00-00-00-46/flexible_5F00_processes_2D00_01.png" /&gt;&lt;span class="sr-only"&gt;Legacy Design Pattern&lt;/span&gt;&lt;/h2&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The image below shows a simple example of a model that contains all parts of a workflow. Designing all parts of the workflow into a single process provides a readable picture of the overall workflow, but this type of design introduces problems, even though it is nicely broken into sub-processes:&lt;/span&gt;&lt;/p&gt;
&lt;ul style="font-size:115%;"&gt;
&lt;li&gt;&lt;strong&gt;Memory&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;- this parent process instance will be active and its memory in the environment until the full workflow is complete, a timeline the designer cannot control.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Model size&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;- as more functionality is added, this process model will continue to grow over time, which is difficult to maintain.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Backwards compatibility&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;- subsequent releases that change the model have to account for active instances of this version of the model since it lives for so long.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Restarting instances&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;- there is no way to start a process at approval step 1 or approval step 2 when the need arises, as the sub-processes are not independent.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/Flex-SS1.jpeg" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;However, designers can construct their process design to avoid these types of problems by planning ahead and using some of the strategies outlined below.&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="asynchronous_process_linking"&gt;&lt;img alt="Asynchronous Process Linking " src="/resized-image/__size/712x304/__key/communityserver-wikis-components-files/00-00-00-00-46/flexible_5F00_processes_2D00_04.png" /&gt;&lt;span class="sr-only"&gt;Asynchronous Process Linking&lt;/span&gt;&lt;/h2&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;Any workflow that requires multiple touches or approvals from different users has logical break points that can be leveraged in the model design. At the point of a hand-off, call the next step in the flow as an asynchronous process model so that the first model can complete and be archived/deleted, while the rest of the workflow continues. Note that the &lt;a href="https://docs.appian.com/suite/help/latest/Sub-Process_Activity.html"&gt;Sub-Process&lt;/a&gt; node will keep the next process on the same execution engine, but it is convenient when developing and monitoring instances since the sub-process can be opened directly from the parent within the modeler. For scenarios when a parent process starts multiple child processes, use the &lt;a href="https://docs.appian.com/suite/help/latest/Start_Process_Smart_Service.html"&gt;Start Process&lt;/a&gt; node to load balance across execution engines. Using the same example as used for explaining the legacy design pattern, see the image below for an example model that uses this alternate design for the submission step:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/Flex-SS2.jpeg" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;After the submission comes an approval and based on the result of that approval, the process that comes next in the workflow will depend on the decision from the approver. While a send-back in a process model is usually designed as a path that returns to a previous node in the model, this design pattern calls that first step in a send-back loop by continuing forward, starting a new instance of the first step. With some simple updates to the submission model, it can handle the scenario of a first time request or a send-back. The image below depicts how this design pattern can handle the described scenario:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/desgin_2D00_patterns_2D00_3.png" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The process linking design pattern is useful because it:&lt;/span&gt;&lt;/p&gt;
&lt;ul style="font-size:115%;"&gt;
&lt;li&gt;Breaks up a large and sequential process model into a series of smaller&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;standalone&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;models.&lt;/li&gt;
&lt;li&gt;Results in a better overall memory profile.&lt;/li&gt;
&lt;li&gt;Gives more flexibility for making changes in future releases of the application.&lt;/li&gt;
&lt;li&gt;Makes reading the process sizing tab within the Health Check simpler since there is only one active instance per request workflow without the parent model that orchestrates the workflow.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="restartable_processes"&gt;&lt;img alt="Restartable Processes" src="/resized-image/__size/712x304/__key/communityserver-wikis-components-files/00-00-00-00-46/flexible_5F00_processes_2D00_05.png" /&gt;&lt;span class="sr-only"&gt;Restartable Processes&lt;/span&gt;&lt;/h2&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;When using a data driven design, there are more opportunities for developers to design with flexibility in mind. Consider the example above. The request data is likely passed from the submission model to the approval model, but the approval model could also be adapted to read from a data source if only the request id, not all the request data, is passed to it. This provides utility when a support engineer needs to make a change and restart a task or when process instances need to be migrated from one Appian environment to another. These are use cases that are hard to meet with large process models containing all the workflow steps, but easy to meet with these types of flexible designs. The image below shows that the model will go directly to the user input task if all the data is passed as parameters, but will call a script task to query the data if those parameters are not passed:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/design_2D00_patterns_2D00_4.png" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;If restarting a large number of process instances from the database, a management process model will need to determine what model each request needs initiated. Only the ids and statuses are needed from the database to do this and the new process instances can be started by simply passing the request id. This type of model can be created once and used in a variety of scenarios. The image below shows an example management model that is starting process instances based on data in the database:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/design_2D00_patterns_2D00_5.png" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The restartable process design pattern is useful because it:&lt;/span&gt;&lt;/p&gt;
&lt;ul style="font-size:115%;"&gt;
&lt;li&gt;Gives flexibility when resolving issues&amp;nbsp;with active processes in Production.&lt;/li&gt;
&lt;li&gt;Allows process instances to be created or restarted at the correct workflow step based on database data.&lt;/li&gt;
&lt;li&gt;Assists in migrating process instances from one Appian environment to another.&lt;/li&gt;
&lt;li&gt;Helps developers test that all data is written correctly to the database during application development.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="router_process_model"&gt;&lt;img alt="Router Process Model" src="/resized-image/__size/712x304/__key/communityserver-wikis-components-files/00-00-00-00-46/flexible_5F00_processes_2D00_03.png" /&gt;&lt;span class="sr-only"&gt;Router Process Model&lt;/span&gt;&lt;/h2&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;To be even more flexible, a helper process model can be used to dynamically choose what process model to start next based on rules and not explicit flow in the process model. This is particularly useful when workflows change in the middle of a running process, determined by a data driven workflow that can be managed by end-users. Expressions rules will determine what process to start next via the Start Process Node, based on the data for the request. This keeps reusable logic contained in a single process that can be called in multiple places. The image below shows an example process model that does this:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/design_2D00_patterns_2D00_6.PNG" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The router model would be called at the end of each process in the workflow as shown below. Note that the logic regarding which step occurs next does not have to be put into the approval model anymore. This makes updates to running instances easier because a deployed change to the router model will be used by all active instances, which can be extremely powerful. The images below show the router model being used in the same example scenario described in the above sections:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/design_2D00_patterns_2D00_7.png" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/design_2D00_patterns_2D00_8.png" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The router model design pattern is useful because it:&lt;/span&gt;&lt;/p&gt;
&lt;ul style="font-size:115%;"&gt;
&lt;li&gt;Allows for dynamic routing of workflows based on rules&lt;/li&gt;
&lt;li&gt;Simplifies process model changes required for workflow updates&lt;/li&gt;
&lt;li&gt;Makes restarting processes based on database data even easier&amp;nbsp;since it can be used within the management process model described earlier&lt;/li&gt;
&lt;/ul&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;Using all or a subset of the design patterns outlined above will give developers far more flexibility managing live applications and planning for subsequent releases.&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Architecture&lt;/div&gt;
</description></item><item><title>How to Create Flexible Processes</title><link>https://community.appian.com/success/w/guide/3064/how-to-create-flexible-processes/revision/3</link><pubDate>Tue, 07 Feb 2023 15:12:45 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6bcb150c-7b0d-4f6d-902f-c2ab47e40283</guid><dc:creator>joel.larin</dc:creator><comments>https://community.appian.com/success/w/guide/3064/how-to-create-flexible-processes#comments</comments><description>Revision 3 posted to Guide by joel.larin on 2/7/2023 3:12:45 PM&lt;br /&gt;
&lt;div style="margin:8px 16% 8px 8%;"&gt;
&lt;h2 id="skills_covered"&gt;&lt;img alt=" " src="/resized-image/__size/712x304/__key/communityserver-wikis-components-files/00-00-00-00-46/8117.delivery_5F00_methodology_5F00_1_2D00_02.png" /&gt;&lt;span class="sr-only"&gt;Skills Covered&lt;/span&gt;&lt;/h2&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;This&amp;nbsp;article outlines how to make flexible, reusable, and dynamic workflows in Appian in an effort to make design, maintenance, and change management easy.&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;&lt;a href="/success/w/article/3048/creating-memory-efficient-models"&gt;Creating Memory Efficient Models &lt;/a&gt;covers many useful strategies for designing process models that follow best practices. This article&amp;nbsp;will dive deeper into design patterns that will assist with creating workflows with many sequential steps. Creating an entire workflow into a single process model has negative memory implications, is difficult to maintain, and can result in backwards compatibility issues for future releases. Below are some strategies for designing processes that alleviate those risks.&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;This type of design can be used for all applications whether they are data-centric or focus more on a linear task-based workflow.&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="legacy_design_pattern"&gt;&lt;img alt="Legacy Design Pattern" src="/resized-image/__size/1424x608/__key/communityserver-wikis-components-files/00-00-00-00-46/flexible_5F00_processes_2D00_01.png" /&gt;&lt;span class="sr-only"&gt;Legacy Design Pattern&lt;/span&gt;&lt;/h2&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The image below shows a simple example of a model that contains all parts of a workflow. Designing all parts of the workflow into a single process provides a readable picture of the overall workflow, but this type of design introduces problems, even though it is nicely broken into sub-processes:&lt;/span&gt;&lt;/p&gt;
&lt;ul style="font-size:115%;"&gt;
&lt;li&gt;&lt;strong&gt;Memory&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;- this parent process instance will be active and its memory in the environment until the full workflow is complete, a timeline the designer cannot control.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Model size&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;- as more functionality is added, this process model will continue to grow over time, which is difficult to maintain.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Backwards compatibility&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;- subsequent releases that change the model have to account for active instances of this version of the model since it lives for so long.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Restarting instances&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;- there is no way to start a process at approval step 1 or approval step 2 when the need arises, as the sub-processes are not independent.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/endToEndProcess.png" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;However, designers can construct their process design to avoid these types of problems by planning ahead and using some of the strategies outlined below.&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="asynchronous_process_linking"&gt;&lt;img alt="Asynchronous Process Linking " src="/resized-image/__size/712x304/__key/communityserver-wikis-components-files/00-00-00-00-46/flexible_5F00_processes_2D00_04.png" /&gt;&lt;span class="sr-only"&gt;Asynchronous Process Linking&lt;/span&gt;&lt;/h2&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;Any workflow that requires multiple touches or approvals from different users has logical break points that can be leveraged in the model design. At the point of a hand-off, call the next step in the flow as an asynchronous process model so that the first model can complete and be archived/deleted, while the rest of the workflow continues. Note that the &lt;a href="https://docs.appian.com/suite/help/latest/Sub-Process_Activity.html"&gt;Sub-Process&lt;/a&gt; node will keep the next process on the same execution engine, but it is convenient when developing and monitoring instances since the sub-process can be opened directly from the parent within the modeler. For scenarios when a parent process starts multiple child processes, use the &lt;a href="https://docs.appian.com/suite/help/latest/Start_Process_Smart_Service.html"&gt;Start Process&lt;/a&gt; node to load balance across execution engines. Using the same example as used for explaining the legacy design pattern, see the image below for an example model that uses this alternate design for the submission step:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/design_2D00_pattern_2D00_2.png" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;After the submission comes an approval and based on the result of that approval, the process that comes next in the workflow will depend on the decision from the approver. While a send-back in a process model is usually designed as a path that returns to a previous node in the model, this design pattern calls that first step in a send-back loop by continuing forward, starting a new instance of the first step. With some simple updates to the submission model, it can handle the scenario of a first time request or a send-back. The image below depicts how this design pattern can handle the described scenario:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/desgin_2D00_patterns_2D00_3.png" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The process linking design pattern is useful because it:&lt;/span&gt;&lt;/p&gt;
&lt;ul style="font-size:115%;"&gt;
&lt;li&gt;Breaks up a large and sequential process model into a series of smaller&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;standalone&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;models.&lt;/li&gt;
&lt;li&gt;Results in a better overall memory profile.&lt;/li&gt;
&lt;li&gt;Gives more flexibility for making changes in future releases of the application.&lt;/li&gt;
&lt;li&gt;Makes reading the process sizing tab within the Health Check simpler since there is only one active instance per request workflow without the parent model that orchestrates the workflow.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="restartable_processes"&gt;&lt;img alt="Restartable Processes" src="/resized-image/__size/712x304/__key/communityserver-wikis-components-files/00-00-00-00-46/flexible_5F00_processes_2D00_05.png" /&gt;&lt;span class="sr-only"&gt;Restartable Processes&lt;/span&gt;&lt;/h2&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;When using a data driven design, there are more opportunities for developers to design with flexibility in mind. Consider the example above. The request data is likely passed from the submission model to the approval model, but the approval model could also be adapted to read from a data source if only the request id, not all the request data, is passed to it. This provides utility when a support engineer needs to make a change and restart a task or when process instances need to be migrated from one Appian environment to another. These are use cases that are hard to meet with large process models containing all the workflow steps, but easy to meet with these types of flexible designs. The image below shows that the model will go directly to the user input task if all the data is passed as parameters, but will call a script task to query the data if those parameters are not passed:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/design_2D00_patterns_2D00_4.png" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;If restarting a large number of process instances from the database, a management process model will need to determine what model each request needs initiated. Only the ids and statuses are needed from the database to do this and the new process instances can be started by simply passing the request id. This type of model can be created once and used in a variety of scenarios. The image below shows an example management model that is starting process instances based on data in the database:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/design_2D00_patterns_2D00_5.png" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The restartable process design pattern is useful because it:&lt;/span&gt;&lt;/p&gt;
&lt;ul style="font-size:115%;"&gt;
&lt;li&gt;Gives flexibility when resolving issues&amp;nbsp;with active processes in Production.&lt;/li&gt;
&lt;li&gt;Allows process instances to be created or restarted at the correct workflow step based on database data.&lt;/li&gt;
&lt;li&gt;Assists in migrating process instances from one Appian environment to another.&lt;/li&gt;
&lt;li&gt;Helps developers test that all data is written correctly to the database during application development.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="router_process_model"&gt;&lt;img alt="Router Process Model" src="/resized-image/__size/712x304/__key/communityserver-wikis-components-files/00-00-00-00-46/flexible_5F00_processes_2D00_03.png" /&gt;&lt;span class="sr-only"&gt;Router Process Model&lt;/span&gt;&lt;/h2&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;To be even more flexible, a helper process model can be used to dynamically choose what process model to start next based on rules and not explicit flow in the process model. This is particularly useful when workflows change in the middle of a running process, determined by a data driven workflow that can be managed by end-users. Expressions rules will determine what process to start next via the Start Process Node, based on the data for the request. This keeps reusable logic contained in a single process that can be called in multiple places. The image below shows an example process model that does this:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/design_2D00_patterns_2D00_6.PNG" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The router model would be called at the end of each process in the workflow as shown below. Note that the logic regarding which step occurs next does not have to be put into the approval model anymore. This makes updates to running instances easier because a deployed change to the router model will be used by all active instances, which can be extremely powerful. The images below show the router model being used in the same example scenario described in the above sections:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/design_2D00_patterns_2D00_7.png" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/design_2D00_patterns_2D00_8.png" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The router model design pattern is useful because it:&lt;/span&gt;&lt;/p&gt;
&lt;ul style="font-size:115%;"&gt;
&lt;li&gt;Allows for dynamic routing of workflows based on rules&lt;/li&gt;
&lt;li&gt;Simplifies process model changes required for workflow updates&lt;/li&gt;
&lt;li&gt;Makes restarting processes based on database data even easier&amp;nbsp;since it can be used within the management process model described earlier&lt;/li&gt;
&lt;/ul&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;Using all or a subset of the design patterns outlined above will give developers far more flexibility managing live applications and planning for subsequent releases.&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Architecture&lt;/div&gt;
</description></item><item><title>How to Create Flexible Processes</title><link>https://community.appian.com/success/w/guide/3064/how-to-create-flexible-processes/revision/2</link><pubDate>Tue, 07 Feb 2023 14:59:31 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6bcb150c-7b0d-4f6d-902f-c2ab47e40283</guid><dc:creator>joel.larin</dc:creator><comments>https://community.appian.com/success/w/guide/3064/how-to-create-flexible-processes#comments</comments><description>Revision 2 posted to Guide by joel.larin on 2/7/2023 2:59:31 PM&lt;br /&gt;
&lt;div style="margin:8px 16% 8px 8%;"&gt;
&lt;h2 id="skills_covered"&gt;&lt;img alt=" " src="/resized-image/__size/712x304/__key/communityserver-wikis-components-files/00-00-00-00-46/8117.delivery_5F00_methodology_5F00_1_2D00_02.png" /&gt;&lt;span class="sr-only"&gt;Skills Covered&lt;/span&gt;&lt;/h2&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;This&amp;nbsp;article outlines how to make flexible, reusable, and dynamic workflows in Appian in an effort to make design, maintenance, and change management easy.&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;&lt;a href="/success/w/article/3048/creating-memory-efficient-models"&gt;Creating Memory Efficient Models &lt;/a&gt;covers many useful strategies for designing process models that follow best practices. This article&amp;nbsp;will dive deeper into design patterns that will assist with creating workflows with many sequential steps. Creating an entire workflow into a single process model has negative memory implications, is difficult to maintain, and can result in backwards compatibility issues for future releases. Below are some strategies for designing processes that alleviate those risks.&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;This type of design can be used for all applications whether they are data-centric or focus more on a linear task-based workflow.&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="triage_by_priority"&gt;&lt;img alt="Triage by Priority" src="/resized-image/__size/1424x608/__key/communityserver-wikis-components-files/00-00-00-00-46/support_5F00_issues_2D00_01.png" /&gt;&lt;span class="sr-only"&gt;Triage by Priority&lt;/span&gt;&lt;/h2&gt;
&lt;h2&gt;&lt;strong&gt;Legacy Design Pattern&lt;/strong&gt;&lt;/h2&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The image below shows a simple example of a model that contains all parts of a workflow. Designing all parts of the workflow into a single process provides a readable picture of the overall workflow, but this type of design introduces problems, even though it is nicely broken into sub-processes:&lt;/span&gt;&lt;/p&gt;
&lt;ul style="font-size:115%;"&gt;
&lt;li&gt;&lt;strong&gt;Memory&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;- this parent process instance will be active and its memory in the environment until the full workflow is complete, a timeline the designer cannot control.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Model size&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;- as more functionality is added, this process model will continue to grow over time, which is difficult to maintain.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Backwards compatibility&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;- subsequent releases that change the model have to account for active instances of this version of the model since it lives for so long.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Restarting instances&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;- there is no way to start a process at approval step 1 or approval step 2 when the need arises, as the sub-processes are not independent.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/endToEndProcess.png" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;However, designers can construct their process design to avoid these types of problems by planning ahead and using some of the strategies outlined below.&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;&lt;strong&gt;Better Design Patterns&lt;/strong&gt;&lt;/h2&gt;
&lt;h3&gt;Asynchronous Process Linking&lt;/h3&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;Any workflow that requires multiple touches or approvals from different users has logical break points that can be leveraged in the model design. At the point of a hand-off, call the next step in the flow as an asynchronous process model so that the first model can complete and be archived/deleted, while the rest of the workflow continues. Note that the &lt;a href="https://docs.appian.com/suite/help/latest/Sub-Process_Activity.html"&gt;Sub-Process&lt;/a&gt; node will keep the next process on the same execution engine, but it is convenient when developing and monitoring instances since the sub-process can be opened directly from the parent within the modeler. For scenarios when a parent process starts multiple child processes, use the &lt;a href="https://docs.appian.com/suite/help/latest/Start_Process_Smart_Service.html"&gt;Start Process&lt;/a&gt; node to load balance across execution engines. Using the same example as used for explaining the legacy design pattern, see the image below for an example model that uses this alternate design for the submission step:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/design_2D00_pattern_2D00_2.png" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;After the submission comes an approval and based on the result of that approval, the process that comes next in the workflow will depend on the decision from the approver. While a send-back in a process model is usually designed as a path that returns to a previous node in the model, this design pattern calls that first step in a send-back loop by continuing forward, starting a new instance of the first step. With some simple updates to the submission model, it can handle the scenario of a first time request or a send-back. The image below depicts how this design pattern can handle the described scenario:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/desgin_2D00_patterns_2D00_3.png" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The process linking design pattern is useful because it:&lt;/span&gt;&lt;/p&gt;
&lt;ul style="font-size:115%;"&gt;
&lt;li&gt;Breaks up a large and sequential process model into a series of smaller&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;standalone&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;models.&lt;/li&gt;
&lt;li&gt;Results in a better overall memory profile.&lt;/li&gt;
&lt;li&gt;Gives more flexibility for making changes in future releases of the application.&lt;/li&gt;
&lt;li&gt;Makes reading the process sizing tab within the Health Check simpler since there is only one active instance per request workflow without the parent model that orchestrates the workflow.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Restartable Processes&lt;/h3&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;When using a data driven design, there are more opportunities for developers to design with flexibility in mind. Consider the example above. The request data is likely passed from the submission model to the approval model, but the approval model could also be adapted to read from a data source if only the request id, not all the request data, is passed to it. This provides utility when a support engineer needs to make a change and restart a task or when process instances need to be migrated from one Appian environment to another. These are use cases that are hard to meet with large process models containing all the workflow steps, but easy to meet with these types of flexible designs. The image below shows that the model will go directly to the user input task if all the data is passed as parameters, but will call a script task to query the data if those parameters are not passed:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/design_2D00_patterns_2D00_4.png" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;If restarting a large number of process instances from the database, a management process model will need to determine what model each request needs initiated. Only the ids and statuses are needed from the database to do this and the new process instances can be started by simply passing the request id. This type of model can be created once and used in a variety of scenarios. The image below shows an example management model that is starting process instances based on data in the database:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/design_2D00_patterns_2D00_5.png" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The restartable process design pattern is useful because it:&lt;/span&gt;&lt;/p&gt;
&lt;ul style="font-size:115%;"&gt;
&lt;li&gt;Gives flexibility when resolving issues&amp;nbsp;with active processes in Production.&lt;/li&gt;
&lt;li&gt;Allows process instances to be created or restarted at the correct workflow step based on database data.&lt;/li&gt;
&lt;li&gt;Assists in migrating process instances from one Appian environment to another.&lt;/li&gt;
&lt;li&gt;Helps developers test that all data is written correctly to the database during application development.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;&lt;b&gt;Router Process Model&lt;/b&gt;&lt;/h2&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;To be even more flexible, a helper process model can be used to dynamically choose what process model to start next based on rules and not explicit flow in the process model. This is particularly useful when workflows change in the middle of a running process, determined by a data driven workflow that can be managed by end-users. Expressions rules will determine what process to start next via the Start Process Node, based on the data for the request. This keeps reusable logic contained in a single process that can be called in multiple places. The image below shows an example process model that does this:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/design_2D00_patterns_2D00_6.PNG" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The router model would be called at the end of each process in the workflow as shown below. Note that the logic regarding which step occurs next does not have to be put into the approval model anymore. This makes updates to running instances easier because a deployed change to the router model will be used by all active instances, which can be extremely powerful. The images below show the router model being used in the same example scenario described in the above sections:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/design_2D00_patterns_2D00_7.png" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/design_2D00_patterns_2D00_8.png" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The router model design pattern is useful because it:&lt;/span&gt;&lt;/p&gt;
&lt;ul style="font-size:115%;"&gt;
&lt;li&gt;Allows for dynamic routing of workflows based on rules&lt;/li&gt;
&lt;li&gt;Simplifies process model changes required for workflow updates&lt;/li&gt;
&lt;li&gt;Makes restarting processes based on database data even easier&amp;nbsp;since it can be used within the management process model described earlier&lt;/li&gt;
&lt;/ul&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;Using all or a subset of the design patterns outlined above will give developers far more flexibility managing live applications and planning for subsequent releases.&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Architecture&lt;/div&gt;
</description></item><item><title>How to Create Flexible Processes</title><link>https://community.appian.com/success/w/guide/3064/how-to-create-flexible-processes/revision/1</link><pubDate>Tue, 07 Feb 2023 14:58:46 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6bcb150c-7b0d-4f6d-902f-c2ab47e40283</guid><dc:creator>joel.larin</dc:creator><comments>https://community.appian.com/success/w/guide/3064/how-to-create-flexible-processes#comments</comments><description>Revision 1 posted to Guide by joel.larin on 2/7/2023 2:58:46 PM&lt;br /&gt;
&lt;div style="margin:8px 16% 8px 8%;"&gt;
&lt;h2 id="skills_covered"&gt;&lt;img alt=" " src="/resized-image/__size/712x304/__key/communityserver-wikis-components-files/00-00-00-00-46/8117.delivery_5F00_methodology_5F00_1_2D00_02.png" /&gt;&lt;span class="sr-only"&gt;Skills Covered&lt;/span&gt;&lt;/h2&gt;
&lt;h2 id="triage_by_priority"&gt;&lt;img alt="Triage by Priority" src="/resized-image/__size/1424x608/__key/communityserver-wikis-components-files/00-00-00-00-46/support_5F00_issues_2D00_01.png" /&gt;&lt;span class="sr-only"&gt;Triage by Priority&lt;/span&gt;&lt;/h2&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;This&amp;nbsp;article outlines how to make flexible, reusable, and dynamic workflows in Appian in an effort to make design, maintenance, and change management easy.&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;&lt;a href="/success/w/article/3048/creating-memory-efficient-models"&gt;Creating Memory Efficient Models &lt;/a&gt;covers many useful strategies for designing process models that follow best practices. This article&amp;nbsp;will dive deeper into design patterns that will assist with creating workflows with many sequential steps. Creating an entire workflow into a single process model has negative memory implications, is difficult to maintain, and can result in backwards compatibility issues for future releases. Below are some strategies for designing processes that alleviate those risks.&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;This type of design can be used for all applications whether they are data-centric or focus more on a linear task-based workflow.&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;&lt;strong&gt;Legacy Design Pattern&lt;/strong&gt;&lt;/h2&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The image below shows a simple example of a model that contains all parts of a workflow. Designing all parts of the workflow into a single process provides a readable picture of the overall workflow, but this type of design introduces problems, even though it is nicely broken into sub-processes:&lt;/span&gt;&lt;/p&gt;
&lt;ul style="font-size:115%;"&gt;
&lt;li&gt;&lt;strong&gt;Memory&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;- this parent process instance will be active and its memory in the environment until the full workflow is complete, a timeline the designer cannot control.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Model size&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;- as more functionality is added, this process model will continue to grow over time, which is difficult to maintain.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Backwards compatibility&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;- subsequent releases that change the model have to account for active instances of this version of the model since it lives for so long.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Restarting instances&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;- there is no way to start a process at approval step 1 or approval step 2 when the need arises, as the sub-processes are not independent.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/endToEndProcess.png" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;However, designers can construct their process design to avoid these types of problems by planning ahead and using some of the strategies outlined below.&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;&lt;strong&gt;Better Design Patterns&lt;/strong&gt;&lt;/h2&gt;
&lt;h3&gt;Asynchronous Process Linking&lt;/h3&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;Any workflow that requires multiple touches or approvals from different users has logical break points that can be leveraged in the model design. At the point of a hand-off, call the next step in the flow as an asynchronous process model so that the first model can complete and be archived/deleted, while the rest of the workflow continues. Note that the &lt;a href="https://docs.appian.com/suite/help/latest/Sub-Process_Activity.html"&gt;Sub-Process&lt;/a&gt; node will keep the next process on the same execution engine, but it is convenient when developing and monitoring instances since the sub-process can be opened directly from the parent within the modeler. For scenarios when a parent process starts multiple child processes, use the &lt;a href="https://docs.appian.com/suite/help/latest/Start_Process_Smart_Service.html"&gt;Start Process&lt;/a&gt; node to load balance across execution engines. Using the same example as used for explaining the legacy design pattern, see the image below for an example model that uses this alternate design for the submission step:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/design_2D00_pattern_2D00_2.png" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;After the submission comes an approval and based on the result of that approval, the process that comes next in the workflow will depend on the decision from the approver. While a send-back in a process model is usually designed as a path that returns to a previous node in the model, this design pattern calls that first step in a send-back loop by continuing forward, starting a new instance of the first step. With some simple updates to the submission model, it can handle the scenario of a first time request or a send-back. The image below depicts how this design pattern can handle the described scenario:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/desgin_2D00_patterns_2D00_3.png" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The process linking design pattern is useful because it:&lt;/span&gt;&lt;/p&gt;
&lt;ul style="font-size:115%;"&gt;
&lt;li&gt;Breaks up a large and sequential process model into a series of smaller&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;standalone&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;models.&lt;/li&gt;
&lt;li&gt;Results in a better overall memory profile.&lt;/li&gt;
&lt;li&gt;Gives more flexibility for making changes in future releases of the application.&lt;/li&gt;
&lt;li&gt;Makes reading the process sizing tab within the Health Check simpler since there is only one active instance per request workflow without the parent model that orchestrates the workflow.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Restartable Processes&lt;/h3&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;When using a data driven design, there are more opportunities for developers to design with flexibility in mind. Consider the example above. The request data is likely passed from the submission model to the approval model, but the approval model could also be adapted to read from a data source if only the request id, not all the request data, is passed to it. This provides utility when a support engineer needs to make a change and restart a task or when process instances need to be migrated from one Appian environment to another. These are use cases that are hard to meet with large process models containing all the workflow steps, but easy to meet with these types of flexible designs. The image below shows that the model will go directly to the user input task if all the data is passed as parameters, but will call a script task to query the data if those parameters are not passed:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/design_2D00_patterns_2D00_4.png" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;If restarting a large number of process instances from the database, a management process model will need to determine what model each request needs initiated. Only the ids and statuses are needed from the database to do this and the new process instances can be started by simply passing the request id. This type of model can be created once and used in a variety of scenarios. The image below shows an example management model that is starting process instances based on data in the database:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/design_2D00_patterns_2D00_5.png" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The restartable process design pattern is useful because it:&lt;/span&gt;&lt;/p&gt;
&lt;ul style="font-size:115%;"&gt;
&lt;li&gt;Gives flexibility when resolving issues&amp;nbsp;with active processes in Production.&lt;/li&gt;
&lt;li&gt;Allows process instances to be created or restarted at the correct workflow step based on database data.&lt;/li&gt;
&lt;li&gt;Assists in migrating process instances from one Appian environment to another.&lt;/li&gt;
&lt;li&gt;Helps developers test that all data is written correctly to the database during application development.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;&lt;b&gt;Router Process Model&lt;/b&gt;&lt;/h2&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;To be even more flexible, a helper process model can be used to dynamically choose what process model to start next based on rules and not explicit flow in the process model. This is particularly useful when workflows change in the middle of a running process, determined by a data driven workflow that can be managed by end-users. Expressions rules will determine what process to start next via the Start Process Node, based on the data for the request. This keeps reusable logic contained in a single process that can be called in multiple places. The image below shows an example process model that does this:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/design_2D00_patterns_2D00_6.PNG" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The router model would be called at the end of each process in the workflow as shown below. Note that the logic regarding which step occurs next does not have to be put into the approval model anymore. This makes updates to running instances easier because a deployed change to the router model will be used by all active instances, which can be extremely powerful. The images below show the router model being used in the same example scenario described in the above sections:&lt;/span&gt;&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/design_2D00_patterns_2D00_7.png" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div style="text-align:center;"&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/980x546/__key/communityserver-wikis-components-files/00-00-00-00-46/design_2D00_patterns_2D00_8.png" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;The router model design pattern is useful because it:&lt;/span&gt;&lt;/p&gt;
&lt;ul style="font-size:115%;"&gt;
&lt;li&gt;Allows for dynamic routing of workflows based on rules&lt;/li&gt;
&lt;li&gt;Simplifies process model changes required for workflow updates&lt;/li&gt;
&lt;li&gt;Makes restarting processes based on database data even easier&amp;nbsp;since it can be used within the management process model described earlier&lt;/li&gt;
&lt;/ul&gt;
&lt;p style="font-size:115%;"&gt;&lt;span style="font-weight:400;"&gt;Using all or a subset of the design patterns outlined above will give developers far more flexibility managing live applications and planning for subsequent releases.&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Architecture&lt;/div&gt;
</description></item></channel></rss>