Deploy and Run your Rules SDK project
Author:
Lesley Dean
Changed on:
1 July 2024
Key Points
- A step-by-step guide to deploy your custom Rules Plugin and run the project.
- A fully setup and functioning Fluent Account is required.
- An API User with the role (Note: If using a Training Account, the Account Admin already has this role applied)
`DEVELOPER`
Prerequisites
Steps
Deploy your custom Rules Plugin
First, you need to version and package your custom Rule plugin.
In your pom.xml file, update the project version to
`0.0.1`
`mvn clean package`
This will create a JAR file in the project's
`target`
Plugins are deployed using the Plugin REST API, and include 3 simple steps:
Make sure you have authenticated a user with the DEVELOPER role to perform the above steps.
Add your custom Rule to a Workflow
Using the Workflow Modeller, add your LogHelloWorld rule to the Order CC workflow CREATE Ruleset.
For additional help with the above, see the building workflows documentation.
Fire an Event to execute your Rule
To execute your LogHelloWorld Rule, you will need to trigger the Order CC workflow CREATE Ruleset.
Do this by creating a new CC Order for the Retailer using a GraphQL `createOrderWithCustomer`
This should successfully create the new Order in your Account, and fire the CREATE Orchestration Event to trigger execution of your Rule.
You can view the Orchestration Audit Events log to see the custom Log Action produced by your Rule using the OMS Events Search:
What's next?
You have now completed the Getting Started guide.
You are now ready to learn more about implementing Rules with the following topics: