문제

In BRMS 5 (with JBPM 5.2) when I go to the http://localhost:8080/business-central-server/rs/server/resources/jbpm I have listed all available methods, but in BRMS 6 there is no business-central-server application, it's only business-central - where can I find similar page there?

I also tried to connect with REST using following code:

public class Test {
    public static void main(String[] args) throws MalformedURLException {
        String deploymentId = "com.example.test:test_project:1.0";
        URL baseUrl = new URL("http://localhost:8080/business-central");
        String user = "aswu";
        String password = "uwsa@123";
        RemoteRestRuntimeFactory restSessionFactory = new RemoteRestRuntimeFactory(
                deploymentId, baseUrl, user, password);
        System.out.println("Is RemoteRestRuntimeFactory created : "
            + (restSessionFactory != null));
        RemoteRuntimeEngine runtimeEngine = restSessionFactory
                .newRuntimeEngine();
        KieSession kieSession = runtimeEngine.getKieSession();
        System.out.println("Is KieSession obtained : " + (kieSession != null));
        kieSession.startProcess("test-project.test-process");
    }
}

I've got then the exception:

Exception in thread "main" java.lang.RuntimeException: Error invoking StartProcessCommand via REST (http://localhost:8080/business-central/rest/runtime/com.example.test:test_project:1.0/execute):

<html><head><title>JBoss Web/7.2.2.Final-redhat-1 - JBWEB000064: Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>JBWEB000065: HTTP Status 404 - Could not find resource for relative : /runtime/com.example.test:test_project:1.0/execute of full path: http://localhost:8080/business-central/rest/runtime/com.example.test:test_project:1.0/execute</h1><HR size="1" noshade="noshade"><p><b>JBWEB000309: type</b> JBWEB000067: Status report</p><p><b>JBWEB000068: message</b> <u>Could not find resource for relative : /runtime/com.example.test:test_project:1.0/execute of full path: http://localhost:8080/business-central/rest/runtime/com.example.test:test_project:1.0/execute</u></p><p><b>JBWEB000069: description</b> <u>JBWEB000124: The requested resource is not available.</u></p><HR size="1" noshade="noshade"><h3>JBoss Web/7.2.2.Final-redhat-1</h3></body></html>
at org.kie.services.client.api.command.AbstractRemoteCommandObject.executeRestCommand(AbstractRemoteCommandObject.java:342)
at org.kie.services.client.api.command.AbstractRemoteCommandObject.execute(AbstractRemoteCommandObject.java:110)
at org.drools.core.command.impl.CommandBasedStatefulKnowledgeSession.startProcess(CommandBasedStatefulKnowledgeSession.java:232)
at org.drools.core.command.impl.CommandBasedStatefulKnowledgeSession.startProcess(CommandBasedStatefulKnowledgeSession.java:223)
at pl.worc.pwr.student.vl.workflow.brms.Test.main(Test.java:30)
도움이 되었습니까?

해결책

Maybe you had installed BRMS, in authoring environment, not execution one.So you cannot run the process on it.

https://community.jboss.org/thread/240717

다른 팁

can you try changing the URL in your code to: "http://:8080/business-central-server" ? without the <>

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top