package com.smtaiserver.smtaiserver.javaai.jsonflow.core;
|
|
import com.smtaiserver.smtaiserver.javaai.SMTJavaAIError;
|
import com.smtservlet.util.Json;
|
|
public abstract class SMTJsonFlowNode
|
{
|
protected SMTJsonFlowManager _manager;
|
private String _id;
|
private String _title;
|
|
public abstract SMTJavaAIError executeFlowNode(SMTJsonFlowExecArg execArg) throws Exception;
|
|
public SMTJsonFlowNodeExec createFlowNodeExec()
|
{
|
SMTJsonFlowNodeExec exec = new SMTJsonFlowNodeExec();
|
exec.intiInstance(this);
|
|
return exec;
|
}
|
|
public boolean isStartNode()
|
{
|
return false;
|
}
|
|
public boolean isSuspendNode()
|
{
|
return false;
|
}
|
|
public void initInstane(SMTJsonFlowManager manager, Json jsonNode) throws Exception
|
{
|
_manager = manager;
|
_id = jsonNode.getJson("id").asString();
|
Json jsonData = jsonNode.safeGetJson("data");
|
if(jsonData != null)
|
{
|
_title = jsonData.safeGetStr("title", _id);
|
}
|
}
|
|
public void initEdge(SMTJsonFlowNode tagNode, Json jsonEdge)
|
{
|
|
}
|
|
public void afterInstance() throws Exception
|
{
|
}
|
|
public String getId()
|
{
|
return _id;
|
}
|
|
public String getTitle()
|
{
|
return _title;
|
}
|
}
|