Show contents 

Web Service > Web Service Operations > Working with Processes > MoveBpmElement

MoveBpmElement

Syntax

MoveBpmElementResult MoveBpmElement(BpmProcessId tBpmProcess, MoveBpmElementArg tArg)

Parameters

tBpmProcess. Moniker of opened process.

tArg. Parameters for moving element in process tree.

Description

The MoveBpmElement operation moves element in process structure.

Comments

To execute the operation, in the tBpmProcess field specify moniker of opened process, and in the tArg.elGuids field specify GUID of moved element, and in the tArg.dest field specify the place where the element is moved. 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 moving step in the process stage. The request contains moniker of opened process, step GUID, and index of the position, to which the step is moved. 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">
<MoveBpmElement xmlns="http://www.fsight.ru/PP.SOM.Som">
<tBpmProcess xmlns="">
  <id>COAOPGKGCJKEGOAEIHPPEJNABOOGNDGENKOKNINMLFLJFBMK!M!S!BPHLNJFALGCJKEGOAEJPJLLKGPHKELIFIECLCHAGEBCDNFMELP</id>
  </tBpmProcess>
<tArg xmlns="">
  <elType>Step</elType>
<elGuids>
  <it>{F6158579-0B43-4DEC-9C8B-7AE2E70F15AA}</it>
  </elGuids>
  <needTree>true</needTree>
<dest>
  <guid>{433124F8-1861-4CA6-BFDE-B94C54F91652}</guid>
  <index>1</index>
  </dest>
  </tArg>
  </MoveBpmElement>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<MoveBpmElementResult 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>
<it>
<stage>
  <name>Additional stage</name>
  <index>1</index>
  <guid>{94C3E46B-1BBC-4FFF-9600-49C6B5D344D7}</guid>
  </stage>
  <gtwType>No_gateway</gtwType>
  <isCondActive>0</isCondActive>
<stGroups>
<it>
<stGroup>
  <index>0</index>
  <guid>{433124F8-1861-4CA6-BFDE-B94C54F91652}</guid>
  </stGroup>
<steps>
<it>
  <isEnabled>1</isEnabled>
  <isValid>0</isValid>
  <name>Approve</name>
  <type>Approval</type>
  <index>0</index>
  <guid>{CC5B8608-26E7-4B24-ADE9-E4ECD917AED7}</guid>
  <descr />
<maxDur>
  <periodType>Day</periodType>
  <amount>1</amount>
  </maxDur>
  <minDeadline>18:00</minDeadline>
  <checkDeadline>0</checkDeadline>
<data>
  <writeAccess>0</writeAccess>
  <authObjKey>0</authObjKey>
  </data>
  </it>
<it>
  <isEnabled>1</isEnabled>
  <isValid>0</isValid>
  <name>Execute method</name>
  <type>ForeMethod</type>
  <index>1</index>
  <guid>{F6158579-0B43-4DEC-9C8B-7AE2E70F15AA}</guid>
  <descr />
  <roleId>PS-1-1</roleId>
  <roleName>ADMIN</roleName>
<maxDur>
  <periodType>Day</periodType>
  <amount>1</amount>
  </maxDur>
  <minDeadline>18:00</minDeadline>
  <checkDeadline>0</checkDeadline>
  <fore />
  </it>
  </steps>
  <isDefaultFlow>0</isDefaultFlow>
  </it>
  </stGroups>
  </it>
  </stages>
  </procTree>
  </MoveBpmElementResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"MoveBpmElement" :
{
"tBpmProcess" :
{
"id" : "COAOPGKGCJKEGOAEIHPPEJNABOOGNDGENKOKNINMLFLJFBMK!M!S!BPHLNJFALGCJKEGOAEJPJLLKGPHKELIFIECLCHAGEBCDNFMELP"
},
"tArg" :
{
"elType" : "Step",
"elGuids" :
{
"it" : "{F6158579-0B43-4DEC-9C8B-7AE2E70F15AA}"
},
"needTree" : "true",
"dest" :
{
"guid" : "{433124F8-1861-4CA6-BFDE-B94C54F91652}",
"index" : "1"
}
}
}
}

JSON response:

{
"MoveBpmElementResult" :
{
"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"
}
}
},
{
"stage" :
{
"name" : "Additional stage",
"index" : "1",
"guid" : "{94C3E46B-1BBC-4FFF-9600-49C6B5D344D7}"
},
"gtwType" : "No_gateway",
"isCondActive" : "0",
"stGroups" :
{
"it" :
{
"stGroup" :
{
"index" : "0",
"guid" : "{433124F8-1861-4CA6-BFDE-B94C54F91652}"
},
"steps" :
{
"it" :
[
{
"isEnabled" : "1",
"isValid" : "0",
"name" : "Approve",
"type" : "Approval",
"index" : "0",
"guid" : "{CC5B8608-26E7-4B24-ADE9-E4ECD917AED7}",
"descr" : "",
"maxDur" :
{
"periodType" : "Day",
"amount" : "1"
},
"minDeadline" : "18:00",
"checkDeadline" : "0",
"data" :
{
"writeAccess" : "0",
"authObjKey" : "0"
}
},
{
"isEnabled" : "1",
"isValid" : "0",
"name" : "Execute method",
"type" : "ForeMethod",
"index" : "1",
"guid" : "{F6158579-0B43-4DEC-9C8B-7AE2E70F15AA}",
"descr" : "",
"roleId" : "PS-1-1",
"roleName" : "ADMIN",
"maxDur" :
{
"periodType" : "Day",
"amount" : "1"
},
"minDeadline" : "18:00",
"checkDeadline" : "0",
"fore" : ""
}
]
},
"isDefaultFlow" : "0"
}
}
}
]
}
}
}
}
public static MoveBpmElementResult MoveBpmElement(string moniker, string elGUIDSource, string elGUIDDest, uint moveTo)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tMove = new MoveBpmElement()
{
// Create object moniker
tBpmProcess = new BpmProcessId() { id = moniker },
tArg = new MoveBpmElementArg()
{
elGuids = new string[1] { elGUIDSource },
dest = new MoveBpmElementDestination() { guid = elGUIDDest, index = moveTo},
needTree = true,
elType = BpmElementType.Step
}
};
// Move process element
var result = somClient.MoveBpmElement(tMove);
return result;
}

See also:

Working with Processes