Commit fa79e3af by tiger

节点执行结果

1 parent 56f214da
...@@ -39,7 +39,7 @@ public interface SopNodeExecutor { ...@@ -39,7 +39,7 @@ public interface SopNodeExecutor {
*/ */
default SnapshotStruct prepare(SopStruct sop, SopInstNode node) { default SnapshotStruct prepare(SopStruct sop, SopInstNode node) {
SnapshotStruct es = new SnapshotStruct(); SnapshotStruct es = new SnapshotStruct();
if (StrUtil.length(sop.getInst().getInstSnapshot()) > 3) { if (StrUtil.length(sop.getInst().getInstSnapshot()) > 4) {
// 继承参数 // 继承参数
es = JacksonUtils.fromJson(sop.getInst().getInstSnapshot(), SnapshotStruct.class); es = JacksonUtils.fromJson(sop.getInst().getInstSnapshot(), SnapshotStruct.class);
} else { } else {
......
package cn.com.glsx.process.modules.sop.execute.executor; package cn.com.glsx.process.modules.sop.execute.executor;
import java.util.Map;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import cn.com.glsx.process.common.constant.Constants;
import cn.com.glsx.process.modules.entity.SopInstNode; import cn.com.glsx.process.modules.entity.SopInstNode;
import cn.com.glsx.process.modules.model.SopStruct; import cn.com.glsx.process.modules.model.SopStruct;
import cn.com.glsx.process.modules.sop.execute.SnapshotStruct; import cn.com.glsx.process.modules.sop.execute.SnapshotStruct;
...@@ -18,9 +15,6 @@ public class EndExecutor implements SopNodeExecutor { ...@@ -18,9 +15,6 @@ public class EndExecutor implements SopNodeExecutor {
@Override @Override
public Object execute(SopStruct sop, SopInstNode node, SnapshotStruct executeStruct) throws Exception { public Object execute(SopStruct sop, SopInstNode node, SnapshotStruct executeStruct) throws Exception {
Map<String, Object> resultMap = executeStruct.getResultMap();
resultMap.put(Constants.RES_KEY, Constants.RES_SUCCESS);
return null; return null;
} }
......
...@@ -7,7 +7,6 @@ import org.springframework.stereotype.Service; ...@@ -7,7 +7,6 @@ import org.springframework.stereotype.Service;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import cn.com.glsx.process.common.constant.Constants;
import cn.com.glsx.process.modules.entity.SopInst; import cn.com.glsx.process.modules.entity.SopInst;
import cn.com.glsx.process.modules.entity.SopInstNode; import cn.com.glsx.process.modules.entity.SopInstNode;
import cn.com.glsx.process.modules.model.SopStruct; import cn.com.glsx.process.modules.model.SopStruct;
...@@ -52,12 +51,8 @@ public class JavaExecutor implements SopNodeExecutor { ...@@ -52,12 +51,8 @@ public class JavaExecutor implements SopNodeExecutor {
Object instance = de.execute("Controller", javacode, "execute", new Class[] { JSON.class }, new Object[] { jsonObject }); Object instance = de.execute("Controller", javacode, "execute", new Class[] { JSON.class }, new Object[] { jsonObject });
// 处理返回结果 // 处理返回结果
resultMap.put(Constants.RES_DATE_KEY, instance); return instance;
resultMap.put(Constants.RES_KEY, Constants.RES_SUCCESS);
} catch (Exception e) { } catch (Exception e) {
String message = e.getMessage();
resultMap.put(Constants.RES_FAIL_MESSAGE, message);
resultMap.put(Constants.RES_KEY, Constants.RES_FAIL);
} }
return null; return null;
......
...@@ -45,11 +45,8 @@ public class SqlExecutor implements SopNodeExecutor { ...@@ -45,11 +45,8 @@ public class SqlExecutor implements SopNodeExecutor {
String sql = FreemarkerUtil.processContent(sqlTemplate, executeStruct.toMap()); String sql = FreemarkerUtil.processContent(sqlTemplate, executeStruct.toMap());
int i = mcgBizAdapter.executeUpdate(sql); mcgBizAdapter.executeUpdate(sql);
// 处理执行结果
resultMap.put(Constants.RES_DATE_KEY, i);
resultMap.put(Constants.RES_KEY, Constants.RES_SUCCESS);
} catch (Exception e) { } catch (Exception e) {
String message = e.getMessage(); String message = e.getMessage();
resultMap.put(Constants.RES_FAIL_MESSAGE, message); resultMap.put(Constants.RES_FAIL_MESSAGE, message);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!