2014-05-03 41 views
0

在BRMS 5(帶有JBPM 5.2)中,當我進入http://localhost:8080/business-central-server/rs/server/resources/jbpm時,我列出了所有可用的方法,但在BRMS 6中沒有商務中心服務器應用程序,它只是商業中心 - 我在哪裏可以找到類似的頁面?JBPM 6 REST接口響應404

我也試圖與REST連接使用下列代碼:

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 = "[email protected]"; 
     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"); 
    } 
} 

我有那麼例外:

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) 

回答

0

可以嘗試更改URL在代碼:「HTTP ://:8080/business-central-server「?沒有<>

+1

感謝您的重播。我無法連接它,我知道爲什麼。 業務中心服務器是BRMS 5的一部分,但不是BRMS 6.我的問題是新版本的BRMS沒有執行環境,所以REST API僅限於與存儲庫連接的部分。它適用於具有執行環境的BPM套件。 – amalgamat