ApprovalPlugin Api

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

The ApprovalPlugin use cases

Table of contents

  1. Settings
    1. AutoApprovalHistory
    2. GetUserNamesByIds
    3. NameParameterForComment
  2. Actions
    1. FillApprovalHistory
    2. GetApprovalHistory
    3. GetInbox
    4. GetOutbox
  3. Elements
    1. Get parameter type
    2. Paging

Settings

AutoApprovalHistory

Table of contents

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

Table of contents

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

Table of contents

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

Table of contents

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

Table of contents

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

Table of contents

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

Table of contents

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

Table of contents

Value Description
IdentityId Get the records with the specified IdentityId
ProcessId Get the records with the specified ProcessId

Paging

Table of contents

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

Top