Create Rule From Definition
- 02 Feb 2023
- 3 Minutes to read
- Print
- DarkLight
Create Rule From Definition
- Updated on 02 Feb 2023
- 3 Minutes to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
Step Details | |
Introduced in Version | 4.0.0 |
Last Modified in Version | 5.12.0 |
Location | Integration > Project Conversion |
The Create Rule From Definition step allows users to define the options to create a Rule.
Properties
Inputs
Property | Description | Data Type | |||
---|---|---|---|---|---|
Rule Data | Allows a user to define the options for the Rule | ConvertedRule | |||
Rule Name | Defines the name of the Rule | String | |||
Description | Defines the description of the Rule | String | |||
Begin Date | Defines the start Date of the Rule | DateTime | |||
End Date | Defines the end Date of the Rule | DateTime | |||
Rule Id | Defines the Id of the Rule | String | |||
Folder | Defines the Folder to place the Rule | String | |||
Input Data | Defines the Input data for the Rule | String | |||
CanBeNull | Determines if the input data can be a null value | Boolean | |||
FullTypeName | The full type name of the data | String | |||
IsList | Determines whether the input value is a list | Boolean | |||
Name | Defines the name of the input data | String | |||
Output Data | Defines the Output Data for the Rule | List of DataDefinition | |||
OutcomeData | Defines the output data for the Rule | List of DataDefinition | |||
CanBeNull | Determines if the output data can be a null value | Boolean | |||
FullTypeName | The full type name of the data | String | |||
IsList | Determines whether the output value is a list | Boolean | |||
Name | Defines the name of the output data input | String | |||
OutcomeName | Defines the name of the outcome data | String | |||
Rule Type | Allows a user to select output behavior type from a dropdown list (to see the dropdown list select Constant mapping) | List of OutcomeDefinition | |||
Logical Rule | Outputs either a True or False boolean when the Rule executes | --- | |||
Data Return Rule (Single) | Outputs a single variable | --- | |||
Action Rule | Allows the execution of another Rule or Flow based on the outcome | --- | |||
Data Return Rule (Multiple, Composite Type) | Creates a new data type based on the output fields | --- | |||
Data Return Rule (Multiple) | Outputs multiple variables | --- | |||
Rule Behavior | Defines the Rule Behavior for the Rule | RuleType | |||
Actions | Defines the actions for the Rule | String | |||
Base64 Image | Defines the image for the Rule | List of Byte | |||
Statements | Defines the Rule Statements | List of ConvertedRuleStatement | |||
Group Type | Defines the Group type for Statements | GroupType |
Outputs
Property | Description | Data Type |
---|---|---|
Output | Outputs an Id for Rule | String |
Example Inputs and Outputs
Rule Data | Output |
---|---|
RuleName:"Rest"; InputData[Name:"This";FullTypeName:"System.String"];FolderId:"08daf571-1a40-d820-1f24-2216a00b313f" | 08daf9ac-6541-28a0-1f24-2216a00bd17d |
RuleName:null; InputData[Name:"This";FullTypeName:"System.String"];FolderId:"08daf571-1a40-d820-1f24-2216a00b313f" | EXCEPTION MESSAGE |
RuleName: "Confirm"; InputData[null]; | EXCEPTION MESSAGE |
Common Errors
Please provide a Valid Name at
If the Rule Name is null or empty, the step will cause an error.
To correct this, enter a value in the Rule Name field.
Exception Message:
Exception Stack Trace: DecisionsFramework.Design.Flow.ErrorRunningFlowStep: Error running step Create Rule From Definition 1[CreateRuleFromDefinition] in flow [Flow 6]: Exception invoking method CreateRuleFromDefinition on class ImportRule
---> DecisionsFramework.LoggedException: Exception invoking method CreateRuleFromDefinition on class ImportRule
---> DecisionsFramework.LoggedException: Error creating new element registration with configuration data
---> DecisionsFramework.LoggedException: Error creating new element registration
---> DecisionsFramework.BusinessRuleException: [BusinessRule] Please provide a Valid Name
at DecisionsFramework.ServiceLayer.Services.ConfigurationStorage.ElementRegistrationUtils.Create(AbstractUserContext userContext, String folderId, String name, String templateId, ElementType elementType, String subElementType, String id, Boolean isHidden)
--- End of inner exception stack trace --- at DecisionsFramework.ServiceLayer.Services.ConfigurationStorage.ElementRegistrationUtils.Create(AbstractUserContext userContext, String folderId, String name, String templateId, ElementType elementType, String subElementType, String id, Boolean isHidden
at DecisionsFramework.ServiceLayer.Services.ConfigurationStorage.ElementRegistrationUtils.CreateWithConfigurationData(String folderId, String name, String templateId, ElementType elementType, String behaviorTypeName, String id, String subElementType, DataPair[] extraData, Boolean isHidden)
--- End of inner exception stack trace --- at DecisionsFramework.ServiceLayer.Services.ConfigurationStorage.ElementRegistrationUtils.CreateWithConfigurationData(String folderId, String name, String templateId, ElementType elementType, String behaviorTypeName, String id, String subElementType, DataPair[] extraData, Boolean isHidden
at DecisionsFramework.ProjectConversion.RuleImport.RuleCreator.CreateRuleRegistration(BaseConvertedRule ruleData, Boolean useRuleIdForCreation
at DecisionsFramework.ProjectConversion.RuleImport.RuleCreator.CreateElementRegistration(BaseConvertedRule ruleData
at RuleImportProject.ImportRule.CreateRuleFromDefinition(ConvertedRule ruleData)
--- End of inner exception stack trace --- at DecisionsFramework.Design.Flow.StepImplementations.InvokeMethodStep.Run(StepStartData data
at DecisionsFramework.Design.Flow.FlowStep.RunStepInternal(String flowTrackingID, String stepTrackingID, KeyValuePairDataStructure[] stepRunDataValues, AbstractFlowTrackingData trackingData
at DecisionsFramework.Design.Flow.FlowStep.Start(String flowTrackingID, String stepTrackingID, FlowStateData data, AbstractFlowTrackingData trackingData, RunningStepData currentStepData)
--- End of inner exception stack trace ---
Object reference not set to an instance of an object
If the Statement is added but not configured correctly, the step will cause an error.
To correct this, configure the values for the GroupStatements field.
Exception Message:
Exception Stack Trace: DecisionsFramework.Design.Flow.ErrorRunningFlowStep: Error running step Create Rule From Definition 1[CreateRuleFromDefinition] in flow [Flow 6]: Exception invoking method CreateRuleFromDefinition on class ImportRule
---> DecisionsFramework.LoggedException: Exception invoking method CreateRuleFromDefinition on class ImportRule
---> System.NullReferenceException: Object reference not set to an instance of an object.
at DecisionsFramework.ProjectConversion.ConvertedRule.ProcessData(Rule myRule, ConvertedRule ruleData
at DecisionsFramework.ProjectConversion.ConvertedRule.ConfigureRule(Rule myRule
at DecisionsFramework.ProjectConversion.RuleImport.RuleCreator.CreateRuleRegistration(BaseConvertedRule ruleData, Boolean useRuleIdForCreation
at DecisionsFramework.ProjectConversion.RuleImport.RuleCreator.CreateElementRegistration(BaseConvertedRule ruleData
at RuleImportProject.ImportRule.CreateRuleFromDefinition(ConvertedRule ruleData)
--- End of inner exception stack trace --- at DecisionsFramework.Design.Flow.StepImplementations.InvokeMethodStep.Run(StepStartData data
at DecisionsFramework.Design.Flow.FlowStep.RunStepInternal(String flowTrackingID, String stepTrackingID, KeyValuePairDataStructure[] stepRunDataValues, AbstractFlowTrackingData trackingData
at DecisionsFramework.Design.Flow.FlowStep.Start(String flowTrackingID, String stepTrackingID, FlowStateData data, AbstractFlowTrackingData trackingData, RunningStepData currentStepData)
--- End of inner exception stack trace ---
Was this article helpful?