All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
queries.process.ts Maven / Gradle / Ivy
import { gql } from '@apollo/client';
export const GET_PROCESS_DEFINITIONS = gql`
query GetProcessDefinitions {
processDefinitions {
id
key
name
traits
description
deploymentId
hasStartForm
}
}`
export const GET_PROCESS_DEFINITION_BY_KEY = gql`
query GetProcessDefinitionByKey($key: String!) {
processDefinitionByKey(key: $key) {
id
key
name
traits
hasStartForm
}
}`
export const START_PROCESS = gql`
mutation StartProcessByKey($key: String!) {
startProcessByKey(key: $key) {
... on ProcessInstance {
id,
tasks {
id,
processDefinition { id, key, traits, hasStartForm }
}
}
}
}`
export const SAVE_START_FORM = gql`
mutation SaveStartForm($key: String!, $values: JSON!, $files: [Upload!]) {
saveStartForm(deploymentId: "123", key: $key, values: $values, files: $files) {
id
name
documentation
createdAt
subject
assignee { id, username }
allowedRoles
form(options: { maxChoices: 99 })
processInstanceId
processDefinition { id, key, name , deploymentId, traits, hasStartForm }
}
}
`
export const GET_PROCESS_INSTANCE_AND_TASK = gql`
query GetProcessInstance($processInstanceId: ID!, $taskId: ID!) {
processInstance(id: $processInstanceId) {
id
starter { id, username }
startTime
processDefinition { id, key, name, traits, hasStartForm }
assignedTasks {
id,
name,
owner { id, username },
processDefinition { id, key, traits, hasStartForm }
}
}
task(id: $taskId) {
id
name
owner { id, username }
error
processDefinition { id, key, traits, hasStartForm }
}
}`
export const GET_MY_PROCESS_INSTANCES = gql`
query GetMyProcessInstances($start: Int!, $count: Int!, $filter: String) {
myActiveProcessInstances(range: { start: $start, count: $count }, filter: $filter) {
id
starter { id, username }
startTime
subject
processDefinition { id, key, name, traits, hasStartForm }
}
myActiveProcessInstancesCount(filter: $filter)
}`
export const GET_ALL_PROCESS_INSTANCES = gql`
query GetAllProcessInstances($start: Int!, $count: Int!, $filter: String) {
allActiveProcessInstances(range: { start: $start, count: $count }, filter: $filter) {
id
starter { id, username }
startTime
subject
processDefinition { id, key, name, traits, hasStartForm }
}
allActiveProcessInstancesCount(filter: $filter)
}`
export const GET_PROCES_INSTANCES_COUNT = gql`
query GetProcessInstancesCount {
myActiveProcessInstancesCount
}`
export const STOP_PROCESS = gql`
mutation StopProcess($id: ID!, $reason: String) {
stopProcess(id: $id, reason: $reason)
}
`