Sepasoft MES Module Suite
Using Templates in Batch Procedure Recipes
Operations and Unit Procedure can be saved as Templates.
Recipe (Procedure) > Unit Procedure > Phase
Recipe (Procedure) > Unit Procedure > Operation > Phase
Unlinked Template
Including and Previous to version: 3.81.12 SP4 and 4.83.1 SP4 it is important to note that once a template is placed, the instance is unlinked from the master template. This allows you to extend or modify the logic to meet the specific requirements of the new recipe without affecting the original template or other instances—providing a structured start while maintaining local flexibility.
|
Added in 3.81.12 SP5 and 4.83.1 SP5: Sync-able templates are governed by strict protocols designed to prevent data loss. The primary rules for using them include:
|
Linked and Non-linked Templates
|
In version: 3.81.12 SP5, 4.83.1 SP5 and later |
- Linked Templates stay connected to the master template and are read-only in the recipe. Choose Sync Template on the linked block to copy the latest master template version into that recipe. The recipe must be saved before Sync Template is available.
- When a Template becomes unlinked: Once a template is unlinked, it retains the fully populated logic and parameters of the original as a starting point, but you are completely free to modify, extend, and customize the logic for your specific recipe without affecting the master template or receiving future updates from it.
Unit Class compatibility for Sync Template
|
Added in 3.81.13 SP5 and 4.83.3 SP5. |
An Operation Template can be assigned to a parent Unit Class and synchronized into a Unit Procedure that uses a descendant of that Unit Class. Synchronization keeps the Unit Class already selected on the recipe.
Sync Template compares the Unit Class on the linked step with the Unit Class on the master template. When the linked step has no Unit Class, the comparison uses the Unit Class on its parent Unit Procedure. The check runs only when both sides have a Unit Class.
| Relationship | Result |
|---|---|
The recipe Unit Class and the template Unit Class are the same | Sync Template completes. |
The recipe Unit Class is a child, grandchild, or deeper descendant of the template Unit Class | Sync Template completes. The recipe keeps its own Unit Class. |
The recipe Unit Class is a parent or other ancestor of the template Unit Class | Sync Template is rejected. |
The Unit Classes are siblings | Sync Template is rejected. |
The Unit Classes are unrelated | Sync Template is rejected. |
A rejected sync reports:
Template unit class does not match the recipe unit class.
The same rule applies when Sync Template is used on a linked Operation or Unit Procedure, including a linked block inside a template.
After a successful sync:
- The linked block is replaced with the latest template version.
- The recipe or template is saved.
- The applied template version matches the master template version.
- The master template keeps the Unit Class it was saved with.
- The recipe block keeps the descendant Unit Class.
- A batch that is already running is unchanged. The next batch created from the master recipe uses the synchronized recipe.
Example
- In Batch Unit Class Manager, create a base Unit Class. Select it, then add a child Unit Class so the child inherits the base phases.
- Save an Operation as an Operation Template and assign the base Unit Class.
- Create a batch recipe. Add a Unit Procedure that uses the child Unit Class.
- Add the Operation Template to that Unit Procedure and save the recipe.
- Edit the Operation Template and save a new version.
- Reopen the recipe, select the linked operation, and choose Sync Template.
- Confirm. The operation updates to the new template version, and the Unit Procedure still uses the child Unit Class.
- Close and reopen the recipe. The synchronized operation is still present.
- Assign the child Unit Class to a Unit. The recipe can run and complete.
Creating and Accessing Batch Recipe Templates
First create the template classes if you want to organize templates into categories. Then, open a recipe and start saving Unit Procedures or Operations into templates.
Access Templates from Batch Recipe Editor.

Perspective Batch Recipe Editor Component
Learn about the Batch Recipe Editor component.

Define Template Classes
Template Classes function as a directory or folder system. If no specific class is selected, the template is stored in the root directory by default.

Save a Unit Procedure as a Template
In Batch Recipe Editor, open the recipe, navigate to the Unit Procedure and click the Save icon.

Save an Operation as a Template

Add the template by entering a name using a naming convention for your project, You have the option of selecting a unit class and adding a description.

|
Added in 3.81.13 SP5 and 4.83.3 SP5: an Operation Template assigned to a parent Unit Class can be added to, and later synchronized into, a Unit Procedure that uses a descendant Unit Class. See Unit Class compatibility for Sync Template. |
Add a Template to a Recipe
Available templates are listed in the palette.

|
Version specific Rules: Including and Previous to version: 3.81.12 SP3 and 4.83.1 SP3 You can drag and drop the element in the design space. Doing this unlinks from the master template. This allows you to extend or modify the logic to meet the specific requirements of the new recipe without affecting the original template or other instances. |
Scripting Functions for Managing Templates
Generation and Organization: |
Use createTemplate(name, parentLink) and createTemplateClass(name, parentLink) to build new templates and folder structures.
|
||
Loading and Saving:
|
Existing templates can be accessed using loadTemplate(mesObjectLink), getTemplateLink(name, parentLink), or getTemplateLinkList(parentLink, pageNumber, pageSize, searchPattern), and committed back to the system using saveTemplate(mesObjectList)
|
||
Modifying and Duplicating: | You can duplicate existing configurations using copyTemplate(copyFromLink, newTemplateName) → MESObjectList, or move them between systems using exportTemplate(templateLink) and importTemplate(xml, parentLink).
| ||
Handling Synchronization: | To specifically handle the synchronization of logic phases (which relates to the syncable templates), you can use the syncPhasesAndSaveTemplate(mesObjectList) function. Sync Template in Batch Recipe Editor updates a linked recipe block from its master template.
|
Alphabetical listing of template scripting functions
Scripting Functions within system.mes.batch.recipe for generating and managing templates:
copyTemplate(copyFromLink, newTemplateName)createTemplate(name, parentLink)createTemplateClass(name, parentLink)exportTemplate(templateLink)getRootTemplateLink()getTemplateLink(name, parentLink)getTemplateLinkList(parentLink, pageNumber, pageSize, searchPattern)importTemplate(xml, parentLink)loadTemplate(mesObjectLink)loadTemplate(name, parentLink)loadTemplateClass(name, parentLink)removeTemplate(templateLink)saveTemplate(mesObjectList)saveTemplateClass(batchMasterTemplateClass)syncPhasesAndSaveTemplate(mesObjectList)
Sepasoft MES Module Suite