dnet-applications/libs/dnet-wf-service/src/main/java/eu/dnetlib/manager/wf/nodes/test/Test01Node.java

36 lines
831 B
Java

package eu.dnetlib.manager.wf.nodes.test;
import eu.dnetlib.manager.wf.annotations.WfInputParam;
import eu.dnetlib.manager.wf.annotations.WfNode;
import eu.dnetlib.manager.wf.annotations.WfOutputParam;
import eu.dnetlib.manager.wf.nodes.AbstractJobNode;
@WfNode("test01")
public class Test01Node extends AbstractJobNode {
@WfInputParam
private String message;
@WfInputParam
private int times;
@WfOutputParam
private String response;
public Test01Node() {
super(false);
}
@Override
protected void execute() {
System.out.println("************************");
System.out.println("* Instance: " + toString());
for (int i = 0; i < times; i++) {
System.out.println("* " + i + " - " + message);
}
System.out.println("************************");
response = "I printed the message [" + message + "]";
}
}