Skip to main content

Workflow extension methods

Log in to add to favourites
C#
1
using Zengenti.Contensis.Management.Workflow.Basic;

Publish

C#
1
2
3
public static void Publish(this Workflow workflow) { }
C#
1
2
// Publish the version of the entry. entry.Workflow.Publish();

PublishAsync

C#
1
2
3
public async Task PublishAsync(this Workflow workflow) { }
C#
1
2
// Publish the version of the entry. await entry.Workflow.PublishAsync();
C#
1
using Zengenti.Contensis.Management.Workflow.Approval;

Submit

C#
1
2
3
public static void Submit(this Workflow workflow, string message = null) { }
C#
1
2
// Submit the entry for approval. entry.Workflow.Submit("I've updated the 2nd paragraph to make it clearer");

SubmitAsync

C#
1
2
3
public static async Task SubmitAsync(this Workflow workflow, string message = null) { }
C#
1
2
// Submit the entry for approval asynchronously. await entry.Workflow.SubmitAsync("I've updated the 2nd paragraph to make it clearer");

Approve

C#
1
2
3
public void Approve(this Workflow workflow) { }
C#
1
2
// Approve the entry for publishing. entry.Workflow.Approve();

ApproveAsync

C#
1
2
3
public async Task ApproveAsync(this Workflow workflow) { }
C#
1
2
// Approve the entry instance asynchronously. await entry.Workflow.ApproveAsync();

Decline

C#
1
2
3
public void Decline(this Workflow workflow, string message = null) { }
C#
1
2
// Decline the entry submission. entry.Workflow.Decline("There are multiple spelling mistakes in the opening paragraph");

DeclineAsync

C#
1
2
3
public async Task DeclineAsync(this Workflow workflow, string message) { }
C#
1
2
// Decline the entry submission asynchronously. await entry.Workflow.DeclineAsync("I've updated the 2nd paragraph to make it clearer");

Revoke

C#
1
2
3
public void Revoke(this Workflow workflow) { }
C#
1
2
// Revoke the entry submission. entry.Workflow.Revoke();

RevokeAsync

C#
1
2
3
public async Task RevokeAsync(this Workflow workflow) { }
C#
1
2
// Revoke the entry submission asynchronously. await entry.Workflow.RevokeAsync();
C#
1
2
using Zengenti.Contensis.Management.Workflow.Approval; using Zengenti.Contensis.Management.Workflow.Basic;

Unpublish

C#
1
2
3
public void Unpublish(this Workflow workflow, bool unpublishAll = false) { }
C#
1
2
3
4
5
// Unpublish the current entry. entry.Workflow.Unpublish(); // Unpublish all of the language variations for this entry. entry.Workflow.Unpublish(true);

UnpublishAsync

C#
1
2
3
public async Task UnpublishAsync(this Workflow workflow, bool unpublishAll = false) { }
C#
1
2
3
4
5
// Unpublish the current entry. await entry.Workflow.UnpublishAsync(); // Unpublish all of the language variations for this entry. await entry.Workflow.UnpublishAsync(true);

Still need help?

New support request