With implementations of this interface resulting Events are created, when a ChainedEvaluationFunction is completing its round trip. All result Events from the inner state EvaluationFunctions of the ChainedEvaluationFunction are passed to its “process” method, together with the EvaluationContext, where this class can publish its own resulting Events, which it must self create.

Code example :

ChainedProcessingCompleteExtractor extractor = (ChainProcessingCompleteExtractor) (events, context) -> 
    context.collect(
        context.getEventBuilder()
            .withEvent("NAME_OF_RESULT_EVENT")
            .withSource(context.get().getSource())
            .withTimestamp(context.get().getTimestamp())
            .withParameter("state1Result", events.get("state1").getParameter("result"))
            .withParameter("state2Result", events.get("state2").getParameter("result"))
            .withParameter("state3Result", events.get("state3").getParameter("result"))
            .withParameter("state4Result", events.get("state4").getParameter("result"))
            .build();    
    );

In this example the ChainedEvaluationFunction has at least 4 states, which are returning Events with the names “state1Result”, “state2Result” …

A resulting Event is being created with the 4 results of the state EvaluationFunctions result Events.

The resulting Event is passed to the context.

Back to top

Reflow Maven skin by Andrius Velykis.