Web Service > Web Service Operations > Working with Processes > DeleteBpmElement
DeleteBpmElementResult DeleteBpmElement(BpmProcessId tBpmProcess, DeleteBpmElementArg tArg)
tBpmProcess. Moniker of opened process.
tArg. Parameters for deleting process elements.
The DeleteBpmElement operation deletes elements from process.
The operation deletes step, stage, gateway, or start event in process. To execute the operation, in the tBpmProcess field specify moniker of opened process, and in the tArg field specify parameters for deleting elements. The moniker can be obtained after executing the OpenBpmProcess operation.
The operation results in the updated process structure if the tBpmProcess.needTree field was defined.
Below is the example of deleting step from process. The request contains moniker of opened process and GUID of deleted step. The response contains process updated structure.
{
"DeleteBpmElement" :
{
"tBpmProcess" :
{
"id" : "COAOPGKGCJKEGOAEIHPPEJNABOOGNDGENKOKNINMLFLJFBMK!M!S!BPHLNJFALGCJKEGOAEJPJLLKGPHKELIFIECLCHAGEBCDNFMELP"
},
"tArg" :
{
"elType" : "Stage",
"elGuids" :
{
"it" : "{94C3E46B-1BBC-4FFF-9600-49C6B5D344D7}"
},
"needTree" : "true"
}
}
}
{
"DeleteBpmElementResult" :
{
"res" : "1",
"procTree" :
{
"name" : "Process",
"stages" :
{
"it" :
{
"stage" :
{
"name" : "Stage 1",
"index" : "0",
"guid" : "{0E3D2664-1DB4-42B9-A43F-B63CA721B186}"
},
"gtwType" : "No_gateway",
"isCondActive" : "0",
"stGroups" :
{
"it" :
{
"stGroup" :
{
"index" : "0",
"guid" : "{D5F25EB4-CD78-451E-8308-2AC031D2B2C1}"
},
"steps" : "",
"isDefaultFlow" : "0"
}
}
}
}
}
}
}
public static DeleteBpmElementResult DeleteBpmElement(string moniker, string[] elsToDelete)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tDel = new DeleteBpmElement()
{
// Create object moniker
tBpmProcess = new BpmProcessId() { id = moniker },
tArg = new DeleteBpmElementArg()
{
elGuids = elsToDelete,
needTree = true
}
};
// Delete process element
var result = somClient.DeleteBpmElement(tDel);
return result;
}
See also: