Skip to content

Commit befbd85

Browse files
committed
rules.ecaengine: add context and controller root elements for actions
1 parent fc7f895 commit befbd85

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

lib/advene/rules/ecaengine.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,8 @@ def build_context(self, event, **kw):
245245
globals_={
246246
'annotation': None,
247247
'relation': None,
248-
'context': None,
248+
'context': context,
249+
'controller': controller,
249250
'event': event
250251
}
251252
globals_.update(kw)

lib/advene/util/tools.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,8 @@ def get_id(source, id_):
277277
'identifier',
278278
# Root elements available in queries
279279
'element',
280+
# In action parameters
281+
'context', 'controller',
280282
)
281283

282284
# Path elements followed by any syntax

0 commit comments

Comments
 (0)