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

graphql.task.graphqls Maven / Gradle / Ivy

There is a newer version: 1.17.6
Show newest version
extend type Query {
    task(id: ID!):                                    Task     # TODO or required?
    allTasks(filter: String, range: Range!):          [Task!]!
    allTasksCount(filter: String):                    Int!     # Returns -1 if not authorized
    assignedTasks(filter: String, range: Range!):     [Task!]!
    assignedTasksCount(filter: String):               Int!
    groupTasks(filter: String, range: Range!):        [Task!]!
    groupTasksCount(filter: String):                  Int!
    transferableTasks(filter: String, range: Range!): [Task!]!
    transferableTasksCount(filter: String):           Int!

    choice(taskId: ID, processDefinitionId: ID, path: String!, value: String!, values: JSON): Choice
    choices(taskId: ID, processDefinitionId: ID, path: String!, filter: String, range: Range!, values: JSON): [Choice!]!
}

extend type Mutation {
    claimTask(id: ID!): Boolean!
    transferTask(id: ID!, currentAssignee: String!): Boolean!
    saveTask(id: ID!, values: JSON!, files: [Upload!]): Boolean!
    submitTask(deploymentId: ID, id: ID!, values: JSON!, files: [Upload!], timeoutMillis: Int): SubmitResult!
    cancelTask(deploymentId: ID, id: ID!): ProcessInstance!
}

type Task {
    id:                           ID!
    name:                         String
    documentation:                JSON!
    createdAt:                    DateTime!
    owner:                        User
    assignee:                     User
    subject:                      String
    allowedRoles:                 [String!]!
    error:                        JSON

    processDefinitionId:          String
    processInstanceId:            String

    processDefinition:            ProcessDefinition
    processInstance:              ProcessInstance

    form(options: RenderOptions): JSON!
}

input RenderOptions {
    maxChoices: Int = 999999 # boils down to no limit by default
}

union SubmitResult = SubmitInProgress | ProcessInstance | ProcessInstanceEnded | InputErrors

type SubmitInProgress {
    taskId:  ID!
}

type ProcessInstanceEnded {
    id:     ID!
    ended:  Boolean! # always true
}

type Choice {
    value: String!
    label: String
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy