繁体   English   中英

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

[英]Unable to add Java imports in KIE workbench (jBPM)

我是jBPM的新手。 我正在使用jBPM KIE工作台。 如第二图中所示,我在KIE外部数据对象部分中添加了必要的导入。 为什么会出现错误? 我还需要对导入做其他事情吗?

我收到以下错误消息:

[KBase: defaultKieBase]: Process Compilation error URL cannot be resolved to a type
URL cannot be resolved to a type
HttpURLConnection cannot be resolved to a type
HttpURLConnection cannot be resolved to a type
BufferedReader cannot be resolved to a type
BufferedReader cannot be resolved to a type
InputStreamReader cannot be resolved to a type

Java代码:

    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);
    }

凯工作台

外部数据模型

内置的REST工作项应该是一个很好的起点。

创建一个项目并添加一个业务流程:

新业务流程

然后添加内置的Rest Workitem

添加内置的Rest Workitem

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

选择剩余工作项数据分配

并输入“休息电话”的值

并输入“休息电话”的值

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM