Show contents 

Web Service > Web Service Operations > Working with Processes > SetBpmStep

SetBpmStep

Syntax

bool SetBpmStep(BpmProcessId tBpmProcess, BpmStepArg bpmStepArg)

Parameters

tBpmProcess. Moniker of opened process.

bpmStepArg. Operation execution parameters.

Description

The SetBpmStep operation changes process step settings.

Comments

To execute the operation, in the tBpmProcess field specify moniker of opened process, and in the tBpmStepArg field specify step parameters to be changed. The moniker can be obtained after executing the OpenBpmProcess operation.

The operation results in the logical True if step settings were changed successfully, or error message if some parameter was set incorrectly.

Example

Below is the example of changing process step settings. The request contains moniker of opened process and step settings. 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">
<SetBpmStep xmlns="http://www.fsight.ru/PP.SOM.Som">
<tBpmProcess xmlns="">
  <id>HCCHPFCEOKKEGOAEIEHCIOKNOCLDDHIEFIHLKFNHGNCKFAMP!M!S!BPKGCGEJCEOKKEGOAEJBOMCNNAIOMLLLCEELEHEIIOADLCIINK</id>
  </tBpmProcess>
<tBpmStepArg xmlns="">
  <isEnabled>false</isEnabled>
  <name>New step name</name>
  <guid>{354F963A-8195-461E-BC49-CC14F1E64F92}</guid>
  <descr>Step is temporarily is excluded from calculation</descr>
  <roleId>PS-1-1</roleId>
  <roleName>ADMIN</roleName>
<maxDur>
  <periodType>Day</periodType>
  <amount>1</amount>
  </maxDur>
  <minDeadline>18:00</minDeadline>
  <checkDeadline>false</checkDeadline>
<bindOpt>
  <optType>Base</optType>
  </bindOpt>
  </tBpmStepArg>
  </SetBpmStep>
  </s:Body>
  </s:Envelope>

SOAP response:

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

JSON request:

{
"SetBpmStep" :
{
"tBpmProcess" :
{
"id" : "HCCHPFCEOKKEGOAEIEHCIOKNOCLDDHIEFIHLKFNHGNCKFAMP!M!S!BPKGCGEJCEOKKEGOAEJBOMCNNAIOMLLLCEELEHEIIOADLCIINK"
},
"tBpmStepArg" :
{
"isEnabled" : "false",
"name" : "New step name",
"guid" : "{354F963A-8195-461E-BC49-CC14F1E64F92}",
"descr" : "Step is temporarily excluded from calculation",
"roleId" : "PS-1-1",
"roleName" : "ADMIN",
"maxDur" :
{
"periodType" : "Day",
"amount" : "1"
},
"minDeadline" : "18:00",
"checkDeadline" : "false",
"bindOpt" :
{
"optType" : "Base"
}
}
}
}

JSON response:

{
"SetBpmStepResult" :
{
"validate" : "1"
}
}
public static BpmStepValidateResult SetBpmStep(string moniker, string stepGuid)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tSet = new SetBpmStep()
{
tBpmProcess = new BpmProcessId() { id = moniker },
tBpmStepArg = new BpmStepArg()
{
guid = stepGuid,
bindOpt = new BpmBindingParamOption()
{
optType = BpmStepOptionType.Base
},
checkDeadline = false,
name = "New step name",
descr = "Step is temporarily excluded from calculation",
isEnabled = false,
roleId = "PS-1-1",
roleName = "ADMIN",
maxDur = new BpmStepDuration()
{
amount = 1,
periodType = BDurationType.Day
},
minDeadline = "18:00"
}
};
// Change step settings
var result = somClient.SetBpmStep(tSet);
return result;
}

See also:

Working with Business Processes