# 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! # 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 #Candidate groups candidateGroups: [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! } #Task query - query to get one page of tasks. input TaskQuery { # State of the tasks state: TaskState # Are the tasks assigned? assigned: Boolean # Who is assigned to the tasks? assignee: String # given group is in candidate groups list candidateGroup: 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!] } # State of the task. enum TaskState { CREATED COMPLETED CANCELED } # 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: String! value: String! } # Describes the user. type User { userId: ID! displayName: String permissions: [String!] } # 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! } # 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 currently logged in user. Returns the task. claimTask(taskId: String!, assignee: String): 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! }