Suppport of version 7.14.0
Adding spring boot kie-server
This commit is contained in:
parent
c06a34788a
commit
41e4385d2b
26 changed files with 76011 additions and 4886 deletions
|
|
@ -7,7 +7,7 @@ import javax.ws.rs.core.MediaType;
|
|||
public interface GenericlRestAPI {
|
||||
|
||||
@POST
|
||||
@Path("/services/rest/server/containers/instances/generic/run/{id}/{processId}/{className}")
|
||||
@Path("/containers/instances/generic/run/{id}/{processId}/{className}")
|
||||
@Produces("application/json")
|
||||
@Consumes(value = MediaType.APPLICATION_JSON)
|
||||
String runSession(@PathParam("id") String id,
|
||||
|
|
@ -16,7 +16,7 @@ public interface GenericlRestAPI {
|
|||
Object objectRequest);
|
||||
|
||||
@POST
|
||||
@Path("/services/rest/server/containers/instances/generic/runSessionName/{id}/{processId}/{className}/{sessionName}")
|
||||
@Path("/containers/instances/generic/runSessionName/{id}/{processId}/{className}/{sessionName}")
|
||||
@Produces("application/json")
|
||||
@Consumes(value = MediaType.APPLICATION_JSON)
|
||||
String runSessionWithName(@PathParam("id") String id,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package org.chtijbug.drools.kieserver.drools.rest;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.chtijbug.drools.common.rest.InputElement;
|
||||
import org.chtijbug.drools.common.rest.MultipleInputs;
|
||||
|
|
@ -23,6 +24,7 @@ import java.util.Map;
|
|||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
@Api(value = "Rules evaluation :: Chtijbug Rest interface")
|
||||
@Path("server/containers/instances/generic/")
|
||||
public class GenericResource {
|
||||
|
||||
|
|
@ -142,9 +144,9 @@ public class GenericResource {
|
|||
**/
|
||||
@POST
|
||||
@Path("/run/{id}/{processId}/{className}")
|
||||
@Consumes({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
|
||||
@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
|
||||
public Object runSession(@PathParam("id") String id,
|
||||
@Consumes({MediaType.APPLICATION_JSON})
|
||||
@Produces({MediaType.APPLICATION_JSON})
|
||||
public String runSession(@PathParam("id") String id,
|
||||
@PathParam("processId") String processID,
|
||||
@PathParam("className") String className,
|
||||
String objectRequest) {
|
||||
|
|
@ -212,7 +214,8 @@ public class GenericResource {
|
|||
}
|
||||
//response.setSessionLogging(jsonInString);
|
||||
logger.debug("Returning OK response with content '{}'", response);
|
||||
return response;
|
||||
String responseText = mapper.writeValueAsString(response);
|
||||
return responseText;
|
||||
} catch (Exception e) {
|
||||
// in case marshalling failed return the FireAllRulesAndStartProcess container response to keep backward compatibility
|
||||
String responseMessage = "Execution failed with error : " + e.getMessage();
|
||||
|
|
@ -230,7 +233,7 @@ public class GenericResource {
|
|||
@Path("/runSessionName/{id}/{processId}/{className}/{sessionName}")
|
||||
@Consumes({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
|
||||
@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
|
||||
public Object runSessionWithName(@PathParam("id") String id,
|
||||
public String runSessionWithName(@PathParam("id") String id,
|
||||
@PathParam("processId") String processID,
|
||||
@PathParam("className") String className,
|
||||
@PathParam("sessionName") String sessionName,
|
||||
|
|
@ -260,7 +263,8 @@ public class GenericResource {
|
|||
}
|
||||
//response.setSessionLogging(jsonInString);
|
||||
logger.debug("Returning OK response with content '{}'", objectRequest);
|
||||
return response;
|
||||
String responseText = mapper.writeValueAsString(response);
|
||||
return responseText;
|
||||
} catch (Exception e) {
|
||||
// in case marshalling failed return the FireAllRulesAndStartProcess container response to keep backward compatibility
|
||||
String responseMessage = "Execution failed with error : " + e.getMessage();
|
||||
|
|
|
|||
Loading…
Add table
editor.link_modal.header
Reference in a new issue