diff --git a/src/main/java/org/bdware/sc/ContractProcess.java b/src/main/java/org/bdware/sc/ContractProcess.java index 25159b6..25c0941 100644 --- a/src/main/java/org/bdware/sc/ContractProcess.java +++ b/src/main/java/org/bdware/sc/ContractProcess.java @@ -685,7 +685,7 @@ public class ContractProcess { public void invokeOnStartingDoipServer(ContractNode cn, JsonElement arg) { ContractRequest onStartingDoipServer = new ContractRequest(); - onStartingDoipServer.setAction("invokeOnStartingDoipServer"); + onStartingDoipServer.setAction("onServerStart"); if (arg == null) { if (engine != null && engine.getManifest() != null && engine.getManifest().createParam != null) arg = engine.getManifest().createParam; @@ -700,7 +700,7 @@ public class ContractProcess { } else { onStartingDoipServer.setRequesterDOI("empty"); } - FunctionNode funNode = cn.getFunction("invokeOnStartingDoipServer"); + FunctionNode funNode = cn.getFunction("onServerStart"); try { JsonElement onStartingDoipServerRes = invoke(onStartingDoipServer, funNode).result; @@ -725,7 +725,7 @@ public class ContractProcess { } } catch (Exception e) { - LOGGER.error("DoipLocalSingleton cannot starts properly, plz check the invokeOnStartingDoipServer function"); + LOGGER.error("DoipLocalSingleton cannot starts properly, plz check the onServerStart function"); e.printStackTrace(); } } @@ -739,7 +739,7 @@ public class ContractProcess { } else { funcArgs[2] = "empty"; } - Object result = engine.invokeFunction("invokeOnStartingDoipServer", funcArgs); + Object result = engine.invokeFunction("onServerStart", funcArgs); Map resMap = (Map) result; try { if (!resMap.containsKey("doipAddr")) { @@ -748,7 +748,7 @@ public class ContractProcess { DoipClusterServer.startDoipServer(resMap.get("doipAddr")); } } catch (Exception e) { - LOGGER.error("DoipLocalSingleton cannot starts properly, plz check the invokeOnStartingDoipServer function"); + LOGGER.error("DoipLocalSingleton cannot starts properly, plz check the onServerStart function"); e.printStackTrace(); } }