OData actions

OData custom actions are implemented on the following registers:

WzpWorkflowInstance

WzpUserTask

WzpWorkflowInstance

The following custom actions are used:

  • Promote: Available on phase workflows and will promote to the next phase.
  • Demote: Available on phase workflows and will demote to the previous phase.
  • Cancel: Available on any workflow and will cause the workflow to complete.

WzpUserTask

The following custom actions are available on any workflow implementing a user_task:

  • Approve: Approves the user task.
  • Reject: Rejects the user task.
  • Skip: Skips the user task.
  • Forward (string nameType, string nameCode): Creates a new user task for the contact with (name_type and name_code).
  • Reschedule (DateTime dueDate): Changes the user task due date to the specified due date.

Usage of oData custom actions

Usage in C# using the Scanjour.Process.Odata.Client

Given an entity of a WzpWorkflowInstance the actions can be issued from C# code in the following way:

string id = 3301;

WzpWorkflowInstance instance = (from i in ctx.WzpWorkflowInstances where i.ID == id select i).Single()

if (ctx.IsActionAvailable(instance, "Promote") ctx.ExecuteAction(instance, "Promote", null);

Usage in JavaScript

Read more about the usage of OData actions here:

http://msdn.microsoft.com/en-us/library/hh859851(v=vs.103).aspx