为了账号安全,请及时绑定邮箱和手机立即绑定

无法在 KIE 工作台 (jBPM) 中添加 Java 导入

无法在 KIE 工作台 (jBPM) 中添加 Java 导入

慕尼黑8549860 2022-12-28 16:12:01
我是 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:

//img1.sycdn.imooc.com//63abfa95000152fa08900427.jpg

然后添加内置的 Rest Workitem

//img1.sycdn.imooc.com//63abfaa00001bf2d07050436.jpg

然后打开 Rest Workitem Properties 并选择数据分配

//img1.sycdn.imooc.com//63abfaac0001a3f413390889.jpg

并输入 Rest Call 的值

//img1.sycdn.imooc.com//63abfabc00013b4413430892.jpg


查看完整回答
反对 回复 2022-12-28
  • 1 回答
  • 0 关注
  • 100 浏览

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号