org.osesb.messagepipeline.test.flowcontrolunittest
Class DroolsRuleFlowControlPipelineStage_TestClass
java.lang.Object
org.osesb.messagepipeline.PipelineStage
org.osesb.messagepipeline.builtinstages.FlowControlPipelineStage
org.osesb.messagepipeline.builtinstages.DroolsRuleFlowControlPipelineStage
org.osesb.messagepipeline.test.flowcontrolunittest.DroolsRuleFlowControlPipelineStage_TestClass
public class DroolsRuleFlowControlPipelineStage_TestClass
- extends DroolsRuleFlowControlPipelineStage
Used for unit testing DroolsRuleFlowControlPipelineStage configured
by droolsrule-flowcontrol-pipeline-stage-test-config.xml.
Test class overrides setDroolsFactObjectList() and uses the configured
XPath expressions to extract the contentType attribute from the
XML part of a EAIXMLMessageWithAttachments. The content type is
passed to the configured Drools rules as a fact. The Drools rule selects
the MessagePipeline branch to run based on the content type of the
attachment.
|
Method Summary |
static void |
main(java.lang.String[] args)
main() For testing and sandboxing. |
protected java.util.List |
setDroolsFactObjectList(EAIMessage eaiMessage)
Extract objects from the eaiMessage and return List of Objects that
will be asserted into the Drools working memory for consideration by
the configured Drools rules. |
| Methods inherited from class org.osesb.messagepipeline.PipelineStage |
commit, getMessagePipelineContext, getNextStage, getParentMessagePipeline, getPipelineStageConfiguration, getPreviousStage, handlePipelineException, handlePipelineException, logMessage, propagate, rollback, setNextStage, setOutputMessage, setPreviousStage, setResultMessage |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DroolsRuleFlowControlPipelineStage_TestClass
public DroolsRuleFlowControlPipelineStage_TestClass(MessagePipeline parentMessagePipeline,
PipelineStageConfiguration pipelineStageConfiguration)
throws java.lang.Exception
- Creates a new instance of DroolsRuleFlowControlPipelineStage_TestClass.
- Parameters:
parentMessagePipeline - The MessagePipeline that constructed
this PipelineStage.pipelineStageConfiguration - A PipelineStageConfiguration for
this PipelineStage.
- Throws:
java.lang.Exception - if constructed with a null parentMessagePipeline or a
null pipelineStageConfiguration.
setDroolsFactObjectList
protected java.util.List setDroolsFactObjectList(EAIMessage eaiMessage)
throws java.lang.Exception
- Extract objects from the eaiMessage and return List of Objects that
will be asserted into the Drools working memory for consideration by
the configured Drools rules.
Test class overrides setDroolsFactObjectList() and uses the configured
XPath expressions to extract the contentType attribute from the
XML part of a EAIXMLMessageWithAttachments. The content type is
passed to the configured Drools rules as a fact. The Drools rule selects
the MessagePipeline branch to run based on the content type of the
attachment.
- Overrides:
setDroolsFactObjectList in class DroolsRuleFlowControlPipelineStage
- Parameters:
eaiMessage - The EAI message that was passed to runStage() which
encapsulates the fact Objects that will be asserted into the Drools
working memory.
- Returns:
- a List of Objects that will be asserted into the Drools
working memory.
- Throws:
java.lang.Exception - if an error occurs while extracting fact Objects.
main
public static void main(java.lang.String[] args)
- main() For testing and sandboxing.
- Parameters:
args - commandline arguments