Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be 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"

 
(3 intermediate revisions by the same user not shown)
Line 6: Line 6:
  
 
=Suggested=
 
=Suggested=
 +
The main idea is to configure both parameters in the Router/Listener configuration
 +
 +
 
== WorkflowProcessor API update==
 
== WorkflowProcessor API update==
  
Line 41: Line 44:
 
<source lang="xml">
 
<source lang="xml">
 
<Task>
 
<Task>
  <Fetch Filter="myFilter"
+
   <Send Broker="b1" Queue="q1" RecordFilter="myFilter"/>
   <Send Broker="b1" Queue="q1"/>
+
 
</Task>
 
</Task>
 
</source>
 
</source>
Line 51: Line 53:
 
</Task>
 
</Task>
 
</source>
 
</source>
 +
 +
Depending on flags Router/Listener did blackboard synchronization/commit automatically at the start of Task list process and before/after operations.
  
 
It's suggested  
 
It's suggested  
Line 58: Line 62:
 
<source lang="xml">
 
<source lang="xml">
 
<Task RecordFilter="InputFilterForRule">
 
<Task RecordFilter="InputFilterForRule">
   <Process Workflow="SomePipelineName" RecordFilter="workflow-filter"/>
+
   <Process Workflow="SomePipelineName" RecordFilter="workflow-filter1"/>
  <Send Broker="b1" Queue="q1" RecordFilter="send-filter"/>
+
 
</Task>
 
</Task>
 
</source>
 
</source>
 +
 +
The result of configuration:
 +
# input record will be filtered by the filter "InputFilterForRule"
 +
# record will be synchronized with blackboard
 +
# "SomePipelineName" pipeline will be executed with record-filter "workflow-filter1"
 +
# record will be synchronized with blackboard
 +
# record will be committed

Latest revision as of 07:53, 25 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

The main idea is to configure both parameters in the Router/Listener configuration


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>
  <Send Broker="b1" Queue="q1" RecordFilter="myFilter"/>
</Task>
<Task>
  <Process Workflow="SomePipelineName"/>
</Task>

Depending on flags Router/Listener did blackboard synchronization/commit automatically at the start of Task list process and before/after operations.

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-filter1"/>
</Task>

The result of configuration:

  1. input record will be filtered by the filter "InputFilterForRule"
  2. record will be synchronized with blackboard
  3. "SomePipelineName" pipeline will be executed with record-filter "workflow-filter1"
  4. record will be synchronized with blackboard
  5. record will be committed

Back to the top