Skip to content
Snippets Groups Projects
Commit e85ddc9b authored by Janet Goldstein's avatar Janet Goldstein
Browse files

WS-740: get rid of unimplemented PatternIF and use a string instead in the...

WS-740: get rid of unimplemented PatternIF and use a string instead in the Transition class. the corresponding column in capability_state_transitions is just a string.
parent 4119967e
No related branches found
No related tags found
1 merge request!665WS-740: get rid of unimplemented PatternIF
Pipeline #3715 passed
......@@ -42,7 +42,7 @@ from workspaces.capability.enums import (
)
from workspaces.capability.helpers_interfaces import ParameterIF
from workspaces.capability.message_architect import CapabilityMessageArchitect
from workspaces.capability.schema_interfaces import ActionIF, PatternIF
from workspaces.capability.schema_interfaces import ActionIF
from workspaces.capability.services.interfaces import ExecutionManagerIF
from workspaces.products.schema_interfaces import FutureProductIF
from workspaces.system.schema import AbstractFile, JSONSerializable
......@@ -340,7 +340,7 @@ class Capability(Base, JSONSerializable):
class Transition(Base):
pattern: PatternIF
pattern: str
actions: List[ActionIF]
from_state: State
to_state: State
......
......@@ -50,15 +50,3 @@ class ActionIF:
:param manager: the manager
:return:
"""
class PatternIF:
def matches(self, event: dict) -> bool:
"""
This is most likely going to be implemented as a JSON Path expression, using
the jsonpath-python library: https://pypi.org/project/jsonpath-python/
:param event: a JSON object
:return: true if this pattern matches that event object
"""
raise NotImplementedError
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment