QPR Knowledge Base 2012.1

DeleteElement

DeleteElement

Previous topic Next topic  

DeleteElement

Previous topic Next topic  

Revision history:

Introduced in QPR 7.5.1

 

Deletes a model element indicated by element ID supplied as a parameter. With process steps and stores it is possible to delete also only a single instance of the element. Note that at the moment the only supported way to get an element's ID is to use XML Export and convert the XML ID (e.g. 'PG_PS123456') to Long.

 

Synopsis:

 

PGModel.DeleteElement(ElementId, Parameters)

 

Parameters:

 

ElementId: Integer. ID of the element to be deleted.

Parameters: String. A semicolon-separated list of parameters. Currently supported parameters:

InstanceId=<InstanceId>: If this parameter is defined, only the specific instance is deleted. If this is empty, the whole element is deleted. Also if the last instance of a process step or a store is deleted, the whole element is deleted as well.

 

Required Rights:

 

Modify rights to the process level.

 

Return Values:

Below are listed the return values that this function can return:

 

RV_SUCCESS

RV_APPLICATION_QUIT_CALLED

RV_MODEL_NOT_OPEN

RV_ELEMENT_NOT_FOUND

RV_INVALID_PARAMETER

RV_INSTANCE_NOT_FOUND

RV_NOT_ENOUGH_RIGHTS

RV_UNKNOWN_ERROR

 

Example Procedure:

 

iResult = PGModel.DeleteElement(183056580, "InstanceId=1")