SetBpmStep

Syntax

bool SetBpmStep(BpmProcessId tBpmProcess, BpmStepArg bpmStepArg, BpmStep bpmStep)

Parameters

tBpmProcess. Opened process instance moniker.

bpmStepArg. Operation execution parameters.

bpmStep. Updated step settings.

Description

The SetBpmStep operation changes process step settings.

Comments

To execute the operation, in the tBpmProcess field specify moniker of opened process instance, and in the bpmStepArg.bindOpt.bindOpt field determine which settings will be changed, and in the bpmStep field determine step settings.

The moniker can be obtained after executing the OpenBpmProcess operation.

The operation results in the logical True if step settings were changed successfully.

Example

Below is the example of changing process step settings. The request contains moniker of opened process instance, indicates whether basic step settings are changed, and the step with updated 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>KHOGMNEDEFLBGOAEJFBOFFKKJNCFJAMECINHGPIPPPNCJNEN!M!S!BPDJNHDPEDEFLBGOAEEGHJBBCMPMFHFFEELLEMDGGNHJGDMOKL</id>
  </tBpmProcess>
<bpmStepArg xmlns="">
<bindOpt>
  <optType>Base</optType>
  </bindOpt>
  </bpmStepArg>
<bpmStep xmlns="">
  <isEnabled>false</isEnabled>
  <isValid>true</isValid>
  <name>New step name</name>
  <type>Approval</type>
  <index>1</index>
  <guid>{0CF6521D-F5DB-48EB-A310-3897914390A6}</guid>
  <descr>Step is temporarily is excluded from calculation</descr>
  <roleId>PS-1-1</roleId>
<maxDur>
  <periodType>Day</periodType>
  <amount>1</amount>
  </maxDur>
  <minDeadline>18:00</minDeadline>
  <bindObjKey>340033</bindObjKey>
  <checkDeadline>true</checkDeadline>
<data>
  <writeAccess>false</writeAccess>
  <authObjKey>317058</authObjKey>
  </data>
  </bpmStep>
  </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">1</SetBpmStepResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"SetBpmStep" :
{
"tBpmProcess" :
{
"id" : "KHOGMNEDEFLBGOAEJFBOFFKKJNCFJAMECINHGPIPPPNCJNEN!M!S!BPDJNHDPEDEFLBGOAEEGHJBBCMPMFHFFEELLEMDGGNHJGDMOKL"
},
"bpmStepArg" :
{
"bindOpt" :
{
"optType" : "Base"
}
},
"bpmStep" :
{
"isEnabled" : "false",
"isValid" : "true",
"name" : "New step name",
"type" : "Approval",
"index" : "1",
"guid" : "{0CF6521D-F5DB-48EB-A310-3897914390A6}",
"descr" : "Step is temporarily excluded from calculation",
"roleId" : "PS-1-1",
"maxDur" :
{
"periodType" : "Day",
"amount" : "1"
},
"minDeadline" : "18:00",
"bindObjKey" : "340033",
"checkDeadline" : "true",
"data" :
{
"writeAccess" : "false",
"authObjKey" : "317058"
}
}
}
}

JSON response:

{
"SetBpmStepResult" : "1"
}
public static bool SetBpmStep(string moniker, BpmStepOptionType optionType,  BpmStep newStep)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tSet = new SetBpmStep()
{
tBpmProcess = new BpmProcessId() { id = moniker },
bpmStepArg = new BpmStepArg()
{
bindOpt = new BpmBindingParamOption()
{
optType = optionType
},
},
bpmStep = newStep
};
// Change step settings
var result = somClient.SetBpmStep(tSet);
return result;
}

See also:

Working with Business Processes