Web Service > Web Service Operations > Working with Processes > ChangeGatewayType
ChangeGatewayTypeResult ChangeGatewayType(BpmProcessId tBpmProcess, ChangeGatewayTypeArg tArg)
tBpmProcess. Moniker of opened process.
tArg. Operation execution parameters.
The ChangeGatewayType operation changes gateway type.
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.
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.
{
"ChangeGatewayType" :
{
"tBpmProcess" :
{
"id" : "NDCHEPHAPKKEGOAEGJJAFOGDFMPNFELEJKODDHAOOLEGCFFC!M!S!BPNLJFBCIAPKKEGOAEOLJBAFNHCPBHEAIELJHDCCHNLAJLFNMF"
},
"tArg" :
{
"guid" : "{EA546F75-C5A8-477F-BBC4-56E362049682}",
"gtwType" : "Gateway_parallel"
}
}
}
{
"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: