Genpact Cora Knowledge Center

Support

POST /ProcessesService.svc/StartWorkflow

Starts the workflow that you specify in the request. You can assign values to the instance parameters by using the Variable object.

Method

POST

URL

https://localhost/Flowtime/_vti_bin/Flowtime/ProcessesService.svc/StartWorkflow


Parameters

NameTypeRequiredDescription
workflowIdguidrequiredGUID of the workflow.
variablesValuesarray of key value pairsoptionalContains a key and value pairs. The key is the name of the variable. The value is the value of the variable.

Example Request

$.ajax({
 type: "GET",
 url: "_vti_bin/Flowtime/XsrfTokenService.svc/GetXsrfToken",
 contentType: "application/json; charset=utf-8",
 dataType: "json",
 cache: false,
 async: false,
 success: function (xsrf) {
 $.ajax({
 type: "POST",
 url: "_vti_bin/Flowtime/ProcessesService.svc/StartWorkflow",
 data: JSON.stringify(
 {
 workflowId:"7dbcc46f-98e9-44cc-acf5-5ab7972411d8", //Id of workflow
 variablesValues:[{Key:"var1", Value:1},{Key:"var2", Value:"abc"}] //the key is name of variables and Value is value of variable.
 }),
 headers:
 {
"uiculture": "en-GB",
"culture": "en-GB",
"theme": "/Flowtime/Shared Resources/Themes/Sequence8/",
"X-SqXsrfToken":xsrf,
"config": "Portal"
 },
 dataType: "json",
 contentType: "application/json; charset=utf-8",
 success: function (data) {
 alert("New instance #"+data+" was opened");
 },
 error: function (error) {
 console.log(error);
 }
 });
 },
 error: function (error) {
 console.log(error);
 }
 });