public bool Delete(int id) { // Delete a workflow var client = new WexflowServiceClient(_configs.WexflowWebServiceUri); var deleted = client.DeleteWorkflow(_configs.Username, _configs.Password, id); return(deleted); }
static void Main(string[] args) { try { IConfiguration config = new ConfigurationBuilder() .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true) .Build(); var wexflowServiceUri = config["WexflowWebServiceUri"]; var username = config["Username"]; var password = config["Password"]; var client = new WexflowServiceClient(wexflowServiceUri); // Test create var res = client.CreateWorkflow(username, password, createPayload); Console.WriteLine("Create result: {0}", res); // Test update res = client.UpdateWorkflow(username, password, updatedPayload); Console.WriteLine("Update result: {0}", res); // Test read var xml = client.ReadWorkflow(username, password, 999); Console.WriteLine("Read result: {0}", xml); // Test delete res = client.DeleteWorkflow(username, password, 999); Console.WriteLine("Delete result: {0}", res); } catch (Exception e) { Console.WriteLine("Error: {0}", e); } Console.WriteLine("Press any key to exit..."); Console.ReadKey(); }