Skip to main content

Process Details

The deployment of one or more process extension can be achieved in two ways, with some limitations for each one:

  • The application process is registered in the Estate Manager as configuration with the use of "Process Details". This is detailed in this document. The Process Details can only contain an Application Process, i.e. if you also need to embed java code, then you need to use the second option. Process Details is available for both POS application and Back Office / Estate Manager
  • The application process is packaged as a jar file and deployed to the POS application via an application update. This method allows to deploy application process as well as other resources (e.g. images) or java code. This jar deployment is not available for Back Office or Estate Manager.

The overall process for using process details is as follow:

  1. A developer creates or makes changes to an application process to be used as a process detail
  2. The application process is part of an eclipse java project during development
  3. A maven job builds a zip file containing the process details configuration items
  4. The resulting zip file is uploaded to the Estate Manager as configuration and deployed to the POS application using data broadcast

Process Detail Placeholder File

Create a maven project with the following structure

TrainingConfiguration
├── Processes
│ └── ProcessDetails.xml
├── assemble-process-details.xml
└── pom.xml

The files will have the following purpose:

  • pom.xml - this is the usual maven configuration file. It will be used to resolve the Application Process and embed it inside the Process details (with the enactor-maven-plugin maven plugin). It will also be used to package the result xml configuration in a zip file (with the maven-assembly-plugin maven plugin)
  • ProcessDetails.xml - this file describes the process registration. It is similar to the section in the Packages.xml to register an application process as an extension implementation.
  • assemble-process-details.xml - this file is a descriptor used by the maven-assembly-plugin to zip the configuration files.

The content of the ProcessDetails.xml file is one or more retail:processDetail configuration items. It does not include the application process itself, which would be in another maven project.

<retail:processDetail xmlns:core="http://www.enactor.com/core" xmlns:retail="http://www.enactor.com/retail">
<core:extensionPoint>RemoveZeroItemInventoryLevelExtension</core:extensionPoint>
<core:applyBeforePackages/>
<core:extensionOverrides/>
<retail:processDetailId>RemoveZeroItemInventoryLevelExtension</retail:processDetailId>
<retail:description>
<core:string variant="" language="en" country="GB">Remove Zero Item Inventory Level</core:string>
</retail:description>
<retail:processTypeId>CX_PROCESS</retail:processTypeId>
<retail:applicationProcessId>InventoryManagement/Processing/DeleteZeroInventory</retail:applicationProcessId>
<retail:originalProcessId>InventoryManagement/Processing/DeleteZeroInventory</retail:originalProcessId>
</retail:processDetail>

Set the different xml element to the relevant values:

  • <core:extensionPoint> - This is the name of the extension point that is being implemented.
  • <retail:processDetailId> - This is the unique id of the process details. It does not need to match the name of the extension point of the application process
  • <retail:description> - The description should be set to a human readable description. This field is only used for display in the Estate Manager Process Details Maintenance application
  • <retail:processTypeId> - This must be set to CX_PROCESS
  • <retail:applicationProcessId> - This is the unique id of application process that is implementing the extension (it is the file path of the application process and does not include the src/META-INF/deployments/Process part)
  • <retail:originalProcessId> - This must be the same as the <retail:applicationProcessId>
  • <retail:deviceTypeId> - This is optional and can be set to POS or ESTATE_MANAGER if the extension is only applicable for that type of device. It can be omitted (in which case the extension is applicable to all device types)
note

If you have multiple process details in the file, make sure to have the <Batch> root element, i.e.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Batch>
<retail:processDetail>
...
</retail:processDetail>

<retail:processDetail>
...
</retail:processDetail>
</Batch>

Another example where the extension also specifies an override

<retail:processDetail xmlns:core="http://www.enactor.com/core" xmlns:retail="http://www.enactor.com/retail">
<core:extensionPoint>UpdateCancelRequestedOrderItem</core:extensionPoint>
<core:applyBeforePackages/>
<core:extensionOverrides>
<core:extensionOverride>
<core:extensionPoint>UpdateCancelRequestedOrderItem</core:extensionPoint>
<core:packageId>CustomerOrdersProcessing</core:packageId>
</core:extensionOverride>
</core:extensionOverrides>
<retail:processDetailId>UpdateCancelRequestedOrderItem</retail:processDetailId>
<retail:description>
<core:string variant="" language="en" country="GB">Update Cancel Requested Order Item</core:string>
</retail:description>
<retail:processTypeId>CX_PROCESS</retail:processTypeId>
<retail:applicationProcessId>OrderManager/Processing/UpdateCancelRequestedOrderItem</retail:applicationProcessId>
<retail:originalProcessId>OrderManager/Processing/UpdateCancelRequestedOrderItem</retail:originalProcessId>
</retail:processDetail>

Maven Build

Enactor Maven Plugin

In the pom.xml file for the Configuration project, a package-process-details goal is added under the enactor-maven-plugin section.

<project>
...
<build>
<plugins>
<plugin>
<groupId>com.enactor</groupId>
<artifactId>enactor-maven-plugin</artifactId>
<executions>
<execution>
<id>package-process-details</id>
<phase>compile</phase>
<goals>
<goal>package-process-details</goal>
</goals>
<configuration>
<sourceDirs>
<sourceDir>${basedir}</sourceDir>
</sourceDirs>
</configuration>
</execution>
</executions>
<dependencies>
<!-- Required to use the correct versions of Enactor Core and Retail classes -->
<dependency>
<groupId>com.enactor.core</groupId>
<artifactId>core</artifactId>
<version>${platform.version}</version>
</dependency>
<dependency>
<groupId>com.enactor.retail</groupId>
<artifactId>mfc</artifactId>
<version>${platform.version}</version>
</dependency>
<!-- Project Dependencies (projects containing the application process) -->
<dependency>
<groupId>com.enactor.training</groupId>
<artifactId>training-pos</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
...
</project>

Performing a maven install on this pom file will run the job, which will search the classpath for application processes matching the process ID in the applicationProcessId tag. Since the application processes are part of other maven project, make sure those are included as maven dependencies in order for the plugin to find them. One output file for each processDetailId is produced in the target directory.

Maven Assembly Plugin

The file descriptor assemble-process-details.xml combines all the files in the target directory and creates one zip file. This zip file can be imported and will contain the committed versions of all processes described by Process Detail entries.

In the pom.xml file for the Configuration project, a single goal is added under the maven-assembly-plugin section.

<project>
...
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>make-assembly-process-details</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>assemble-process-details.xml</descriptor>
</descriptors>
</configuration>
</execution>
...
</executions>
</plugin>
</plugins>
</build>
...
</project>

The assemble-process-details.xml file should look like

<?xml version="1.0" encoding="UTF-8"?>
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd">
<id>process-details</id>
<baseDirectory></baseDirectory>
<formats>
<format>zip</format>
</formats>
<fileSets>
<fileSet>
<directory>target/ProcessDetails</directory>
<outputDirectory></outputDirectory>
</fileSet>
</fileSets>
</assembly>

Maven Build

Run MVN Install on the directory containing the pom file

The zip file containing the process detail will be written to the target directory, e.g. target/training-configuration-pom-TRUNK-SNAPSHOT-process-details.zip