Show contents 

Web Service > Web Service Operations > Working with Processes > ChangeGatewayType

ChangeGatewayType

Syntax

ChangeGatewayTypeResult ChangeGatewayType(BpmProcessId tBpmProcess, ChangeGatewayTypeArg tArg)

Parameters

tBpmProcess. Moniker of opened process.

tArg. Operation execution parameters.

Description

The ChangeGatewayType operation changes gateway type.

Comments

To execute the operation, in the tBpmProcess field specify moniker of opened process, in the tArg.guid field specify GUID of the stage, in which the gateway is set up, and in the tArg.gtwType field specify new gateway type. The moniker can be obtained after executing the OpenBpmProcess operation.

The operation returns whether gateway type is changed successfully.

Example

Below is the example of changing gateway type. The request contains moniker of opened process, GUID, and new gateway type. The response contains whether decision tree block attributes are successfully changed.

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">
<ChangeGatewayType xmlns="http://www.fsight.ru/PP.SOM.Som">
<tBpmProcess xmlns="">
  <id>NDCHEPHAPKKEGOAEGJJAFOGDFMPNFELEJKODDHAOOLEGCFFC!M!S!BPNLJFBCIAPKKEGOAEOLJBAFNHCPBHEAIELJHDCCHNLAJLFNMF</id>
  </tBpmProcess>
<tArg xmlns="">
  <guid>{EA546F75-C5A8-477F-BBC4-56E362049682}</guid>
  <gtwType>Gateway_parallel</gtwType>
  </tArg>
  </ChangeGatewayType>
  </s:Body>
  </s:Envelope>

SOAP response:

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

JSON request:

{
"ChangeGatewayType" :
{
"tBpmProcess" :
{
"id" : "NDCHEPHAPKKEGOAEGJJAFOGDFMPNFELEJKODDHAOOLEGCFFC!M!S!BPNLJFBCIAPKKEGOAEOLJBAFNHCPBHEAIELJHDCCHNLAJLFNMF"
},
"tArg" :
{
"guid" : "{EA546F75-C5A8-477F-BBC4-56E362049682}",
"gtwType" : "Gateway_parallel"
}
}
}

JSON response:

{
"ChangeGatewayTypeResult" :
{
"res" : "1"
}
}
public static ChangeGatewayTypeResult ChangeGatewayType(string moniker, string gatewayGuid)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tSet = new ChangeGatewayType()
{
// Create object moniker
tBpmProcess = new BpmProcessId() { id = moniker },
tArg = new ChangeGatewayTypeArg()
{
guid = gatewayGuid,
gtwType = BProcessGatewayType.Gateway_parallel
}
};
// Change gateway type
var result = somClient.ChangeGatewayType(tSet);
return result;
}

See also:

Working with Processes