All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.flowable.task.api.TaskQuery Maven / Gradle / Ivy

There is a newer version: 7.1.0
Show newest version
/* Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.flowable.task.api;

import java.util.List;

/**
 * Allows programmatic querying of {@link Task}s;
 * 
 * @author Joram Barrez
 * @author Falko Menge
 * @author Tijs Rademakers
 */
public interface TaskQuery extends TaskInfoQuery {

    /** Only select tasks which don't have an assignee. */
    TaskQuery taskUnassigned();

    /** Only select tasks with the given {@link DelegationState}. */
    TaskQuery taskDelegationState(DelegationState delegationState);

    /**
     * Select tasks that has been claimed or assigned to user or waiting to claim by user (candidate user or groups). You can invoke {@link #taskCandidateGroupIn(List)} to include tasks that can be
     * claimed by a user in the given groups while set property dbIdentityUsed to false in process engine configuration or using custom session factory of
     * GroupIdentityManager.
     */
    TaskQuery taskCandidateOrAssigned(String userIdForCandidateAndAssignee);

    /** Only select tasks that have no parent (i.e. do not select subtasks). */
    TaskQuery excludeSubtasks();

    /**
     * Only selects tasks which are suspended, because its process instance was suspended.
     */
    TaskQuery suspended();

    /**
     * Only selects tasks which are active (ie. not suspended)
     */
    TaskQuery active();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy