abortWorkflow
Abort a workflow instance
Aborts a workflow instance identified by the provided instanceId.
/v2/workflows/instances/{instanceId}/abort
Usage and SDK Samples
curl -X DELETE \
-H "Accept: text/plain,application/json" \
"http://localhost/v2/workflows/instances/{instanceId}/abort"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;
import java.io.File;
import java.util.*;
public class DefaultApiExample {
public static void main(String[] args) {
// Create an instance of the API class
DefaultApi apiInstance = new DefaultApi();
String instanceId = instanceId_example; // String | The identifier of the workflow instance to abort.
try {
'String' result = apiInstance.abortWorkflow(instanceId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#abortWorkflow");
e.printStackTrace();
}
}
}
import 'package:openapi/api.dart';
final api_instance = DefaultApi();
final String instanceId = new String(); // String | The identifier of the workflow instance to abort.
try {
final result = await api_instance.abortWorkflow(instanceId);
print(result);
} catch (e) {
print('Exception when calling DefaultApi->abortWorkflow: $e\n');
}
import org.openapitools.client.api.DefaultApi;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
String instanceId = instanceId_example; // String | The identifier of the workflow instance to abort.
try {
'String' result = apiInstance.abortWorkflow(instanceId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#abortWorkflow");
e.printStackTrace();
}
}
}
// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
String *instanceId = instanceId_example; // The identifier of the workflow instance to abort. (default to null)
// Abort a workflow instance
[apiInstance abortWorkflowWith:instanceId
completionHandler: ^('String' output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var OrchestratorPlugin = require('orchestrator_plugin');
// Create an instance of the API class
var api = new OrchestratorPlugin.DefaultApi()
var instanceId = instanceId_example; // {String} The identifier of the workflow instance to abort.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.abortWorkflow(instanceId, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class abortWorkflowExample
{
public void main()
{
// Create an instance of the API class
var apiInstance = new DefaultApi();
var instanceId = instanceId_example; // String | The identifier of the workflow instance to abort. (default to null)
try {
// Abort a workflow instance
'String' result = apiInstance.abortWorkflow(instanceId);
Debug.WriteLine(result);
} catch (Exception e) {
Debug.Print("Exception when calling DefaultApi.abortWorkflow: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$instanceId = instanceId_example; // String | The identifier of the workflow instance to abort.
try {
$result = $api_instance->abortWorkflow($instanceId);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->abortWorkflow: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;
# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $instanceId = instanceId_example; # String | The identifier of the workflow instance to abort.
eval {
my $result = $api_instance->abortWorkflow(instanceId => $instanceId);
print Dumper($result);
};
if ($@) {
warn "Exception when calling DefaultApi->abortWorkflow: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
instanceId = instanceId_example # String | The identifier of the workflow instance to abort. (default to null)
try:
# Abort a workflow instance
api_response = api_instance.abort_workflow(instanceId)
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->abortWorkflow: %s\n" % e)
extern crate DefaultApi;
pub fn main() {
let instanceId = instanceId_example; // String
let mut context = DefaultApi::Context::default();
let result = client.abortWorkflow(instanceId, &context).wait();
println!("{:?}", result);
}
Scopes
Parameters
| Name | Description |
|---|---|
| instanceId* |
String
The identifier of the workflow instance to abort.
Required
|