SetBpmCondition

Syntax

SetBpmConditionResult SetBpmCondition(BpmProcessId tBpmProcess, SetBpmConditionArg tArg)

Parameters

tBpmProcess. Moniker of opened process.

tArg. Operation execution parameters.

Description

The SetBpmCondition operation changes conditions of executing a group of steps.

Comments

To execute the operation, in the tBpmProcess field specify moniker of opened process and in the tArg field specify identifier of a group of steps and their execution conditions. The moniker can be obtained after executing the OpenBpmProcess operation. The unique identifier can be obtained in execution results of the GetBpmWorkspace operation.

The operation result determines whether conditions are changed successfully.

Example

Below is the example of changing conditions of executing group of steps. The request contains moniker of opened process, unique identifier of a group of steps, and new execution conditions. The response contains whether execution condition settings were changed 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">
<SetBpmCondition xmlns="http://www.fsight.ru/PP.SOM.Som">
<tBpmProcess xmlns="">
  <id>LHJPLDHKBDMCGOAECKIHKFBJAFLIFNBENKKPBNHANLGEFOAI!M!S!BPNKIIPFHKBDMCGOAEBOICMMCALKJJNNMEEJMFJPFGIOLFHGGH</id>
  </tBpmProcess>
<tArg xmlns="">
<cond>
<it>
  <type>RelationSetNumber</type>
  <exprRel>Or</exprRel>
<expr>
<paramInfo>
  <paramId>OBJ117622_0</paramId>
  <paramKey>117622</paramKey>
  </paramInfo>
  <exprType>RelationSetNumber</exprType>
  <operation>NotEqual</operation>
<rDimS>
  <mnk>LHJPLDHKBDMCGOAECKIHKFBJAFLIFNBENKKPBNHANLGEFOAI!M!S!SJFMPLGHKBDMCGOAEMHHILAIEPFGMEDDEMIBDHFMHFAJLFMLG</mnk>
  </rDimS>
  </expr>
  </it>
  </cond>
  <isDefault>false</isDefault>
  <guid>{CE8E3E58-1315-4EBB-9634-1AA54BEAAC9D}</guid>
  </tArg>
  </SetBpmCondition>
  </s:Body>
  </s:Envelope>

SOAP response:

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

JSON request:

{
"SetBpmCondition" :
{
"tBpmProcess" :
{
"id" : "LHJPLDHKBDMCGOAECKIHKFBJAFLIFNBENKKPBNHANLGEFOAI!M!S!BPNKIIPFHKBDMCGOAEBOICMMCALKJJNNMEEJMFJPFGIOLFHGGH"
},
"tArg" :
{
"cond" :
{
"it" :
{
"type" : "RelationSetNumber",
"exprRel" : "Or",
"expr" :
{
"paramInfo" :
{
"paramId" : "OBJ117622_0",
"paramKey" : "117622"
},
"exprType" : "RelationSetNumber",
"operation" : "NotEqual",
"rDimS" :
{
"mnk" : "LHJPLDHKBDMCGOAECKIHKFBJAFLIFNBENKKPBNHANLGEFOAI!M!S!SJFMPLGHKBDMCGOAEMHHILAIEPFGMEDDEMIBDHFMHFAJLFMLG"
}
}
}
},
"isDefault" : "false",
"guid" : "{CE8E3E58-1315-4EBB-9634-1AA54BEAAC9D}"
}
}
}

JSON response:

{
"SetBpmConditionResult" :
{
"res" : "1"
}
}
public static SetBpmConditionResult SetBpmCondition(string moniker, string stepGUID, BpmCondition[] newConds)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tSet = new SetBpmCondition()
{
// Create object moniker
tBpmProcess = new BpmProcessId() { id = moniker },
tArg = new SetBpmConditionArg()
{
guid = stepGUID,
isDefault = false,
cond = newConds
}
};
// Change condition of executing a group of steps
var result = somClient.SetBpmCondition(tSet);
return result;
}

See also:

Working with Processes