Show contents 

Web Service > Web Service Operations > Working with Processes > SetStartEventSettings

SetStartEventSettings

Syntax

Result SetStartEventSettings(BpmProcessId tBpmProcess, BpmStartEventInfo tArg)

Parameters

tBpmProcess. Moniker of opened process.

tArg. Operation execution parameters.

Description

The SetStartEventSettings operation changes process start event settings.

Comments

To execute the operation, in the tBpmProcess field specify moniker of opened process, and in the tArg field specify settings to be determined. Depending on the value of the tArg.optType field, different groups of fields are set. The moniker can be obtained after executing the OpenBpmProcess operation.

The operation returns whether start event settings were determined successfully.

Example

Below is the example of changing process start event settings. The request contains moniker of opened process and settings to be determined. The response contains whether 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">
<SetStartEventSettings xmlns="http://www.fsight.ru/PP.SOM.Som">
<tBpmProcess xmlns="">
  <id>DICNGBKNAJKEGOAEPFPJHGAAEMHJPFIEHLGHCIACBBLCJJKA!M!S!BPAHEICDKNAJKEGOAECMEPDJAJDGAPEBCELJDMNJMLEPENHPHE</id>
  </tBpmProcess>
<tArg xmlns="">
  <optType>0</optType>
<per>
  <type>Monthly</type>
<mPer>
<ms>
  <it>1</it>
  <it>2</it>
  <it>3</it>
  <it>4</it>
  <it>5</it>
  <it>6</it>
  </ms>
<dM>
  <d>15</d>
  </dM>
  </mPer>
  </per>
  <rep>6</rep>
  </tArg>
  </SetStartEventSettings>
  </s:Body>
  </s:Envelope>

SOAP response:

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

JSON request:

{
"SetStartEventSettings" :
{
"tBpmProcess" :
{
"id" : "DICNGBKNAJKEGOAEPFPJHGAAEMHJPFIEHLGHCIACBBLCJJKA!M!S!BPAHEICDKNAJKEGOAECMEPDJAJDGAPEBCELJDMNJMLEPENHPHE"
},
"tArg" :
{
"optType" : "0",
"per" :
{
"type" : "Monthly",
"mPer" :
{
"ms" :
{
"it" :
[
"1",
"2",
"3",
"4",
"5",
"6"
]
},
"dM" :
{
"d" : "15"
}
}
},
"rep" : "6"
}
}
}

JSON response:

{
"SetStartEventSettingsResult" : "1"
}
public static bool SetStartEventSettings(string moniker)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tSet = new SetStartEventSettings()
{
// Create object moniker
tBpmProcess = new BpmProcessId() { id = moniker },
tArg = new BpmStartEventInfo()
{
optType = 0,
per = new BpmPeriodInfo()
{
type = BpmSchTaskPeriodType.Monthly,
mPer = new BpmSchTaskPeriodMonthly()
{
dM = new BpmSchTaskPeriodMonthlyModDay()
{
d = 15
},
ms = new int[6] { 1, 2, 3, 4, 5, 6 }
}
},
rep = 6
}
};
// Determine start event settings
var result = somClient.SetStartEventSettings(tSet);
return result;
}

See also:

Working with Processes