org.kie.remote.services.cdi
Class ProcessRequestBean
java.lang.Object
org.kie.remote.services.cdi.ProcessRequestBean
@ApplicationScoped
public class ProcessRequestBean
- extends Object
This class is used by both the RuntimeResource and TaskResource to do the core operations on
the Deployment/Runtime's KieSession and TaskService.
It contains the necessary logic to do the following:
- Retrieve the KieSession or TaskService
- Execute the submitted command
|
Method Summary |
Object |
doKieSessionOperation(org.kie.api.command.Command<?> cmd,
String deploymentId,
Long processInstanceId)
Executes a command on the KieSession from the proper RuntimeManager. |
Object |
doRestTaskOperation(Long taskId,
String deploymentId,
Long processInstanceId,
org.kie.api.task.model.Task task,
org.jbpm.services.task.commands.TaskCommand<?> cmd)
|
org.jbpm.process.audit.AuditLogService |
getAuditLogService()
|
Object |
getVariableObjectInstanceFromRuntime(String deploymentId,
long processInstanceId,
String varName)
Returns the actual variable instance from the runtime (as opposed to retrieving the string value of the
variable via the history/audit operations. |
void |
initAuditLogService()
|
void |
processCommand(org.kie.api.command.Command cmd,
JaxbCommandsRequest request,
int i,
JaxbCommandsResponse jaxbResponse)
|
void |
setAuditLogService(org.jbpm.process.audit.AuditLogService auditLogService)
|
void |
setInjectedTaskService(org.kie.api.task.TaskService taskService)
|
void |
setRuntimeMgrMgr(DeploymentInfoBean runtimeMgrMgr)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProcessRequestBean
public ProcessRequestBean()
setRuntimeMgrMgr
public void setRuntimeMgrMgr(DeploymentInfoBean runtimeMgrMgr)
setInjectedTaskService
public void setInjectedTaskService(org.kie.api.task.TaskService taskService)
setAuditLogService
public void setAuditLogService(org.jbpm.process.audit.AuditLogService auditLogService)
initAuditLogService
@PostConstruct
public void initAuditLogService()
getAuditLogService
public org.jbpm.process.audit.AuditLogService getAuditLogService()
processCommand
public void processCommand(org.kie.api.command.Command cmd,
JaxbCommandsRequest request,
int i,
JaxbCommandsResponse jaxbResponse)
doKieSessionOperation
public Object doKieSessionOperation(org.kie.api.command.Command<?> cmd,
String deploymentId,
Long processInstanceId)
- Executes a command on the
KieSession from the proper RuntimeManager. This method
ends up synchronizing around the retrieved KieSession in order to avoid race-conditions.
- Parameters:
cmd - The command to be executed.deploymentId - The id of the runtime.processInstanceId - The process instance id, if available.
- Returns:
- The result of the
Command.
getVariableObjectInstanceFromRuntime
public Object getVariableObjectInstanceFromRuntime(String deploymentId,
long processInstanceId,
String varName)
- Returns the actual variable instance from the runtime (as opposed to retrieving the string value of the
variable via the history/audit operations.
- Parameters:
deploymentId - The id of the runtimeprocessInstanceId - The process instance id (required)varName - The name of the variable
- Returns:
- The variable object instance.
doRestTaskOperation
public Object doRestTaskOperation(Long taskId,
String deploymentId,
Long processInstanceId,
org.kie.api.task.model.Task task,
org.jbpm.services.task.commands.TaskCommand<?> cmd)
Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.