diff --git a/reference-examples/integration/src/main/java/com/fluxtion/example/reference/integration/AuditLookupExample.java b/reference-examples/integration/src/main/java/com/fluxtion/example/reference/integration/AuditLookupExample.java index 7d0ee6b..f63a3f5 100644 --- a/reference-examples/integration/src/main/java/com/fluxtion/example/reference/integration/AuditLookupExample.java +++ b/reference-examples/integration/src/main/java/com/fluxtion/example/reference/integration/AuditLookupExample.java @@ -18,7 +18,8 @@ public static void main(String[] args) throws NoSuchFieldException, IllegalAcces //LOOKUP AUDITOR BY NAME MyAuditor myAuditor = processor.getAuditorById("myAuditor"); - System.out.println("\nMyAuditor::invocationCount " + myAuditor.getInvocationCount()); + //PULL DATA FROM AUDITOR + System.out.println("\nPULL MyAuditor::invocationCount " + myAuditor.getInvocationCount()); } public static class MyAuditor implements Auditor { diff --git a/reference-examples/integration/src/main/java/com/fluxtion/example/reference/integration/GetNodeByIdExample.java b/reference-examples/integration/src/main/java/com/fluxtion/example/reference/integration/GetNodeByIdExample.java index 90d52a3..350e5c7 100644 --- a/reference-examples/integration/src/main/java/com/fluxtion/example/reference/integration/GetNodeByIdExample.java +++ b/reference-examples/integration/src/main/java/com/fluxtion/example/reference/integration/GetNodeByIdExample.java @@ -1,32 +1,30 @@ package com.fluxtion.example.reference.integration; import com.fluxtion.compiler.Fluxtion; -import com.fluxtion.compiler.builder.dataflow.DataFlow; import com.fluxtion.runtime.annotations.OnEventHandler; import com.fluxtion.runtime.node.NamedNode; public class GetNodeByIdExample { public static void main(String[] args) throws NoSuchFieldException { - var processor = Fluxtion.interpret(c ->{ - DataFlow.subscribeToNode(new DirtyStateNode()) - .console("Monday is triggered"); - }); + var processor = Fluxtion.interpret(new MondayChecker()); processor.init(); processor.onEvent("Monday"); processor.onEvent("Tuesday"); processor.onEvent("Wednesday"); - DirtyStateNode dirtyStateNode = processor.getNodeById("MondayChecker"); - System.out.println("Monday count:" + dirtyStateNode.getMondayCount() + "\n"); + //LOOKUP USER NODE + MondayChecker mondayChecker = processor.getNodeById("MondayChecker"); + //PULL DATA + System.out.println("PULLING Monday count:" + mondayChecker.getMondayCount()); processor.onEvent("Monday"); - System.out.println("Monday count:" + dirtyStateNode.getMondayCount()); + //PULL DATA + System.out.println("PULLING Monday count:" + mondayChecker.getMondayCount()); } - public static class DirtyStateNode implements NamedNode { - + public static class MondayChecker implements NamedNode { private int mondayCounter = 0; @OnEventHandler