Skip to content

Commit

Permalink
Merge pull request #38 from anjanaw/dev
Browse files Browse the repository at this point in the history
bosch changes
  • Loading branch information
anjanaw authored Mar 7, 2024
2 parents 5dd56d6 + a3e8eea commit 82d57b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions business/bt/nodes/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ async def tick(self):
self.status = State.SUCCESS
self.end = datetime.now()
if self.co.check_world("usecase_id") == bosch_id:
self.co.log(node=self, question=technique, variable=self.co.check_world(self.variable), selected_target="removed")
self.co.log(node=self, question="{}", variable="{}", selected_target="{}")
else:
self.co.log(node=self, question=_question, variable=self.co.check_world(self.variable), selected_target=self.co.check_world("selected_target"))

Expand Down Expand Up @@ -561,7 +561,7 @@ async def tick(self):
self.status = State.SUCCESS
self.end = datetime.now()
if self.co.check_world("usecase_id") == bosch_id:
self.co.log(node=self, question="outcome", variable=self.co.check_world(self.variable))
self.co.log(node=self, question="{}", variable="{}")
else:
self.co.log(node=self, question=_question, variable=self.co.check_world(self.variable))
return self.status
Expand Down
3 changes: 1 addition & 2 deletions business/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,10 @@ def json_execution(self, _node, _exec_params, _previous, index):
properties = []
for (k, v) in _exec_params.items():
if k in self.exec_variables:
print(k,v)
kv = exec["<prov_IRI>generated"]["<bt_IRI>properties"]["<bt_IRI>hasDictionaryMember"][0].copy()
kv["<bt_IRI>pairKey"] = k
kv["<bt_IRI>pair_value_object"] = v if type(
v) == dict else v if type(v) == bool else "" if v == None else json.loads(v)
v) == dict else v if type(v) == bool else json.loads(v)
properties.append(kv)
exec["<prov_IRI>generated"]["<bt_IRI>properties"]["<bt_IRI>hasDictionaryMember"] = properties
exec["instance"] = exec["instance"]+"_"+str(index)
Expand Down

0 comments on commit 82d57b8

Please sign in to comment.