IBProcessParams.CanRemove

Syntax

CanRemove(Param: IBProcessParam): Boolean;

Parameters

Param. Process parameter.

Description

The CanRemove method returns whether the specified parameter can be removed from the collection.

Comments

The method returns True if the parameter can be deleted from the collection, and False if the parameter cannot be deleted because some process elements depend on it.

Example

Executing the example requires that the repository contains a process with the PROCESS identifier.

Add links to the BPM, Metabase system assemblies. Add a link to the assembly that is required to work with processes.

Sub UserProc;
Var
    Mb: IMetabase;
    MObj: IMetabaseObjectDescriptor;
    Process: IBProcess;
    Params: IBProcessParams;
    Param: IBProcessParam;
    i, c: Integer;
Begin
    Mb := MetabaseClass.Active;
    MObj := Mb.ItemById("PROCESS");
    // Get process structure
    Process := BProcessCollection.ByKey(MObj.Key);
    Params := Process.Params;
    c := Params.Count;
    For i := 0 To c - 1 Do
        Param := Params.Item(i);
        If Params.CanRemove(Param) Then
            Debug.WriteLine("Parameter '" + Param.Name + "' can be removed.");
        Else
            Debug.Write("Parameter '" + Param.Name + "' cannot be removed. Reason: ");
            Debug.WriteLine(Params.RemovalImpossibleMessage(Param));
        End If;
    End For;
End Sub UserProc;

After executing the example the development environment console displays information about the ability of removing specific process parameters.

See also:

IBProcessParams