|
KIE Remote Services :: Services 6.0.0.Final | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.kie.services.remote.rest.RestProcessRequestBean
@RequestScoped public class RestProcessRequestBean
This class is used by both the RuntimeResource and TaskResource to do the core operations on
the Deployment/Runtime's KieSession and TaskService.
TransactionalExecutor that will ensure transaction is
opened and closed within boundary of the executor invocation.
| Constructor Summary | |
|---|---|
RestProcessRequestBean()
|
|
| Method Summary | |
|---|---|
Object |
doKieSessionOperation(org.kie.api.command.Command<?> cmd,
String deploymentId,
Long processInstanceId,
String errorMsg)
Executes a command on the KieSession from the proper RuntimeManager. |
Object |
doTaskOperation(org.jbpm.services.task.commands.TaskCommand<?> cmd,
String errorMsg)
Executes a command on the TaskService (without synchronizing around the KieSession) |
Object |
doTaskOperationAndSerializeResult(org.jbpm.services.task.commands.TaskCommand<?> cmd,
String errorMsg)
Executes a TaskCommand on the TaskService: this should be used when the TaskCommand
returns an object instance that is also a (persistent) entity, and thus should also be serialized within a
transaction. |
Object |
doTaskOperationOnDeployment(org.jbpm.services.task.commands.TaskCommand<?> cmd,
String deploymentId,
Long processInstanceId,
String errorMsg)
Executes a command on the injected TaskService instance. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RestProcessRequestBean()
| Method Detail |
|---|
public Object doKieSessionOperation(org.kie.api.command.Command<?> cmd,
String deploymentId,
Long processInstanceId,
String errorMsg)
KieSession from the proper RuntimeManager. This method
ends up synchronizing around the retrieved KieSession in order to avoid race-conditions.
cmd - The command to be executed.deploymentId - The id of the runtime.processInstanceId - The process instance id, if available.
Command.
public Object doTaskOperationOnDeployment(org.jbpm.services.task.commands.TaskCommand<?> cmd,
String deploymentId,
Long processInstanceId,
String errorMsg)
TaskService instance.
Should be used only for commands that end up affecting the associated KieSession.
Since the CompleteTaskCommand ends up signalling the KieSession, we make sure to
first retrieve the proper KieSession in order to synchronize around it.
cmd - The command to be executed.errorMsg - The message to be added to any (non-runtime) exceptions thrown.deploymentId - The deployment id of the runtime.
public Object doTaskOperation(org.jbpm.services.task.commands.TaskCommand<?> cmd,
String errorMsg)
TaskService (without synchronizing around the KieSession)
cmd - The command to be executed.errorMsg - The error message to be attached to any exceptions thrown.
public Object doTaskOperationAndSerializeResult(org.jbpm.services.task.commands.TaskCommand<?> cmd,
String errorMsg)
TaskCommand on the TaskService: this should be used when the TaskCommand
returns an object instance that is also a (persistent) entity, and thus should also be serialized within a
transaction.
cmd - The TaskCommand to be executed.errorMsg - The error message that should be associated with any eventual errors or exceptions.
TaskCommand, possibly null.
|
KIE Remote Services :: Services 6.0.0.Final | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||