using Zengenti.Contensis.Management;
// Get a management client
var client = ManagementClient.Create({url}, {clientId}, {sharedSecret});
// Select to relevant project
var website = client.Projects.Get("movieDb");
// Retrieve an entry
var entry = website.Entries.Get("d69ad539-0e3a-4d7f-9c9d-1fad1b39faad");
// Invoke a workflow event
try
{
entries.Workflow.Invoke("awaitingApproval.decline",
new
{
message = "Need to work on the last part as it doesn't read very well..."
}
);
}
catch(WorkflowException ex)
{
// Something went wrong invoking the workflow
}
catch(RestException restEx)
{
// Something went wrong in the service or the entry does not exist
}
catch(Exception)
{
// Client API issue
}