import { Model } from '../../ProcessModel/index'; import { FlowNodeInstance } from '../FlowNodeInstance'; /** * Describes a suspended UserTask. */ export type UserTaskInstance = FlowNodeInstance & { /** * The ID of the User that reserved the User Task. * Only applies, if the User Task is currently reserved by a user. */ actualOwnerId?: string; /** * The ID of the User that finished (aka 'resumed') the User Task. * Only applies, if the User Task is actually finished. */ finishedByUserId?: string; /** * Contains the parsed configuration for the User Task, after all Flow Node Expressions have been evaluated. */ userTaskConfig: UserTaskConfig; /** * Contains the configuration for the User Task, as it has been modeled on the Flow Node. */ userTaskConfigModel: UserTaskConfigModel; /** * Optional: The IDs of the Users that are assigned to the UserTask. */ assignedUserIds?: Array; }; /** * Contains information about a UserTasks configuration. */ export type UserTaskConfig = { /** * Optional: The expression for determining the Users to assign to the User Task. */ assignedUserIds?: Array; /** * A list of accessible FormFields for the UserTask. */ formFields: Array; /** * The type of UI control used for the UserTask. */ customForm?: string; description?: string; finishedMessage?: string; }; /** * Contains information about a UserTasks configuration. */ export type UserTaskConfigModel = { /** * Optional: The IDs of the Users that are assigned to the UserTask. */ assignedUserIds?: string; /** * A list of accessible FormFields for the UserTask. */ formFields: Array; /** * The type of UI control used for the UserTask. */ customForm?: string; description?: string; finishedMessage?: string; }; export type UserTaskFormField = { id: string; type: UserTaskFormFieldType | string; label: string; defaultValue?: string | number | boolean | object; /** * Custom Configuration values for a form field. The content depends on the type of the Form Field. */ customForm?: string; /** * JSON formatted Custom Configuration values for a form field. The content depends on the type of the Form Field. * * Will be empty, if the configuration is not a valid JSON. */ parsedCustomForm?: Model.Activities.FormFieldCustomForm; /** * Optional: If the FormField is an enumeration, * this will contain the values for that enumeration. */ enumValues?: Array; }; /** * Determines the type of a UserTasks FormField. */ export declare enum UserTaskFormFieldType { /** * @deprecated Use "integer" instead. */ long = "long", /** * @deprecated Use "text" instead. */ string = "string", boolean = "boolean", text = "string", integer = "long", number = "number", date = "date", enum = "enum", header = "header", paragraph = "paragraph", confirm = "confirm", color = "color", datetimeLocal = "datetime-local", email = "email", file = "file", hidden = "hidden", month = "month", password = "password", range = "range", tel = "tel", time = "time", url = "url", week = "week", checkbox = "checkbox", radio = "radio", select = "select", textarea = "textarea", custom = "custom" } /** * If a UserTasks FormField is an enumeration, this will contain information * about the values contained within that enumeration. */ export type UserTaskEnumValue = { id: string; name: string; }; /** * Describes the result set of a UserTask. * Such a result set usually consists of a collection of FormFields and their assigend values. */ export type UserTaskResult = { [formFieldId: string]: any; }; /** * Describes a list of UserTasks. */ export type UserTaskList = { userTasks: Array; totalCount: number; };