SaveBpmProcess

Syntax

SaveBpmProcessResult SaveBpmProcess(BpmProcessId tBpmProcess, BpmProcessInfoArg tArg)

Parameters

tBpmProcess. Moniker of opened process.

tArg. Operation execution parameters.

Description

The SaveBpmProcess operation saves changes in a process.

Comments

To execute the operation, in the tBpmProcess field specify moniker of opened process, and in the tArg field specify updated information about process structure. The moniker can be obtained after executing the OpenBpmProcess operation. The process should be opened for edit.

The operation results in the updated process version.

Example

Below is the example of saving changes in a process. The request contains moniker of opened process and stage and steps settings. The response contains whether changes were saved 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">
<SaveBpmProcess xmlns="http://www.fsight.ru/PP.SOM.Som">
<tBpmProcess xmlns="">
  <id>PCMPFKDANKDAGOAEHGGCMAILKEKKFDIEKJCJBILJBEBFPLMF!M!S!BPGFFNKBEANKDAGOAEDJNBGLCJMDPBKHHEIKDLOLJJHKCKAIFG</id>
  </tBpmProcess>
<tArg xmlns="">
  <name>Process</name>
<stages>
<it>
<stage>
  <name>Stage 1</name>
  <index>0</index>
  <guid>{D198A63E-B5BD-4791-88F3-3E60C9DE7A54}</guid>
  </stage>
  <gtwType>No_gateway</gtwType>
  <isCondActive>false</isCondActive>
<stGroups>
<it>
<stGroup>
  <index>0</index>
  <guid>{322DDF61-B291-42CB-A075-53B7F4337743}</guid>
  </stGroup>
<steps>
<it>
  <isEnabled>true</isEnabled>
  <name>Manual data entry</name>
  <type>ManualTask</type>
  <index>0</index>
  <guid>{13F3BEEB-009D-4FF7-88CC-F3C41A025A99}</guid>
  <roleId>PS-1-144122</roleId>
<maxDur>
  <periodType>Day</periodType>
  <amount>1</amount>
  </maxDur>
  </it>
<it>
  <isEnabled>true</isEnabled>
  <name>Approve changes</name>
  <type>Approval</type>
  <index>1</index>
  <guid>{0CF6521D-F5DB-48EB-A310-3897914390A6}</guid>
  <roleId>PS-1-1</roleId>
<maxDur>
  <periodType>Day</periodType>
  <amount>1</amount>
  </maxDur>
<data>
  <writeAccess>false</writeAccess>
  <frmKey>262317</frmKey>
  <authObjKey>317058</authObjKey>
  </data>
  </it>
  </steps>
  <isDefaultFlow>false</isDefaultFlow>
  </it>
  </stGroups>
  </it>
  </stages>
  </tArg>
  </SaveBpmProcess>
  </s:Body>
  </s:Envelope>

SOAP response:

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

JSON request:

{
"SaveBpmProcess" :
{
"tBpmProcess" :
{
"id" : "PCMPFKDANKDAGOAEHGGCMAILKEKKFDIEKJCJBILJBEBFPLMF!M!S!BPGFFNKBEANKDAGOAEDJNBGLCJMDPBKHHEIKDLOLJJHKCKAIFG"
},
"tArg" :
{
"name" : "Process",
"stages" :
{
"it" :
{
"stage" :
{
"name" : "Stage 1",
"index" : "0",
"guid" : "{D198A63E-B5BD-4791-88F3-3E60C9DE7A54}"
},
"gtwType" : "No_gateway",
"isCondActive" : "false",
"stGroups" :
{
"it" :
{
"stGroup" :
{
"index" : "0",
"guid" : "{322DDF61-B291-42CB-A075-53B7F4337743}"
},
"steps" :
{
"it" :
[
{
"isEnabled" : "true",
"name" : "Manual data entry",
"type" : "ManualTask",
"index" : "0",
"guid" : "{13F3BEEB-009D-4FF7-88CC-F3C41A025A99}",
"roleId" : "PS-1-144122",
"maxDur" :
{
"periodType" : "Day",
"amount" : "1"
}
},
{
"isEnabled" : "true",
"name" : "Approve changes",
"type" : "Approval",
"index" : "1",
"guid" : "{0CF6521D-F5DB-48EB-A310-3897914390A6}",
"roleId" : "PS-1-1",
"maxDur" :
{
"periodType" : "Day",
"amount" : "1"
},
"data" :
{
"writeAccess" : "false",
"frmKey" : "262317",
"authObjKey" : "317058"
}
}
]
},
"isDefaultFlow" : "false"
}
}
}
}
}
}
}

JSON response:

{
"SaveBpmProcessResult" :
{
"parid" : "1481"
}
}
public static SaveBpmProcessResult SaveBpmProcess(string moniker, string newName, BpmStageInfo[] stages)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tGet = new SaveBpmProcess()
{
// Create object moniker
tBpmProcess = new BpmProcessId() { id = moniker },
tArg = new BpmProcessInfoArg()
{
name = newName,
stages = stages
}
};
// Save changes
var result = somClient.SaveBpmProcess(tGet);
return result;
}

See also:

Working with Processes