Create Rule From Definition
  • 02 Feb 2023
  • 3 Minutes to read
  • Dark
    Light

Create Rule From Definition

  • Dark
    Light

Article summary

Step Details

Introduced in Version4.0.0
Last Modified in Version5.12.0
LocationIntegration > Project Conversion

The Create Rule From Definition step allows users to define the options to create a Rule.


Properties

Inputs

PropertyDescriptionData Type
Rule DataAllows a user to define the options for the RuleConvertedRule

Rule NameDefines the name of the RuleString

DescriptionDefines the description of the RuleString

Begin DateDefines the start Date of the RuleDateTime

End DateDefines the end Date of the RuleDateTime

Rule IdDefines the Id of the RuleString

Folder Defines the Folder to place the RuleString

Input DataDefines the Input data for the RuleString


CanBeNullDetermines if the input data can be a null valueBoolean


FullTypeNameThe full type name of the dataString


IsListDetermines whether the input value is a listBoolean


NameDefines the name of the input dataString

Output DataDefines the Output Data for the RuleList of DataDefinition


OutcomeDataDefines the output data for the RuleList of DataDefinition



CanBeNullDetermines if the output data can be a null value
Boolean



FullTypeNameThe full type name of the data
String



IsListDetermines whether the output value is a list
Boolean



NameDefines the name of the output data input
String


OutcomeNameDefines the name of the outcome data String

Rule TypeAllows a user to select output behavior type from a dropdown list (to see the dropdown list select Constant mapping)
List of OutcomeDefinition


Logical RuleOutputs either a True or False boolean when the Rule executes
---


Data Return Rule (Single)Outputs a single variable
---


Action RuleAllows 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 BehaviorDefines the Rule Behavior for the RuleRuleType

ActionsDefines the actions for the RuleString

Base64 ImageDefines the image for the RuleList of Byte

StatementsDefines the Rule Statements List of ConvertedRuleStatement

Group TypeDefines the Group type for StatementsGroupType

Outputs

PropertyDescriptionData Type
OutputOutputs an Id for RuleString

Example Inputs and Outputs

Rule DataOutput
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?