buildARuleStruct
buildARuleStruct(
policyId
,ruleSyntax
,foreignCallNameToID
,effect
,trackerNameToID
):object
Constructs a rule structure based on the provided policy ID, rule syntax, foreign call mappings, effect data, and tracker mappings. This function processes the rule syntax to generate a structured representation of the rule, including placeholders, effects, and associated metadata.
Parameters
Parameter | Type | Description |
---|---|---|
policyId | number | The unique identifier for the policy associated with the rule. |
ruleSyntax | ruleJSON | The JSON representation of the rule syntax, including conditions and effects. |
foreignCallNameToID | FCNameToID [] | An array of mappings between foreign call names and their corresponding IDs. |
effect | any | An object containing the positive and negative effects of the rule. |
trackerNameToID | FCNameToID [] | An array of mappings between tracker names and their corresponding IDs. |
Returns
object
A structured representation of the rule, including its instruction set, placeholders, effect placeholders, and associated effects.
effectPlaceHolders
readonly
effectPlaceHolders:PlaceholderStruct
[] =output.effectPlaceHolders
instructionSet
readonly
instructionSet:any
[] =output.instructionSet
negEffects
readonly
negEffects:any
=effect.negativeEffects
placeHolders
readonly
placeHolders:PlaceholderStruct
[] =output.placeHolders
posEffects
readonly
posEffects:any
=effect.positiveEffects
rawData
readonly
rawData:object
rawData.argumentTypes
argumentTypes:
never
[] =[]
rawData.dataValues
dataValues:
never
[] =[]
rawData.instructionSetIndex
instructionSetIndex:
never
[] =[]