Skip to main content

Approval Plugin API

ApprovalPlugin API

The Plugin implements functions for handling the Approval history of your document and the Inbox/Outbox.

The ApprovalPlugin use cases.

Settings​

AutoApprovalHistory​

Boolean: The flag for automated storage of the approval history.

true - the FillApprovalHistory will be added automatically to the activities using buildstep and become unavailable from the designer. false - the FillApprovalHistory will be available from the designer as a usual Action.

Default value: true

Used for FillApprovalHistory.

GetUserNamesByIds​

A delegate, your function should return the users with the specified id from the list. Without subscription for the delegate, the value is taken from the processInstance.IdentityIds.

Action syntax:

List<string> GetMyUserNamesByIds(List<string> idS)
{
// Return the name of each user from the list of id.

// Example:
var names = new List<string>();
foreach (var id in idS)
{
string name = myUsers[id].Name;
names.Add(name);
}

return names;
}

Used for FillApprovalHistory.

NameParameterForComment​

String: The name of the parameter to get the comment for updating the record.

Default value: Comment

Used for FillApprovalHistory.

Actions​

Read about actions.

FillApprovalHistory​

Records and updates the approval stages for the approval history.

If the AutoApprovalHistory parameter in the setting is set to true - this action is added automatically to the activities using buildstep. if set to false - the action is not available.

GetApprovalHistory​

Gets the records from the approval history.

Parameters:

Get parameter type: GetParameterType *

Sets the filter to get the records: ProcessId or IdentityId.

Get parameter value: String *

ProcessId or IdentityId for selecting the records, depending on GetParameterType.

Parameter purpose: ParameterPurpose *

ParameterPurpose defined the behavior for saving the parameter.

Default value: Temporary

Parameter name : String *

The name of the parameter to save the obtained records.

PageIndex : Int32

Page numbering starts from 1. Sets the current page number for paging.

Default value: -1

If the specified value < 1 - the paging won't be reset.

PageSize : Int32

Sets the number of records per page for paging.

Default value: -1

If the specified value < 1 - the paging won't be reset.

GetInbox​

Gets the records from inbox.

Parameters:

Get parameter type: GetParameterType *

Sets the filter to get the records: ProcessId or IdentityId.

Get parameter value: String *

ProcessId or IdentityId for selecting the records, depending on GetParameterType.

Parameter purpose: ParameterPurpose *

ParameterPurpose defines the behavior for saving the parameter.

Default value: Temporary

Parameter name : String *

The name of the parameter to save the obtained records.

PageIndex : Int32

Page numbering starts from 1. Sets the current page number for paging.

Default value: -1

If the specified value < 1 - the paging won't be reset.

PageSize : Int32

Sets the number of records per page for paging.

Default value: -1

If the specified value < 1 - the paging won't be reset.

GetOutbox​

Gets the records from outbox.

Parameters:

Get parameter type : GetParameterType *

Sets the filter to get the records: ProcessId or IdentityId.

Get parameter value : String *

ProcessId or IdentityId for selecting the records, depending on GetParameterType.

Parameter purpose : ParameterPurpose *

ParameterPurpose defines the behavior for saving the parameter.

Default value: Temporary

Parameter name : String *

The name of the parameter to save the obtained records.

PageIndex : Int32

Page numbering starts from 1. Sets the current page number for paging.

Default value: -1

If the specified value < 1 - the paging won't be reset.

PageSize : Int32

Sets the number of records per page for paging.

Default value: -1

If the specified value < 1 - the paging won't be reset.

Elements​

Get parameter type​

ValueDescription
IdentityIdGet the records with the specified IdentityId.
ProcessIdGet the records with the specified ProcessId.

Paging​

Splits the data into pages for getting them in parts in order to optimize performance.

Parameters

PageIndex : Int32

Page numbering starts from 1. Sets the current page number to split the data into pages.

Page numbering starts from 1.

PageSize : Int32

Sets the number of records per page to split the data into pages.

SkipCount : Int32

Calculated automatically. Sets the number of records to be skipped; calculated as: (PageIndex - 1) * PageSize