Adding Jira DataProcessor
This commit is contained in:
@@ -13,7 +13,7 @@ from components.workflows.db_management import WorkflowComponentRuntimeState, \
|
||||
WorkflowComponent, ComponentState
|
||||
from core.instance_manager import InstanceManager
|
||||
from core.utils import get_unique_id, make_safe_id
|
||||
from workflow.engine import WorkflowEngine, TableDataProducer, DefaultDataPresenter, DefaultDataFilter
|
||||
from workflow.engine import WorkflowEngine, TableDataProducer, DefaultDataPresenter, DefaultDataFilter, JiraDataProducer
|
||||
|
||||
grid_settings = DataGridSettings(
|
||||
header_visible=True,
|
||||
@@ -180,19 +180,25 @@ class WorkflowPlayer(BaseComponent):
|
||||
# first reorder the component, according to the connection definitions
|
||||
engine = WorkflowEngine()
|
||||
for component in sorted_components:
|
||||
key = (component.type, component.properties["processor_name"])
|
||||
try:
|
||||
if component.type == ProcessorTypes.Producer and component.properties["processor_name"] == "Repository":
|
||||
if key == (ProcessorTypes.Producer, "Repository"):
|
||||
engine.add_processor(
|
||||
TableDataProducer(self._session,
|
||||
self._settings_manager,
|
||||
component.id,
|
||||
component.properties["repository"],
|
||||
component.properties["table"]))
|
||||
|
||||
elif component.type == ProcessorTypes.Filter and component.properties["processor_name"] == "Default":
|
||||
elif key == (ProcessorTypes.Producer, "Jira"):
|
||||
engine.add_processor(
|
||||
JiraDataProducer(self._session,
|
||||
self._settings_manager,
|
||||
component.id,
|
||||
'issues',
|
||||
component.properties["jira_jql"]))
|
||||
elif key == (ProcessorTypes.Filter, "Default"):
|
||||
engine.add_processor(DefaultDataFilter(component.id, component.properties["filter"]))
|
||||
|
||||
elif component.type == ProcessorTypes.Presenter and component.properties["processor_name"] == "Default":
|
||||
elif key == (ProcessorTypes.Presenter, "Default"):
|
||||
engine.add_processor(DefaultDataPresenter(component.id, component.properties["columns"]))
|
||||
else:
|
||||
raise ValueError(
|
||||
|
||||
Reference in New Issue
Block a user