DBPMMS User Task API for BPM/Workflow Engine Management¶
This library provides services for managing BPM/Workflow Engine user task operations through a decoupled REST API interface.
Installation¶
Setup¶
Import Required Modules¶
import { NgModule } from '@angular/core';
import { HttpClientModule } from '@angular/common/http';
import {
TaskService,
UserTaskService,
UserTaskLifecycleExecutionManagementService,
UserTaskVariableService
} from '@dnext-angular/dbpmms-usertask';
@NgModule({
imports: [
HttpClientModule
],
providers: [
TaskService,
UserTaskService,
UserTaskLifecycleExecutionManagementService,
UserTaskVariableService
]
})
export class AppModule { }
Services¶
TaskService¶
Provides basic task management operations.
// Delete task by ID
deleteTask(id: string): Observable<any>
// Get list of tasks with filtering
listTasks(firstResult?: number, maxResults?: number, sortBy?: string, sortOrder?: string): Observable<Array<TaskDto>>
// Update task state (activate/suspend)
patchTaskStateById(body: SuspensionStateDto, id: string): Observable<any>
// Query tasks with advanced filtering
queryTasks(body: TaskQueryDto, firstResult?: number, maxResults?: number): Observable<Array<TaskDto>>
// Get task by ID
retrieveTask(id: string): Observable<TaskDto>
UserTaskService¶
Handles user task operations and queries.
// Get historic task instances
getHistoricTaskInstances(params: GetHistoricTaskInstancesParams): Observable<Array<HistoricTaskInstanceDto>>
// Get tasks with filtering
getTasks(params: GetTasksParams): Observable<Array<TaskDto>>
// Query historic task instances
queryHistoricTaskInstances(body?: HistoricTaskInstanceQueryDto): Observable<Array<HistoricTaskInstanceDto>>
// Query tasks with advanced filtering
queryTasks(body?: TaskQueryDto): Observable<Array<TaskDto>>
UserTaskLifecycleExecutionManagementService¶
Manages task lifecycle operations.
// Complete a task
complete(id: string, body?: CompleteTaskDto): Observable<{ [key: string]: VariableValueDto }>
// Delete a task
deleteTask(id: string): Observable<any>
// Update task state
updateTaskStateById(id: string, body?: SuspensionStateDto): Observable<any>
UserTaskVariableService¶
Handles task variable operations.
// Add task variable
addTaskVariable(id: string, varName: string, body?: VariableValueDto): Observable<any>
// Delete task variable
deleteTaskVariable(id: string, varName: string): Observable<any>
// Get task variable
getTaskVariable(id: string, varName: string, deserializeValue?: boolean): Observable<VariableValueDto>
// Get all task variables
getTaskVariables(id: string, deserializeValues?: boolean): Observable<{ [key: string]: VariableValueDto }>
// Modify task variables (add/update/delete)
modifyTaskVariables(id: string, body?: PatchVariablesDto): Observable<any>
// Update task variable
patchTaskVariable(id: string, varName: string, body?: VariableValueDto): Observable<any>
Models¶
Task Related¶
TaskDto- Task informationTaskQueryDto- Query parameters for tasksTaskQueryDtoSorting- Sorting options for task queries
Historic Task Related¶
HistoricTaskInstanceDto- Historical task instance dataHistoricTaskInstanceQueryDto- Query parameters for historical tasksHistoricTaskInstanceQueryDtoSorting- Sorting options for historical task queries
Task Variables¶
VariableValueDto- Variable value informationPatchVariablesDto- Variable modification parametersCompleteTaskDto- Task completion parameters
Forms¶
CamundaFormRef- Form reference information
Common Types¶
AnyValue- Generic value typeModelError- Error information structureSuspensionStateDto- Suspension state configuration
Usage¶
These models are auto-generated from the OpenAPI specification and should not be modified manually. They are used to provide type safety when interacting with the DBPMMS User Task API.
Example usage:
import { TaskDto, VariableValueDto, UserTaskService } from '@dnext-angular/dbpmms-usertask';
@Component({...})
export class TaskComponent {
constructor(private userTaskService: UserTaskService) {}
loadTasks() {
this.userTaskService.getTasks({
processInstanceId: 'process-123',
maxResults: 10
}).subscribe(tasks => {
console.log('Tasks:', tasks);
});
}
}
Dependencies¶
- @angular/core: ^18.0.0
- @angular/common: ^18.0.0
- @dnext-angular/common
- @dnext-angular/http
- rxjs: ^7.0.0
Notes¶
- All interfaces are generated from OpenAPI spec version v0
- The API is designed to decouple DNext Platform from BPM platform specific REST APIs
- Most properties are optional (marked with
?) to accommodate partial data scenarios
License¶
DNext PiAGroup