KIE Remote Services :: Services 6.2.0.CR4

org.kie.remote.services.cdi
Class ProcessRequestBean

java.lang.Object
  extended by org.kie.remote.services.cdi.ProcessRequestBean

@ApplicationScoped
public class ProcessRequestBean
extends Object

This class is used by both the RuntimeResourceImpl and TaskResourceImpl to do the core operations on the Deployment/Runtime's KieSession and TaskService.

It contains the necessary logic to do the following:


Constructor Summary
ProcessRequestBean()
           
 
Method Summary
<T> T
doKieSessionOperation(org.kie.api.command.Command<T> cmd, String deploymentId, Long processInstanceId)
          Executes a command on the KieSession from the proper RuntimeManager.
<T> T
doRestTaskOperation(Long taskId, String deploymentId, Long processInstanceId, org.kie.api.task.model.Task task, org.jbpm.services.task.commands.TaskCommand<T> 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 setProcessService(org.jbpm.services.api.ProcessService processService)
           
 void setUserTaskService(org.jbpm.services.api.UserTaskService userTaskService)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProcessRequestBean

public ProcessRequestBean()
Method Detail

setProcessService

public void setProcessService(org.jbpm.services.api.ProcessService processService)

setUserTaskService

public void setUserTaskService(org.jbpm.services.api.UserTaskService userTaskService)

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 <T> T doKieSessionOperation(org.kie.api.command.Command<T> 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 runtime
processInstanceId - The process instance id (required)
varName - The name of the variable
Returns:
The variable object instance.

doRestTaskOperation

public <T> T doRestTaskOperation(Long taskId,
                                 String deploymentId,
                                 Long processInstanceId,
                                 org.kie.api.task.model.Task task,
                                 org.jbpm.services.task.commands.TaskCommand<T> cmd)

KIE Remote Services :: Services 6.2.0.CR4

Copyright © 2001-2015 JBoss by Red Hat. All Rights Reserved.