Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Oracle Java SE Development Kit 8 (JDK)
  • Eclipse IDE
  • Maven
  • Wildfly Application Server v10.1 or later
  • The CRM.COM Enterprise Archive (.ear file) - Provided by CRM.COM
  • The CRM.COM Plugin SDK - Provided by CRM.COM

Step-By-Step Guide

1.Import CRM.COM archive into your IDE

Open Eclipse IDE and import the .ear file into your workspace as shown in the screenshots below.





2.Install CRM.COM plugin SDK

Extract CRM.COM Plugin SDK to a location in your filesystem where Wildfly Application Server has permission. 

...

Info
titleWildfly system properties

You can also set any Wildfly system properties through the Wildfl management console 

3.Create plugin projects

To create a plugin project, you should run the provided create_plugin script found in the SDK and provide groupid, artifactid, and plugin type as the examples below.

There are 2 plugin types, ejb and web plugins. The ejb plugin projects should be used should be used to implement business logic - the model and controller layers of the plugin and the web plugins should be used to implement the view layer of your plugin - the pages, reports, etc.

Code Block
languagebash
titleCreate a an ejb plugin project
./create_plugin.sh com.example example-ejb-plugin ejb

...


Code Block
languagebash
titleCreate a web plugin project
./create_plugin.sh com.example example-web-plugin web


During the creation of the plugin skeleton, you will be prompted to define a version for your plugin and also confirm your configuration (groupId, artifactId and version).


Image Added


After creating your plugins, you should also register them by updating the plugins descriptor

The plugins.xml file is used to register your plugins. Using this file, you can define your plugins and the organisations that your plugins will be enabled for.

Note that the organisationid should be set to the same value as the MPID field of the MASTERPARTNERS table of the Ecenter database. 

For a full list of plugins file attributes, go to Plugins File Documentation.

...

Code Block
languagexml
titleplugins.xml
collapsetrue
<pluginconfig>
	<plugins>
		<plugin>
			<name>switch<<name>example-ejb-plugin</name>
			<description>Switch<description>Example Provisioningejb Provider Plugin<plugin</description>
			<enabled>true</enabled>
			<vendor>CRM.COM</vendor>
			<version>1.0.0</version>
			<organisations>
				<organisationid>SUBSCRIPTIONS_DB</organisationid>
				<organisationid>ADMIN_DB</organisationid>
			</organisations>
		</plugin>
		<plugin>
			<name>kounta<<name>example-web-plugin</name>
			<description>Kounta<description>Example Point Of Sale System Plugin<web plugin</description>
			<enabled>true</enabled>
			<vendor>CRM.COM</vendor>
			<version>1.0.0</version>
			<organisations>
				<organisationid>REWARDS<organisationid>SUBSCRIPTIONS_DB</organisationid>
				<organisationid>ADMIN_DB</organisationid>
			</organisations>
		</plugin>
	</plugins>
</pluginconfig>

4.Import plugin projects into your IDE

The last step before starting development is to import the created plugin projects into your Eclipse workspace.


Image Added


Image Added


Image Added


After adding the plugin projects to your workspace, you should fix the classpath of your web plugin by adding the required crm-ui.jar.

This can be found under /WebContent/WEB-INF/lib directory of the Crm project.

To fix the classpath of the web plugin, right-click on the project → Properties →  Java Build Path, select the Libraries tab and click the "Add JARs..." button.


Image Added


The next step is to add your web plugins to the deployment assembly of the Crm project and your ejb plugins to the deployment assembly of the CrmEAR project as demonstrated below.


Image Added


Image Added


Image Added


Image Added


Cache Properties File

From R13 onwards Hibernate second-level caching is used for the most of CRM.COM configuration entities. To enable this functionality you have to create cache.properties file and place it in the same directory as your custom project(s).

...