Map Reuse
5 min
it is common to see repetitive code be packaged as a reusable component, called upon by other code when needed these helper components can load configuration settings, log error messages, etc instead of repeating code for every instance, one copy is kept as a standalone component that is reused it is also common in large repositories to find multiple copies of the exact same code due to developers copy pasting code blueprint detects both cases and presents both as opportunities for reuse in the generated pad code reuse of code in pad can occur either between flows (inter flow reuse) or within flows (intra flow reuse) inter flow reuse is when a flow is called multiple times by other flows intra flow reuse is when sub flows within a flow are called multiple times from other subflows of the flow blueprint automatically supports intra flow reuse single code components called multiple times in the source rpa tool, and even cases where identical copies of code components exist, will be created by blueprint as a single, reused pad subflow however inter flow reuse only happens if you configure reuse rules to make it happen blueprint helps by automatically generating all cases where this reuse opportunity exists, and your role is to configure and enable the rule not using these rules will result in multiple copies of the code being generated, specifically as identical subflows in multiple flows using rules table if you would rather have a single, reused copy of the code be created in pad then you need to configure the rule typically users will have blueprint generate the rules, and then the user configures them in this case blueprint rule generation scans the code identifying where the conversion will create copies of code in pad by default these will be listed in the reuse table giving you an opportunity to configure a rule that will instead make a reusable component (pad flow) if there are cases where you'd like to make a reusable component even though blueprint didn't recommend it (e g you intend to reuse it in future) you can add a new rule by clicking the add process button and selecting a blueprint process for which you'd like to create a reuse rule you can find the generated reuse rules in the reuse tab the "pad copies" column tells you how many code copies will be created if you don't reuse it by enabling the rule clicking on that number in the table will show you exactly where these copies exist in the blueprint internal representation of the blue prism code for example the following image is the popup that is displayed when clicking on the first number (3) in the previous image in the first column we can see there are two identical copies of code with the same name "launch", one having id 1030950 and the other having id 1030856 the second column tells us that in blue prism these code copies are being called by three different blue prism processes (calltrees) in the next column we can see which processes (blue prism pages) are making the calls, and the last column shows exactly which step in those processes (blue prism stage) is making the call if we choose to not have a rule then blueprint will create three pad flows (based on the calltrees in second column) each of which will have an identical copy of the "launch" code as a subflow if we would rather have a single, reusable copy of that code then we can use a reuse rule to map it to a single, reusable flow and have "run desktop flow" actions placed in the three pad flows you can have blueprint create the reusable code as a new pad flow, or have blueprint use an existing flow if it already exists, using these instructions map to an external flow docid\ nu3bqtvwhkapcb7yg ml7