The ProcessEngineService.svc web service
Glossary Item Box
Contents
Introduction
Running business processes is one of the purpose of integration the external application with Creatio. The ProcessEngineService.svc web service that enables running business processes from the outside is implemented for this.
Example of using the ProcessEngineService.svc web service is covered in the "How to run Creatio processes via web service” article. You can find the full list of web service methods in the ProcessEngineService Class Members documentation.
ProcessEngineService.svc request
GET /7.15.1.1295_SalesEnterprise/0/ServiceModel/ProcessEngineService.svc/CustomProcess/Execute?ResultParameterName=CustomProcessResult&processParam=15 HTTP/1.1 Host: localhost BPMCSRF: bmJcGKDsMKnGmK0yKPUfR. Cookie: BPMSESSIONID=mdbspc3lpbvldg4qwrotnoe1; BPMLOADER=2cqd4ean14rmlkyl1o35qfnt; .ASPXAUTH=90A57901E17893AF50528FB608B52A1FFCA8359E525D72B95A2C36835171F33B4E6B6421920F5F73EC7B6C707402E2243C142738E6DC1B0CB6B9C8DF1921B53BDBADF3D076F0CB671FBC33EECEC1AD587D119ECA63FE49C8C4CC0DB4AD6A9C720778E249754C8BE34AD082AFD0A027A4CC7B6783003DD659FA077ED0C968602BF8841291B6380D3BC53C62C88D9EAA8D2096DB44B0EFD1428637F3D9554A58AE59E07D8777D0C8DC41290156F176F596014D1E5D6648A038FBBA557048EF0DE9FF8AABA9AB3D34EC157F6C839BA24F8C5D2D11FE72664D7791559D37A5C29AEDAF2F55A87E68B2250864B1C082A679267D25135F780370635DBFCBFAC3F96EA32001E5AC80DBDB2C5C401C576875F875549872EED2794623D2E0AF6E89B14230BC6847D19AF1951863035B43BB6C04105AA063EC9BDFC2EE5C8FC4D13B0B30009443A6BC42F0E2434C2F924D13433D8392A051308CF98209428E6A70AB10F4BBA46E7C328299EBCA6743C94D90BDC6C18F0AA6F8CCF52F014C29A17E38EFD7B061F60853DB063977C9601385D4D648EB63D8B487; UserName=83|117|112|101|114|118|105|115|111|114; BPMCSRF=bmJcGKDsMKnGmK0yKPUfR.
To run a specific business process, call the Execute() method of the service.
Web service request structure:
- query string;
- request headers.
Query string
Query string structure
http(s)://[Creatio application URL]/0/ServiceModel/ProcessEngineService.svc/ProcessSchemaName/Execute?ResultParameterName=resultParameterName&inputParameter=inputParameterValue
Example of a query string
https://mycreatio.com/0/ServiceModel/ProcessEngineService.svc/CustomProcess/Execute?ResultParameterName=CustomProcessResult&processParam=15
Query string parameters
- ProcessSchemaName
-
You can find the name of the business process schema in the [Configuration] section.
- resultParameterName (the parameter is not required).
- The code of the process parameter that stores the result of the process execution. If this parameter is not specified, the web service will run the business process without waiting for the result of its execution.
-
If the parameter code is not available in the process being called, the web service will return a null value.
- inputParameter (the parameter is not required).
-
The incoming parameter codes of the business process. If you pass several incoming parameters, use a “&” character to combine them.
- inputParameterValue
-
The incoming parameter values of the business process.
Request header
- BPMCSRF
- BPMCSRF: authentication_cookie_value
- Authentication cookie
-
Before calling the web service using third-party tools, authenticate the user who will run the requests. For this, use the AuthService.svc service (see "Authentication of external requests”).
- ForceUseSession
- ForceUseSession: true
-
The “ForceUseSession” title accounts for using the existing session.
ProcessEngineService.svc response
<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/"> "[ {\"Id\":\"c38d46fd-e405-491a-a508-01bb9760eecc\",\"Name\":\"Valerie E. Murphy\",\"Phone\":\"3090\"}, {\"Id\":\"516bc5b4-a79a-4e1d-9894-0566617012d1\",\"Name\":\"Sharyn Mccraney\",\"Phone\":\"+1 33867 411 85 76\"}, {\"Id\":\"41b67c9e-7c14-487c-a217-057fd3735ba1\",\"Name\":\"Shela Andry\",\"Phone\":\"+1 33985 177 50 37\"}, {\"Id\":\"f79fe861-88af-4e23-9bb7-0625a6cee703\",\"Name\":\"Kate Roberts\",\"Phone\":\"+1 212 775 9012\"}, ]" </string>
The result of executing the Execute() method is returned as a string containing the JSON object (it is possible to get the null).
Deserialization of the JSON object and bringing the result to a specific type of data must be performed in the code that calls the web service.
Executing a separate element of the business process
To execute a separate element of the business process, call the ExecProcElByUId web service method. This method accepts the Id of the executed process element as a parameter.
Query string:
http[s]://[Creatio application URL]/0/ServiceModel/ProcessEngineService.svc/ExecProcElByUId/ProcessElementUID
- ProcessElementUID
-
Id of the executed element of the process.
You can only execute an element of the process that has been run.
If the ExecProcElByUId process element has already been completed when calling the method, this element will not be executed.