org.jbpm.services.task.internals.lifecycle

## Class MVELLifeCycleManager

- java.lang.Object
- - org.jbpm.services.task.internals.lifecycle.MVELLifeCycleManager

- All Implemented Interfaces:
    LifeCycleManager

      public class MVELLifeCycleManager
      extends Object
      implements LifeCycleManager

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MVELLifeCycleManager()`
    `MVELLifeCycleManager(org.kie.internal.task.api.TaskContext context, org.kie.internal.task.api.TaskPersistenceContext persistenceContext, org.kie.internal.task.api.TaskContentService contentService, TaskEventSupport taskEventSupport)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static org.kie.api.task.model.Status` | `assignOwnerAndStatus(org.kie.internal.task.api.model.InternalTaskData taskData, List<org.kie.api.task.model.OrganizationalEntity> potentialOwners)` This method will potentially assign the actual owner of this TaskData and set the status of the data.
    `static Object` | `eval(Reader reader)`
    `static Object` | `eval(Reader reader, Map<String,Object> vars)`
    `static Object` | `eval(String str, Map<String,Object> vars)`
    `protected org.kie.internal.runtime.error.ExecutionErrorHandler` | `getExecutionErrorHandler()`
    `static Map<org.kie.internal.task.api.model.Operation,List<OperationCommand>>` | `initMVELOperations()`
    `protected void` | `invokeAssignmentService(org.kie.api.task.model.Task taskImpl, org.kie.internal.task.api.TaskContext context, String excludedUser)`
    `void` | `setPersistenceContext(org.kie.internal.task.api.TaskPersistenceContext persistenceContext)`
    `void` | `setTaskContentService(org.kie.internal.task.api.TaskContentService taskContentService)`
    `void` | `setTaskEventSupport(TaskEventSupport taskEventSupport)`
    `void` | `taskOperation(org.kie.internal.task.api.model.Operation operation, long taskId, String userId, String targetEntityId, Map<String,Object> data, List<String> groupIds, org.kie.api.task.model.OrganizationalEntity... entities)`
    `static String` | `toString(Reader reader)`

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

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

- - ### Constructor Detail

    - #### MVELLifeCycleManager

          public MVELLifeCycleManager()

    - #### MVELLifeCycleManager

          public MVELLifeCycleManager(org.kie.internal.task.api.TaskContext context,
                                      org.kie.internal.task.api.TaskPersistenceContext persistenceContext,
                                      org.kie.internal.task.api.TaskContentService contentService,
                                      TaskEventSupport taskEventSupport)

  - ### Method Detail

    - #### setPersistenceContext

          public void setPersistenceContext(org.kie.internal.task.api.TaskPersistenceContext persistenceContext)

    - #### setTaskEventSupport

          public void setTaskEventSupport(TaskEventSupport taskEventSupport)

    - #### setTaskContentService

          public void setTaskContentService(org.kie.internal.task.api.TaskContentService taskContentService)

    - #### taskOperation

          public void taskOperation(org.kie.internal.task.api.model.Operation operation,
                                    long taskId,
                                    String userId,
                                    String targetEntityId,
                                    Map<String,Object> data,
                                    List<String> groupIds,
                                    org.kie.api.task.model.OrganizationalEntity... entities)
                             throws org.kie.internal.task.exception.TaskException

      Specified by:
        `taskOperation` in interface `LifeCycleManager`
      Throws:
        `org.kie.internal.task.exception.TaskException`

    - #### invokeAssignmentService

          protected void invokeAssignmentService(org.kie.api.task.model.Task taskImpl,
                                                 org.kie.internal.task.api.TaskContext context,
                                                 String excludedUser)

    - #### initMVELOperations

          public static Map<org.kie.internal.task.api.model.Operation,List<OperationCommand>> initMVELOperations()

    - #### toString

          public static String toString(Reader reader)
                                 throws IOException

      Throws:
        `IOException`

    - #### eval

          public static Object eval(Reader reader)

    - #### eval

          public static Object eval(Reader reader,
                                    Map<String,Object> vars)

    - #### eval

          public static Object eval(String str,
                                    Map<String,Object> vars)

    - #### assignOwnerAndStatus

          public static org.kie.api.task.model.Status assignOwnerAndStatus(org.kie.internal.task.api.model.InternalTaskData taskData,
                                                                           List<org.kie.api.task.model.OrganizationalEntity> potentialOwners)

      This method will potentially assign the actual owner of this TaskData and set the status of the data.
    - If there is only 1 potential owner, and it is a `User`, that will become the actual owner of the TaskData and the status will be set to `Status.Reserved`.
    - f there is only 1 potential owner, and it is a `Group`, no owner will be assigned and the status will be set to `Status.Ready`.
    - If there are more than 1 potential owners, the status will be set to `Status.Ready`.
    - otherwise, the task data will be unchanged

Parameters:
  `taskdata` - - task data
  `potentialOwners` - - list of potential owners
Returns:
  current status of task data

- #### getExecutionErrorHandler

      protected org.kie.internal.runtime.error.ExecutionErrorHandler getExecutionErrorHandler()

Copyright © 2001–2020 JBoss by Red Hat. All rights reserved.