Class MVELLifeCycleManager

    • 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()
      • 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