Extending with Process Set
Overview
Process Sets in Enactor serve the purpose of overriding existing Application Processes. They provide the flexibility to modify the behavior of various components within the Enactor POS, Estate Manager, or other systems supplied by Enactor.
What You Will Learn
- How to create a new Process Set
- How to override an existing Process
Instructions
Create a new Process Set
Adding a folder to the lookup path of a resource can be used to defined a Process Set
Create a folder with the name of the Process Set that is to be used, Training
|-- "src"
| |-- "META-INF"
| | `-- "deployments"
| | `-- "Process"
| | `-- "Training"
Add the following Program Argument to your POS Launch Configuration
-processSet:Training
Process Override
To override an existing process, start by duplicating the directory structure of the process you intend to override, relative to deployments\Process
.
Bring up the Resource Library and search and open the Application Process LookupItemPrice
The process LookupItemPrice
is a process that is called when an item is sold at the pos
Make note of the Process ID Property Pos/Product/LookupItemPrice
The Process ID comprises two primary components. The first part is the location of the file relative to 'META-INF/Process,' and the second part is the name of the process.
[Directory path]/[Process Name]
Under the process set folder Training
, create a new directory path Pos/Product
Copy the original LookupItemPrice
Process from the Resource Library into the Product
directory.
Ensure the Process ID of the Copied process is Training/Pos/Product/LookupItemPrice
Open the new LookupItemPrice Process and enable the trace option
Run Configuration
To inform the application at runtime to use a process set name during the lookup of a resource a new application argument is required.
Open Run Menu → Debug Configurations
Under the Java application section select Training POS
Select the Arguments tab
Add the following argument (if an argument exists replace with the following)
-processSet:Training
Click Apply... button
Click Debug... button
Sell a product and you will see your overridden process being traced.
Answers
The completed solution can be found in the ProcessSet Project located at /WorkspaceSetup/Solutions/ProcessSet
To run the solution, import the project as a maven project to your workspace
Select the Training Solution - Process Set
Java launch