Show contents 

Web Service > Web Service Operations > Working with Processes > DeleteBpmElement

DeleteBpmElement

Syntax

DeleteBpmElementResult DeleteBpmElement(BpmProcessId tBpmProcess, DeleteBpmElementArg tArg)

Parameters

tBpmProcess. Moniker of opened process.

tArg. Parameters for deleting process elements.

Description

The DeleteBpmElement operation deletes elements from process.

Comments

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.

Example

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.

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<DeleteBpmElement xmlns="http://www.fsight.ru/PP.SOM.Som">
<tBpmProcess xmlns="">
  <id>COAOPGKGCJKEGOAEIHPPEJNABOOGNDGENKOKNINMLFLJFBMK!M!S!BPHLNJFALGCJKEGOAEJPJLLKGPHKELIFIECLCHAGEBCDNFMELP</id>
  </tBpmProcess>
<tArg xmlns="">
  <elType>Stage</elType>
<elGuids>
  <it>{94C3E46B-1BBC-4FFF-9600-49C6B5D344D7}</it>
  </elGuids>
  <needTree>true</needTree>
  </tArg>
  </DeleteBpmElement>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<DeleteBpmElementResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <res xmlns="">1</res>
<procTree xmlns="">
  <name>Process</name>
<stages>
<it>
<stage>
  <name>Stage 1</name>
  <index>0</index>
  <guid>{0E3D2664-1DB4-42B9-A43F-B63CA721B186}</guid>
  </stage>
  <gtwType>No_gateway</gtwType>
  <isCondActive>0</isCondActive>
<stGroups>
<it>
<stGroup>
  <index>0</index>
  <guid>{D5F25EB4-CD78-451E-8308-2AC031D2B2C1}</guid>
  </stGroup>
  <steps />
  <isDefaultFlow>0</isDefaultFlow>
  </it>
  </stGroups>
  </it>
  </stages>
  </procTree>
  </DeleteBpmElementResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"DeleteBpmElement" :
{
"tBpmProcess" :
{
"id" : "COAOPGKGCJKEGOAEIHPPEJNABOOGNDGENKOKNINMLFLJFBMK!M!S!BPHLNJFALGCJKEGOAEJPJLLKGPHKELIFIECLCHAGEBCDNFMELP"
},
"tArg" :
{
"elType" : "Stage",
"elGuids" :
{
"it" : "{94C3E46B-1BBC-4FFF-9600-49C6B5D344D7}"
},
"needTree" : "true"
}
}
}

JSON response:

{
"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:

Working with Processes