我是 jBPM 的新手。我正在使用 jBPM KIE 工作台。正如您在第二张图片中看到的,我在 KIE 外部数据对象部分添加了必要的导入。为什么我会收到错误?我需要对进口商品做其他事情吗?我收到一个抛出的错误:[KBase: defaultKieBase]: Process Compilation error URL cannot be resolved to a typeURL cannot be resolved to a typeHttpURLConnection cannot be resolved to a typeHttpURLConnection cannot be resolved to a typeBufferedReader cannot be resolved to a typeBufferedReader cannot be resolved to a typeInputStreamReader cannot be resolved to a typeJava代码: try { URL url = new URL("http://localhost:8080/users"); HttpURLConnection con = (HttpURLConnection) url.openConnection(); con.setRequestMethod("GET"); con.setRequestProperty("Content-Type", "application/json"); BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream())); String inputLine; StringBuffer content = new StringBuffer(); while ((inputLine = in.readLine()) != null) { content.append(inputLine); } in.close(); System.out.println(content); } catch(Exception e){ throw new RuntimeException(e); }
1 回答

holdtom
TA贡献1805条经验 获得超10个赞
内置的 REST 工作项应该是一个很好的起点。
创建一个项目并添加一个 BusinessProcess:
然后添加内置的 Rest Workitem
然后打开 Rest Workitem Properties 并选择数据分配
并输入 Rest Call 的值
添加回答
举报
0/150
提交
取消