Skip to content

DBPMMS BackOffice User Ticket API

This library provides services for managing BackOffice User Ticket operations through a decoupled REST API interface.

Installation

npm install @dnext-angular/dbpmms-userticket

Setup

Import Required Modules

import { NgModule } from '@angular/core';
import { HttpClientModule } from '@angular/common/http';
import { 
  BackOfficeUserTicketidcompleteService,
  BackOfficeUserTicketidvariableService,
  BackOfficeUserTicketstartService
} from '@dnext-angular/dbpmms-userticket';

@NgModule({
  imports: [
    HttpClientModule
  ],
  providers: [
    BackOfficeUserTicketidcompleteService,
    BackOfficeUserTicketidvariableService,
    BackOfficeUserTicketstartService
  ]
})
export class AppModule { }

Services

BackOfficeUserTicketidcompleteService

Handles completion of BackOffice User Tickets.

// Complete a BackOffice User Ticket
completeBackOfficeUserTicket(body: CompleteTaskFVO, id: string): Observable<any>

BackOfficeUserTicketidvariableService

Manages variables for BackOffice User Tickets.

// Retrieve individual ticket variables
retrieveIndividual(id: string, fields?: string): Observable<CompleteTask>

// Save ticket variables
saveBackOfficeUserTicketVariables(body: CompleteTaskFVO, id: string): Observable<any>

BackOfficeUserTicketstartService

Handles starting new BackOffice User Tickets.

// Start a new BackOffice User Ticket
startBackOfficeUserTicket(body: StartTaskFVO): Observable<StartTask>

Models

  • CompleteTask - Task completion information
  • CompleteTaskFVO - Task completion form value object
  • StartTask - Task start information
  • StartTaskFVO - Task start form value object
  • VariableValueForComplete - Variable value for task completion
  • VariableValueForCompleteFVO - Variable value form value object for completion

Common Types

  • EntityRef - Reference to an entity
  • ModelError - Error information structure
  • ProcessInstance - Process instance information

CompleteTask

Interface for task completion data:

interface CompleteTask {
    type?: string;              // Sub-class Extensible name
    baseType?: string;          // Super-class definition
    schemaLocation?: string;    // URI to JSON-Schema file
    href?: string;              // Hyperlink reference
    id?: string;                // Unique identifier
    variables?: {               // Variable key-value pairs
        [key: string]: VariableValueForComplete;
    };
}

CompleteTaskFVO

Form value object for task completion:

interface CompleteTaskFVO {
    type?: string;
    baseType?: string;
    schemaLocation?: string;
    id?: string;
    variables?: {
        [key: string]: VariableValueForCompleteFVO;
    };
}

StartTask

Interface for starting a new task:

interface StartTask {
    backOfficeUserTicketSpecification?: EntityRef;
}

StartTaskFVO

Form value object for starting a task:

interface StartTaskFVO {
    backOfficeUserTicketSpecification?: EntityRef;
}

VariableValueForComplete

Interface for variable values during task completion:

interface VariableValueForComplete {
    value?: any;               // Can be string, number, boolean, array or object
    type?: string;            // Value type of the variable
    properties?: {            // Custom string-to-string mapping
        [key: string]: string;
    };
    valueInfo?: {            // Additional type-dependent properties
        [key: string]: any;
    };
}

VariableValueForCompleteFVO

Form value object for variable values:

interface VariableValueForCompleteFVO {
    value?: any;
    type?: string;
    properties?: { [key: string]: string; };
    valueInfo?: { [key: string]: any; };
}

Common Types

EntityRef

Reference to an entity in the system:

interface EntityRef {
    type?: string;           // Sub-class Extensible name
    baseType?: string;       // Super-class definition
    schemaLocation?: string; // URI to JSON-Schema file
    href?: string;          // Hyperlink reference
    id: string;             // Required unique identifier
    name?: string;          // Name of referred entity
    referredType?: string;  // Actual type of target instance
}

ModelError

Error information structure:

interface ModelError {
    type: string;           // Required sub-class name
    baseType?: string;      // Super-class definition
    schemaLocation?: string;// URI to JSON-Schema file
    code: string;          // Application-specific error code
    reason: string;        // User-friendly error explanation
    message?: string;      // Detailed error message and corrective actions
    status?: string;       // HTTP Error code extension
    referenceError?: string;// URI to error documentation
}

ProcessInstance

Process instance information:

interface ProcessInstance {
    id?: string;           // Process instance identifier
}

Usage

Example usage:

import { 
  BackOfficeUserTicketstartService, 
  StartTaskFVO 
} from '@dnext-angular/dbpmms-userticket';

@Component({...})
export class TicketComponent {
  constructor(private startService: BackOfficeUserTicketstartService) {}

  startNewTicket() {
    const startData: StartTaskFVO = {
      backOfficeUserTicketSpecification: {
        id: 'spec-123',
        // ... other specification details
      }
    };

    this.startService.startBackOfficeUserTicket(startData)
      .subscribe(result => {
        console.log('Ticket started:', result);
      });
  }
}

Value Type Information

The valueInfo property in variable-related interfaces can include:

  • For Object type variables:
  • objectTypeName: String representation of object type
  • serializationDataFormat: Variable storage format

  • For File type variables:

  • filename: Name for file downloads
  • mimetype: File MIME type
  • encoding: File encoding

  • For all variable types:

  • transient: Boolean flag for transient variables

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 1.0.0
  • 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