public bool Update(int id, string payload) { // Update Code var client = new WexflowServiceClient(_configs.WexflowWebServiceUri); var updated = client.UpdateWorkflow(_configs.Username, _configs.Password, payload); return(updated); }
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(); }