Welcome to the Alfresco Builder Network

Renders a list containing all the process instances matched by the parameters specified.

Contents

Basic Usage

app.component.html

<adf-process-instance-list
    [appId]="'1'"
    [state]="'all'">
</adf-process-instance-list>

Transclusions

Any content inside an <adf-empty-custom-content> sub-component will be shown when the process list is empty:

<adf-process-instance-list>
    <adf-empty-custom-content>
        Your Content
    </adf-empty-custom-content>
<adf-process-instance-list>

Class members

Properties

NameTypeDefault valueDescription
appIdnumberThe id of the app.
dataDataTableAdapterData source to define the datatable.
multiselectbooleanfalseToggles multiple row selection, which renders checkboxes at the beginning of each row
pagenumber0The page number of the processes to fetch.
presetColumnstringCustom preset column schema in JSON format.
processDefinitionIdstringThe Definition Id of the process.
processInstanceIdnumber | stringThe id of the process instance.
selectFirstRowbooleantrueToggles default selection of the first row
selectionModestring"single"Row selection mode. Can be none, single or multiple. For multiple mode, you can use Cmd (macOS) or Ctrl (Win) modifier key to toggle selection for multiple rows.
sizenumberThe number of processes to fetch in each page.
sortstringDefines the sort ordering of the list. Possible values are created-desc, created-asc, ended-desc, ended-asc.
statestringDefines the state of the processes. Possible values are running, completed and all

Events

NameTypeDescription
errorEventEmitter<any>Emitted when an error occurs while loading the list of process instances from the server.
rowClickEventEmitter<string>Emitted when a row in the process list is clicked.
successEventEmitter<ProcessListModel>Emitted when the list of process instances has been loaded successfully from the server.

Details

You can define a custom schema for the list in the app.config.json file and access it with the presetColumn property as shown below:

"adf-process-list": {
        "presets": {
            "customSchema": [
            {
                    "key": "name",
                    "type": "text",
                    "title": "name",
                    "sortable": true         
            }],
            "default": [
                {
                    "key": "name",
                    "type": "text",
                    "title": "name",
                    "sortable": true
            }],
        }
}
<adf-process-instance-list
    [appId]="'1'"
    [state]="'all'"
    [presetColumn]="'customSchema'">
</adf-process-instance-list>

You can also define the schema in the HTML using the Data column component. You can combine this with schema information defined in app.config.json as in the example below:

"adf-process-list": {
        "presets": {
            "customSchema": [
            {
                    "key": "id",
                    "type": "text",
                    "title": "Id",
                    "sortable": true
            }],
            "default": [
                {
                    "key": "name",
                    "type": "text",
                    "title": "name",
                    "sortable": true
            }],
        }
}
<adf-process-instance-list
    [appId]="'1'" 
    [presetColumn]="'customSchema'">
    <data-columns>
        <data-column key="key" title="title" class="full-width name-column">
            <ng-template let-entry="$implicit">
                    <div>{{entry.row.obj.assignee | fullName}}</div>
            </ng-template>
        </data-column>
    </data-columns>
</adf-process-instance-list>

Setting Sorting Order for the list

you can pass sorting order as shown in the example below:

// Possible values are : `created-desc`, `created-asc`, `ended-desc`, `ended-asc` |
let sortParam = 'created-desc'; 
<adf-process-instance-list
    [appId]="'1'"
    [sort]="sortParam">
</adf-process-instance-list>

Pagination strategy

The Process Instance List also supports pagination:

<adf-process-instance-list
    [appId]="'1'"
    [page]="page"
    [size]="size"
    #processList>
</adf-process-instance-list>
<adf-pagination
    *ngIf="processList"
    [target]="processList"
    [supportedPageSizes]="supportedPages"
    #processListPagination>
</adf-pagination>

See also

Interested in trying Alfresco?

Try Now