OpenBpmProcess

Syntax

OpenBpmProcessResult OpenBpmProcess(OdId tObject, OpenBpmProcessArg tArg)

Parameters

tObject. Moniker of object that is a process.

tArg. Operation execution parameters.

Description

The OpenBpmProcess operation opens a process.

Comments

The operation gets access to process structure. To execute the operation, in the tObject field specify moniker if repository object that is a process. The moniker can be obtained on executing the GetObjects operation.

The operation results in the moniker of opened process instance.

Example

Below is the example of process opening. The request contains moniker of repository object that is a process. The response contains moniker of opened process instance.

The C# example uses the FindObjectById function, which code is given in the Getting Object Description by Its Identifier example.

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">
<OpenBpmProcess xmlns="http://www.fsight.ru/PP.SOM.Som">
<tObject xmlns="">
  <id>HBBODBAFBDNAGOAEMMDKMLHCADEHCLGEKJHCKBIALPJCLPHF!M!338080</id>
  </tObject>
<tArg xmlns="">
<args>
  <openForEdit>true</openForEdit>
  </args>
  </tArg>
  </OpenBpmProcess>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<OpenBpmProcessResult 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">
<id xmlns="">
  <id>HBBODBAFBDNAGOAEMMDKMLHCADEHCLGEKJHCKBIALPJCLPHF!M!S!BPNDIADGAFBDNAGOAEHGKIOKHBHBJIJMIELINEGEDPGAGEIEAP</id>
  </id>
  </OpenBpmProcessResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"OpenBpmProcess" :
{
"tObject" :
{
"id" : "HBBODBAFBDNAGOAEMMDKMLHCADEHCLGEKJHCKBIALPJCLPHF!M!338080"
},
"tArg" :
{
"args" :
{
"openForEdit" : "true"
}
}
}
}

JSON response:

{
"OpenBpmProcessResult" :
{
"id" :
{
"id" : "HBBODBAFBDNAGOAEMMDKMLHCADEHCLGEKJHCKBIALPJCLPHF!M!S!BPNDIADGAFBDNAGOAEHGKIOKHBHBJIJMIELINEGEDPGAGEIEAP"
}
}
}
public static OpenBpmProcessResult OpenBpmProcess(MbId mb, uint bpmKey)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tOpen = new OpenBpmProcess()
{
tArg = new OpenBpmProcessArg()
{
args = new BpmProcessOpenArgs()
{
openForEdit = true
}
},
// Create object moniker
tObject = new OdId() { id = mb.id + "!" + bpmKey }
};
// Open process
var result = somClient.OpenBpmProcess(tOpen);
return result;
}

See also:

Working with Processes