import { IIamService, Identity } from '../../DataModels/Iam/index'; import { Model } from '../Model/index'; /** * Describes a ProcessDefinition, as it is stored in the repository. */ export declare class ProcessDefinitionRaw { name: string; hash: string; xml: string; createdBy?: string; createdAt?: Date; updatedAt?: Date; } /** * A service that parses, validates and filters ProcessDefinitions and ProcessModels. * * @deprecated This service has been decommissioned and will be removed in a future major release. */ export declare class BpmnParserService { private bpmnModelParser; private definitionsCache; private iamService; constructor(iamService: IIamService); /** * Takes an XML string and parses it into an internal ProcessDefinition. * The definition is then sanity checked, before being returned. * * @async * @param xml The ProcessDefinition's raw xml. * @returns The parsed ProcessDefinition. * @throws {UnprocessableEntityError} If the XML is invalid. */ parseAndValidateDefinition(xml: string): Promise; /** * Parses the given list of raw ProcessDefinitions into a list of usable ProcessDefinition objects. * * @async * @param definitionsRaw The list of raw ProcessDefintions. * @returns The list of parsed ProcessDefinitions. */ parseProcessDefinitions(definitionsRaw: Array): Promise>; /** * Parses the given ProcessDefinition's xml into a usable ProcessDefinition object. * * @async * @param definitionRaw The raw ProcessDefinition to parse. * @returns The parsed ProcessDefinition object. */ parseProcessDefinition(definitionRaw: ProcessDefinitionRaw): Promise; /** * Gets the ProcessModel with the given ID from the given list of raw ProcessDefinitions. * * @async * @param definitionsRaw The list of raw ProcessDefinitions. * @param processModelId The ID of the ProcessModel to get. * @returns The retrieved ProcessModel. * @throws {NotFoundError} If the ProcessModel was not found. */ retrieveProcessModel(definitionsRaw: Array, processModelId: string): Promise; /** * Parses the list of given raw ProcessDefinitions and gets a list of all ProcessModels contained in those definitions. * * @async * @param definitionsRaw The list of raw ProcessDefinitions. * @returns The list of parsed ProcessModels retrieved from the definitions. */ getProcessModelList(definitionsRaw: Array): Promise>; /** * Takes a ProcessModel and an Identity and filters out all elements of the ProcessModel that the Identity is not allowed to access. * * @param identity The identity for which to filter out inaccessible elements. * @param processModel The ProcessModel to filter. * @returns The filtered ProcessModel, or "undefined", if the user is not allowed to access the ProcessModel at all. */ filterInaccessibleProcessModelElements(identity: Identity, processModel: Model.Process): Model.Process; /** * Takes a laneSet and filters out all lanes that the given identity is not allowed to access. * * @param laneSet The laneSet to filter. * @param identity The identity for which to filter the given laneSet. * @returns The filtered laneSet. */ filterOutInaccessibleLanes(laneSet: Model.ProcessElements.LaneSet, identity: Identity): Model.ProcessElements.LaneSet; /** * Compares a laneSet against a list of FlowNodes and returns all FlowNodes that are on any of the given lanes. * Useful for determining which FlowNodes a user is allowed to access on a filtered laneSet. * * @param laneSet The laneSet to use as a baseline. * @param flowNodes The flowNodes to filter. * @returns The filtered FlowNodes. */ getFlowNodesForLaneSet(laneSet: Model.ProcessElements.LaneSet, flowNodes: Array): Array; /** * Checks if the given ProcessModel has any StartEvents. * * @param processModel The ProcessModel to check. * @returns True, if the ProcessModel has StartEvents; otherwise false. */ checkIfProcessModelHasAccessibleStartEvents(processModel: Model.Process): boolean; private isUserAnAdminOrObserver; }