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

graphql.tasklist.graphqls Maven / Gradle / Ivy

The newest version!
scalar DateTime

# Describes the User task.
type Task {
    # The unique identifier of the task
    id: ID!
    # Name of the task
    name: String!
    # Task Definition ID (node BPMN id) of the process
    taskDefinitionId: String!
    # Name of the process
    processName: String!
    # When was the task created
    creationTime: String!
    # When was the task completed
    completionTime: String
    # Username/id of who is assigned to the task
    assignee: String
    # Variables associated to the task
    variables: [Variable!]
    # State of the task
    taskState: TaskState!
    # Task implementation
    implementation: TaskImplementation!
    # Array of values to be copied into `TaskQuery` to request for next or previous page of tasks.
    sortValues: [String!]
    # Flag to show that the task is first in current filter
    isFirst: Boolean
    # Reference to the task form
    formKey: String
    #Reference to process definition
    processDefinitionId: String
    #Reference to processInstance definition
    processInstanceId: String
    #Candidate groups
    candidateGroups: [String!]
    #Follow-up Date for Task
    followUpDate: DateTime
    #Due date for Task
    dueDate: DateTime
    #Candidate users
    candidateUsers: [String!]
}

#Describes task embedded form
type Form {
    #The unique identifier of the embedded form within one process
    id: String!
    #Reference to process definition
    processDefinitionId: String!
    #Form content
    schema: String!
}

type Process {
    id:String!
    name:String
    processDefinitionId: String
    version:Int
}

input DateFilter {
    from: DateTime!
    to: DateTime!
}



#Task query - query to get one page of tasks.
input TaskQuery {
    # State of the tasks
    state: TaskState
    # Tasks implementation
    implementation: TaskImplementation
    # Are the tasks assigned?
    assigned: Boolean
    # Who is assigned to the tasks?
    assignee: String
    # given group is in candidate groups list
    candidateGroup: String
    # given user is in candidate users list
    candidateUser: String
    # process definition id
    processDefinitionId: String
    # process instance id
    processInstanceId: String
    #Size of tasks page (default: 50).
    pageSize: Int
    # Task definition ID - what's the BPMN flow node?
    taskDefinitionId: String
    #Array of values copied from `sortValues` of one of the tasks, query will return page of tasks going directly after this values plus same sort values.
    searchAfter: [String!]
    #Array of values copied from `sortValues` of one of the tasks, query will return page of tasks going directly after this values.
    searchAfterOrEqual: [String!]
    #Array of values copied from `sortValues` of one of the tasks, query will return page of tasks going directly before this values plus same sort values.
    searchBefore: [String!]
    #Array of values copied from `sortValues` of one of the tasks, query will return page of tasks going directly before this values.
    searchBeforeOrEqual: [String!]
    #Follow-up Date for Task
    followUpDate: DateFilter
    #Due Date for Task
    dueDate: DateFilter
    #order
    sort: [TaskOrderBy]
}

input TaskOrderBy {
    field: TaskSortFields!
    order: Sort!
}

enum Sort {
    ASC,
    DESC
}

enum TaskSortFields{
    creationTime,
    completionTime,
    followUpDate,
    dueDate
}

# State of the task.
enum TaskState {
    CREATED,
    COMPLETED,
    CANCELED
}

# Implementation of the task.
enum TaskImplementation {
    JOB_WORKER,
    ZEEBE_USER_TASK
}

# Variable used in task.
type Variable {
    id: ID!
    name: String!
    # full variable value
    value: String!
    # value preview (limited in size)
    previewValue: String!
    # shows, whether previewValue contains truncated value or full value
    isValueTruncated: Boolean!
}
# Change or add a variable with name and value.
input VariableInput {
    # Name of the variable.
    name: String!
    # Value of the variable. Complex values, e.g. a list of objects, must be serialized as JSON.
    value: String!
}

type ProcessInstance {
    id: ID!
}

type C8AppLink {
    name: String!
    link: String!
}
# Describes the user.
type User {
    userId: ID!
    displayName: String
    permissions: [String!]
    roles: [String]
    salesPlanType: String
    c8Links: [C8AppLink]
}
# What can be searched for.
type Query {
    # Get list of tasks based on `TaskQuery`.
    tasks(query: TaskQuery!): [Task!]!
    # Get one task by id. Returns task or error when task does not exist.
    task(id: String!): Task!
    # Get currently logged in user.
    currentUser: User!
    # Get task form by id and processDefinitionId
    form(id: String!, processDefinitionId: String!): Form
    # Get a collection of Variables by name
    variables(taskId: String!, variableNames: [String!]!): [Variable!]!
    # Get the variables by variable id
    variable(id: String!): Variable!
    # Get the processes
    processes(search:String): [Process!]!

}
# What can be changed.
type Mutation {
    # Complete a task with taskId and optional variables. Returns the task.
    completeTask(taskId: String!, variables: [VariableInput!]!): Task!
    """
    Claim a task with `taskId` to `assignee`. Returns the task.

    When using Graphql API with JWT authentication token following parameters may be used:
    * `assignee`. When using a JWT token, the assignee parameter is NOT optional when called directly from the API.
    The system will not be able to detect the assignee from the JWT token, therefore the assignee parameter needs to be
    explicitly passed in this instance.
    * `allowOverrideAssignment`. When `true` the task that is already assigned may be claimed again. Otherwise the task
    must be first unclaimed and only then claimed again. (Default: `true`)
    """
    claimTask(taskId: String!, assignee: String, allowOverrideAssignment: Boolean): Task!
    # Unclaim a task with taskId. Returns the task.
	unclaimTask(taskId: String!): Task!
    # Delete process instance by given processInstanceId. Returns true if process instance could be deleted.
    deleteProcessInstance(processInstanceId: String!): Boolean!
    # start a Process from tasklist
    startProcess(processDefinitionId: String!): ProcessInstance!
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy