Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
lookup-rule
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sabari T
lookup-rule
Commits
a114e759
Commit
a114e759
authored
Aug 25, 2021
by
charankumar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modified
parent
8d3b4209
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
scripts/handler/rule_engine_update.py
scripts/handler/rule_engine_update.py
+5
-5
No files found.
scripts/handler/rule_engine_update.py
View file @
a114e759
...
...
@@ -130,12 +130,12 @@ class RuleUpdate:
"Selected_device"
:
selected_list
,
"Selected_ruleType"
:
"Real Time"
,
"calcFormulaList"
:
[],
"deviceDescription"
:
f
"Manually created rule from code for lookup - {rulename}"
,
# todo
"deviceDescription"
:
f
"Manually created rule from code for lookup - {rulename}"
,
"disable_all"
:
False
,
"execute_on"
:
{},
"processOn"
:
"server"
,
"project_id"
:
project_id
,
# todo
"ruleName"
:
f
"Lookup-{rulename}"
,
# todo
"project_id"
:
project_id
,
"ruleName"
:
f
"Lookup-{rulename}"
,
"selected_device_meta"
:
{},
"transformation_type"
:
"validation_and_transformation"
,
"user_id"
:
user_id
,
...
...
@@ -145,7 +145,7 @@ class RuleUpdate:
for
each_rule_index
,
each_rule
in
enumerate
(
request_payload
):
static_calc_form_json
=
{}
static_calc_form_json
=
{
"code"
:
f
"lookup(
{each_rule['hierarchy_ste']}
, '{each_rule['lookup_name']}', 'exact')"
,
"code"
:
f
"lookup(
[{each_rule['hierarchy_ste'][0]}]
, '{each_rule['lookup_name']}', 'exact')"
,
"parsedCode"
:
{
"type"
:
"Program"
,
"body"
:
[
...
...
@@ -209,7 +209,7 @@ class RuleUpdate:
"execute_on"
:
{}
}
static_json
[
'calcFormulaList'
]
.
append
(
static_calc_form_json
)
# print(static_json
)
print
(
'Done'
)
return_json
=
self
.
rule_configuration_handler
.
create_rule_engine
(
static_json
)
logger
.
info
(
return_json
)
except
Exception
as
e
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment