Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
@date:2025/10/13 15:02
@desc:
"""
import json
from jsonpath_ng import parse

from application.flow.i_step_node import NodeResult
Expand Down Expand Up @@ -40,6 +41,12 @@ def save_context(self, details, workflow_manage):
self.context['exception_message'] = details.get('err_message')

def execute(self, input_variable, variable_list, **kwargs) -> NodeResult:
if type(input_variable).__name__ == "str":
try:
input_variable = json.loads(input_variable)
except Exception:
pass

self.context['request'] = input_variable
response = {v['field']: smart_jsonpath_search(input_variable, v['expression']) for v in variable_list}
return NodeResult({'result': response, **response}, {})
Expand Down