Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "SMILA/Specifications/RecordWorkflowDiscussion09"

Line 1: Line 1:
=Wanted=
+
Based on discussion with Sebastian Voigt
  
# it's wanted to have ability to filter record in Router/Listener before starting any operations
+
=Wanted=
 +
# it's wanted to have ability to filter record in Router/Listener before starting any operations/ or blackboard synchronization
 
# it's wanted to configure ODEWorkflowProcessor with record-filter used.
 
# it's wanted to configure ODEWorkflowProcessor with record-filter used.
  
 
=Suggested=
 
=Suggested=
== WorkflowProcessor ==
+
== WorkflowProcessor API update==
=== Problems ===
+
  
 
Now WorkflowProcessor API accepts series of Ids only for starting pipelines.
 
Now WorkflowProcessor API accepts series of Ids only for starting pipelines.
Line 20: Line 20:
 
ODEWorkflowProcessor implementation is reading property "record.filter" from it's own configuration file and filtering all records before processing with only one filter.
 
ODEWorkflowProcessor implementation is reading property "record.filter" from it's own configuration file and filtering all records before processing with only one filter.
  
=== Suggested ===
+
It's suggested to configure record filter in Router/Listener rules. WorkflowProcessor public API should accepts record or Id + filterName.
To configure record filter in Router/Listener rules
+
 
+
WorkflowProcessor public API should accepts record or Id + filterName.
+
 
+
 
<source lang="java">
 
<source lang="java">
 
public interface WorkflowProcessor {
 
public interface WorkflowProcessor {
 
   ...
 
   ...
   void process(String workflowName, record) throws ProcessingException;
+
   void process(String workflowName, Record record) throws ProcessingException;
 
   ...
 
   ...
 
}
 
}
 
</source>
 
</source>
 
 
Or
 
Or
 
 
<source lang="java">
 
<source lang="java">
 
public interface WorkflowProcessor {
 
public interface WorkflowProcessor {
 
   ...
 
   ...
   void process(String workflowName, Id id, filterName) throws ProcessingException;
+
   void process(String workflowName, Id id, String filterName) throws ProcessingException;
 
   ...
 
   ...
 
}
 
}
 +
</source>
 +
== Router/Listener configuration update==
 +
Now Router/Listener based on configured list of tasks to execute.
 +
 +
<source lang="xml">
 +
<Task>
 +
  <Fetch Filter="myFilter"
 +
  <Send Broker="b1" Queue="q1"/>
 +
</Task>
 +
</source>
 +
 +
<source lang="xml">
 +
<Task>
 +
  <Process Workflow="SomePipelineName"/>
 +
</Task>
 +
</source>
 +
 +
It's suggested
 +
# to configure input filter in Task node as attribute
 +
# to configure filter for every task as attribute
 +
 +
<source lang="xml">
 +
<Task RecordFilter="InputFilterForRule">
 +
  <Process Workflow="SomePipelineName" RecordFilter="workflow-filter"/>
 +
  <Send Broker="b1" Queue="q1" RecordFilter="send-filter"/>
 +
</Task>
 
</source>
 
</source>

Revision as of 11:17, 17 November 2008

Based on discussion with Sebastian Voigt

Wanted

  1. it's wanted to have ability to filter record in Router/Listener before starting any operations/ or blackboard synchronization
  2. it's wanted to configure ODEWorkflowProcessor with record-filter used.

Suggested

WorkflowProcessor API update

Now WorkflowProcessor API accepts series of Ids only for starting pipelines.

public interface WorkflowProcessor {
  ...
  Id[] process(String workflowName, Id[] recordIds) throws ProcessingException;
  ...
}

ODEWorkflowProcessor implementation is reading property "record.filter" from it's own configuration file and filtering all records before processing with only one filter.

It's suggested to configure record filter in Router/Listener rules. WorkflowProcessor public API should accepts record or Id + filterName.

public interface WorkflowProcessor {
  ...
  void process(String workflowName, Record record) throws ProcessingException;
  ...
}

Or

public interface WorkflowProcessor {
  ...
  void process(String workflowName, Id id, String filterName) throws ProcessingException;
  ...
}

Router/Listener configuration update

Now Router/Listener based on configured list of tasks to execute.

<Task>
  <Fetch Filter="myFilter"
  <Send Broker="b1" Queue="q1"/>
</Task>
<Task>
  <Process Workflow="SomePipelineName"/>
</Task>

It's suggested

  1. to configure input filter in Task node as attribute
  2. to configure filter for every task as attribute
<Task RecordFilter="InputFilterForRule">
  <Process Workflow="SomePipelineName" RecordFilter="workflow-filter"/>
  <Send Broker="b1" Queue="q1" RecordFilter="send-filter"/>
</Task>

Back to the top