CopyBpmElements

Syntax

bool CopyBpmElements(BpmProcessId tBpmProcess, BpmElementsArg tArg)

Parameters

tBpmProcess. Moniker of opened process.

tArg. Operation execution parameters.

Description

The CopyBpmElements operation copies process elements.

Comments

To execute the operation, in the tBpmProcess field specify moniker of opened process, and in the tArg field specify parameters of copied elements. The moniker can be obtained after executing the OpenBpmProcess operation. Information about copied elements is saved in the special clipboard. When a stage is copied, its child steps and gateways are also copied. To paste elements, use the PasteBpmElements operation.

The operation results in the logical true if copying is executed successfully.

Example

Below is the example of copying a stage with steps. The request contains moniker of opened process and GUID of copied stage. The response contains whether copying is executed successfully.

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">
<CopyBpmElements xmlns="http://www.fsight.ru/PP.SOM.Som">
<tBpmProcess xmlns="">
  <id>KCHABFCBDFJFGOAELPKPBKMKIBIKDJHEFJONMMECLKLENNNJ!M!S!BPNGCBIPCBDFJFGOAELOCFACOLAGMIODCEKIOLGAPMGDNOCEBA</id>
  </tBpmProcess>
<tArg xmlns="">
  <elType>Stage</elType>
<elGuids>
  <it>{103D9D40-1C9F-4184-990E-7DB11E5C561A}</it>
  </elGuids>
  </tArg>
  </CopyBpmElements>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
  <CopyBpmElementsResult 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">1</CopyBpmElementsResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"CopyBpmElements" :
{
"tBpmProcess" :
{
"id" : "KCHABFCBDFJFGOAELPKPBKMKIBIKDJHEFJONMMECLKLENNNJ!M!S!BPNGCBIPCBDFJFGOAELOCFACOLAGMIODCEKIOLGAPMGDNOCEBA"
},
"tArg" :
{
"elType" : "Stage",
"elGuids" :
{
"it" : "{103D9D40-1C9F-4184-990E-7DB11E5C561A}"
}
}
}
}

JSON response:

{
"CopyBpmElementsResult" : "1"
}
public static bool CopyBpmElements(string moniker, string elGUIDSource)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tCopy = new CopyBpmElements()
{
tArg = new BpmElementsArg()
{
elGuids = new string[1] { elGUIDSource },
elType = BpmElementType.Stage
},
// Create object moniker
tBpmProcess = new BpmProcessId() { id = moniker },
};
// Copy process element
var result = somClient.CopyBpmElements(tCopy);
return result;
}

See also:

Working with Processes