Create a POS Extension
Overview
This tutorial will guide you how to create a React POS extension.
In this exercise, we implement the PreSignOnValidationExtension extension found in the Pos/SignOn/SignOnValidation process with a new Application Process containing a new Prompt.
What you will learn
How to create a POS Extension using POS Extension Wizard
Pre-requisites
- An Eclipse installation with Latest Enactor Tools plugin should be set up on the machine.
Exercises
Create a POS Extension
Open the Select a Wizard by navigating to New -> Other, then search for POS Extension Wizard and open it.

In the first page of the POS Extension wizard (Enactor POS Extensions Settings page) fill the basic information like Extension Project Name and the Java Runtime Environment (JRE) required for the execution of the extension project. Refer InitialPage for more details.
Select jdk-17 as the project specific JRE and make sure to untick the Create module-info.java file checkbox under the Module section.

Click next and navigate to Version Configuration page and Select the Enactor Platform version with 2.7.(Should be below 3.0). For more details refer Version Configuration Page

Click next and navigate to the next page which is the Maven Configuration page. In here the default values are supplied for the Maven like Group ID, Artifact ID and the version. Keep the default values as it is (you can change the values if you want a different artifact or group id). For more details refer Maven Configuration Page

Click Next to navigate to the POS Extensions page. On this page, you can add POS Extensions by clicking the Add button. Refer POS Extensions Page for more details.
When you click the Add button, the New POS Extension dialog box is displayed. Select PreSignOnValidationExtension from the dropdown list.
Then press OK Button

After clicking the OK button, the extension is added to the table on the POS Extensions page.

Click next and navigate to the Extensions Process Settings Page. Based on the PreSignOnValidationExtension added in the previous page, the wizard displays the Process ID that implements the process. (You can change the Process ID here, if needed.)
Refer Extension Process Settings for more details.

Click finish to generate the POS Extension project.
Verify Extension Registration in Packages.xml
-
Confirm that the Packages.xml has following entries

Verify Application Process
- Confirm that a new Application Process named PreSignOnValidationExtensionImplementation_1.0.xml has been created under,
POS Extension/src/META-INF/deployments/Process/Pos/SignOn

Verify React Prompt
- In the PreSignOnValidationExtensionImplementation_1.0.xml Application Process, right-click on the Message State, select Go To -> Go To React Component.

- Confirm that it redirects to the relevant react component.

Verify Message Resource
- Confirm that the, POSExtensionMessages.xml file has been created under
POS Extension/src/META-INF/deployments/MessageResource/POSExtension

Build the POS Extension
-
To build the generated project, navigate to Run Configuration -> Maven Build - > Maven install (POS Extension), and click Run.

-
The project must build successfully.
