Package org.jbpm.kie.services.impl

## Class AdHocProcessServiceImpl

- java.lang.Object
- - org.jbpm.kie.services.impl.AdHocProcessServiceImpl

- All Implemented Interfaces:
    `VariablesAware`, `AdHocProcessService`
  Direct Known Subclasses:
    `AdHocProcessServiceCDIImpl`

      public class AdHocProcessServiceImpl
      extends Object
      implements AdHocProcessService, VariablesAware

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected RuntimeDataService` | `dataService` |
    `protected DeploymentService` | `deploymentService` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `AdHocProcessServiceImpl()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected void` | `disposeRuntimeEngine​(org.kie.api.runtime.manager.RuntimeManager manager, org.kie.api.runtime.manager.RuntimeEngine engine)` |
    `<T> T` | `process​(T variables, ClassLoader cl)` | Generic processing method that might be simply returning same instance of variables if no processing is required.
    `void` | `setDataService​(RuntimeDataService dataService)` |
    `void` | `setDeploymentService​(DeploymentService deploymentService)` |
    `Long` | `startProcess​(String deploymentId, String processId, org.kie.internal.process.CorrelationKey correlationKey, Map<String,​Object> params, Long parentProcessInstanceId)` | Starts a process with a map of variables.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### deploymentService

          protected DeploymentService deploymentService

    - #### dataService

          protected RuntimeDataService dataService

  - ### Constructor Detail

    - #### AdHocProcessServiceImpl

          public AdHocProcessServiceImpl()

  - ### Method Detail

    - #### setDeploymentService

          public void setDeploymentService​(DeploymentService deploymentService)

    - #### setDataService

          public void setDataService​(RuntimeDataService dataService)

    - #### startProcess

          public Long startProcess​(String deploymentId,
                                   String processId,
                                   org.kie.internal.process.CorrelationKey correlationKey,
                                   Map<String,​Object> params,
                                   Long parentProcessInstanceId)

      Description copied from interface: `AdHocProcessService`
      Starts a process with a map of variables.
      Specified by:
        `startProcess` in interface `AdHocProcessService`
      Parameters:
        `deploymentId` - deployment information for the process's kjar
        `processId` - The process's identifier
        `correlationKey` - correlation key to be assigned to process instance - must be unique
        `params` - process variables
      Returns:
        process instance identifier

    - #### process

          public <T> T process​(T variables,
                               ClassLoader cl)

      Description copied from interface: `VariablesAware`
      Generic processing method that might be simply returning same instance of variables if no processing is required.
      Specified by:
        `process` in interface `VariablesAware`
      Parameters:
        `variables` - object that holds varialble(s)
        `cl` - classloader that shall be used to operate on the variables e.g. project class loader
      Returns:

    - #### disposeRuntimeEngine

          protected void disposeRuntimeEngine​(org.kie.api.runtime.manager.RuntimeManager manager,
                                              org.kie.api.runtime.manager.RuntimeEngine engine)