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

graphql.process.graphqls Maven / Gradle / Ivy

The newest version!
extend type Query {
    processDefinitions:                   [ProcessDefinition!]!
    processDefinition(id: ID!):           ProcessDefinition    # TODO or required?
    processDefinitionByKey(key: String!): ProcessDefinition    # TODO or required?

    allActiveProcessInstances(filter: String, range: Range!): [ProcessInstance!]! # admin only
    allActiveProcessInstancesCount(filter: String):           Int!                # admin only
    myActiveProcessInstances(filter: String, range: Range!):  [ProcessInstance!]!
    myActiveProcessInstancesCount(filter: String):            Int!
    processInstance(id: ID!):                                 ProcessInstance
}

union StartProcessResult = ProcessInstance | InputErrors

extend type Mutation {
    # Note that form values and files are optional
    startProcess(deploymentId: ID, id: ID!, values: JSON, files: [Upload!]): StartProcessResult!
    startProcessByKey(deploymentId: ID, key: String!, values: JSON, files: [Upload!]): StartProcessResult!
    saveStartForm(deploymentId: ID, key: String!, values: JSON, files: [Upload!]): Task!

    # both return the process instance id if successful
    stopProcess(id: ID!, reason: String): ID # only allowed for admins
    cancelProcess(id: ID!): ID               # allowed for the process starter
}

type ProcessDefinition {
    id:                         ID!
    key:                        String!
    name:                       String!
    description:                String
    traits:                     JSON!
    deploymentId:               ID!
    suspended:                  Boolean!

    diagram:                    JSON

    hasStartForm:                      Boolean!
    startForm(options: RenderOptions): JSON

    activeProcessInstances:      [ProcessInstance]!
    activeProcessInstancesCount: Int!
}

type ProcessInstance {
    id:                         ID!
    starter:                    User
    startTime:                  DateTime
    participants:               [String]!
    subject:                    String
    ended:                      Boolean!

    processDefinition:          ProcessDefinition!
    tasks:                      [Task]!
    assignedTasks:              [Task]!
    groupTasks:                 [Task]!
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy