bool CopyBpmElements(BpmProcessId tBpmProcess, BpmElementsArg tArg)
tBpmProcess. Moniker of opened process.
tArg. Operation execution parameters.
The CopyBpmElements operation copies process elements.
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.
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.
{
"CopyBpmElements" :
{
"tBpmProcess" :
{
"id" : "KCHABFCBDFJFGOAELPKPBKMKIBIKDJHEFJONMMECLKLENNNJ!M!S!BPNGCBIPCBDFJFGOAELOCFACOLAGMIODCEKIOLGAPMGDNOCEBA"
},
"tArg" :
{
"elType" : "Stage",
"elGuids" :
{
"it" : "{103D9D40-1C9F-4184-990E-7DB11E5C561A}"
}
}
}
}
{
"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: