Author:
Fluent Commerce
Changed on:
22 Sept 2023
The
`@RuleInfo`
Author:
Fluent Commerce
Changed on:
22 Sept 2023
The following steps breakdown how the rules should be annotated to make sure that the workflow functions properly.
`@EventInfo`
`accepts`
`produces`
The information in the Rule Info is used in the following ways:
The Rule Info includes the following properties:
`name`
`description`
`accepts`
`@EventInfo`
`entityType`
`produces`
`@EventInfo`
`exceptions`
`RuleExecutionException`
The
`description`
`@Param<Type>`
The syntax here is important. Wrap parameter names in curly braces
`{`
`}`
1@RuleInfo(
2 name = "ExampleRule"
3 , description = "This is the description of the Example Rule using parameter {ParamString1}"
4)
5@ParamString(name = "ParamString1", description = "Parameter String 1", defaultValue = "PS1")
6public class ExampleRule implements Rule {
7
8 // ...
9}
Language: java
Name: Syntax
Description:
[Warning: empty required content area]1@RuleInfo(
2 name = "ExampleRule"
3 , description = "This is the description of the Example Rule using parameter {" + MyRuleConstants.PARAM_STRING_1_NAME + "}"
4)
5@ParamString(name = MyRuleConstants.PARAM_STRING_1_NAME, description = "Parameter String 1", defaultValue = "PS1")
6public class ExampleRule implements Rule {
7
8 // ...
9}
Language: java
Name: Example
Description:
[Warning: empty required content area]This will render a form field for use within the Modeller:
The
`@EventInfo`
`accepts`
`produces`
The Event Info includes the following properties:
`eventName`
`entityType`
`entitySubType`
`status`
1 produces = {
2 @EventInfo(eventName = "{eventName}"
3 , entityType = EventInfoVariables.EVENT_TYPE
4 , entitySubtype = EventInfoVariables.EVENT_SUBTYPE
5 , status = EventInfoVariables.EVENT_STATUS
6 )
Language: java
Name: Example
Description:
[Warning: empty required content area]Copyright © 2024 Fluent Retail Pty Ltd (trading as Fluent Commerce). All rights reserved. No materials on this docs.fluentcommerce.com site may be used in any way and/or for any purpose without prior written authorisation from Fluent Commerce. Current customers and partners shall use these materials strictly in accordance with the terms and conditions of their written agreements with Fluent Commerce or its affiliates.