@@ -71,6 +71,14 @@ This project provides a JavaScript client API into the Alfresco REST API and Act
7171 + [ Get Process Instances] ( #get-process-instances )
7272 * [ Models Api] ( #models-api )
7373 + [ Get Model] ( #get-model )
74+ * [ Report Api] ( #report-api )
75+ + [ Create Default reports] ( #create-default-reports )
76+ + [ Get Reports] ( #get-reports )
77+ + [ Report Params] ( #report-params )
78+ + [ Report Process Definitions] ( #report-process-definitions )
79+ + [ Tasks of process definition] ( #tasks-of-process-definition )
80+ + [ Generate reports] ( #generate-reports )
81+ + [ Update report details] ( #update-report-details )
7482- [ Development] ( #development )
7583- [ Release History] ( #release-history )
7684
@@ -910,6 +918,146 @@ this.alfrescoJsApi.activiti.modelsApi.getModels(opts).then(function (data) {
910918 });
911919```
912920
921+ ## Report Api
922+
923+ Below you can find some example relative to the Activiti report api for all the possible method go to [ Report Api documentation] ( /src/alfresco-activiti-rest-api/docs/ReportApi.md )
924+
925+ ### Create default Reports
926+
927+ createDefaultReports()
928+
929+ > Create the default reports
930+
931+ ####Parameters
932+
933+ No parameters required.
934+
935+ ####Example
936+
937+ ``` javascript
938+
939+ this .alfrescoJsApi .activiti .reportApi .createDefaultReports ();
940+ ```
941+
942+ ### Get Reports
943+
944+ getReportList()
945+
946+ > Retrieve the available report list
947+
948+ ####Parameters
949+
950+ No parameters required.
951+
952+ ####Example
953+
954+ ``` javascript
955+
956+ this .alfrescoJsApi .activiti .reportApi .getReportList ();
957+ ```
958+
959+ ### Report Params
960+
961+ getReportParams(reportId)
962+
963+ > Retrieve the parameters referring to the reportId.
964+
965+ ####Parameters
966+
967+ Name | Type | Description | Notes
968+ ------------- | ------------- | ------------- | -------------
969+ ** reportId** | ** String** | reportId |
970+
971+ ####Example
972+
973+ ``` javascript
974+
975+ var reportId = " 1" ; // String | reportId
976+
977+ this .alfrescoJsApi .activiti .reportApi .getReportParams (reportId);
978+ ```
979+
980+ ## Report Process Definitions
981+
982+ getProcessDefinitions()
983+
984+ > Retrieve the process definition list for all the apps.
985+
986+ ####Parameters
987+
988+ No parameters required.
989+
990+ ####Example
991+
992+ ``` javascript
993+
994+ this .alfrescoJsApi .activiti .reportApi .getProcessDefinitions ();
995+ ```
996+
997+ ## Tasks of process definition
998+
999+ getTasksByProcessDefinitionId(reportId, processDefinitionId)
1000+
1001+ > Retrieves all tasks that refer to the processDefinitionId
1002+
1003+ ####Parameters
1004+ Name | Type | Description | Notes
1005+ ------------- | ------------- | ------------- | -------------
1006+ ** reportId** | ** String** | reportId |
1007+ ** processDefinitionId** | ** String** | process definition id |
1008+
1009+ ####Example
1010+
1011+ ``` javascript
1012+
1013+ var reportId = " 1" ; // String | reportId
1014+ var processDefinitionId = " 1" ; // String | processDefinitionId
1015+
1016+ this .alfrescoJsApi .activiti .reportApi .getTasksByProcessDefinitionId (reportId, processDefinitionId);
1017+ ```
1018+
1019+ ## Generate reports
1020+
1021+ getReportsByParams(reportId, paramsQuery)
1022+
1023+ > Generate the reports based on the input parameters
1024+
1025+ ####Parameters
1026+ Name | Type | Description | Notes
1027+ ------------- | ------------- | ------------- | -------------
1028+ ** reportId** | ** String** | reportId |
1029+ ** paramsQuery** | ** Object** | Query parameters |
1030+
1031+ ####Example
1032+
1033+ ``` javascript
1034+
1035+ var reportId = " 1" ; // String | reportId
1036+ var paramsQuery = {status: ' ALL' }; // Object | paramsQuery
1037+
1038+ this .alfrescoJsApi .activiti .reportApi .getReportsByParams (reportId, paramsQuery);
1039+ ```
1040+ ## Update report details
1041+
1042+ updateReport(reportId, name)
1043+
1044+ > Update the report details
1045+
1046+ ####Parameters
1047+ Name | Type | Description | Notes
1048+ ------------- | ------------- | ------------- | -------------
1049+ ** reportId** | ** String** | reportId |
1050+ ** name** | ** String** | The report name |
1051+
1052+ ####Example
1053+
1054+ ``` javascript
1055+
1056+ var reportId = " 1" ; // String | reportId
1057+ var name = " new Fake name" ; // String | reportId
1058+
1059+ this .alfrescoJsApi .activiti .reportApi .updateReport (reportId, name);
1060+ ```
9131061
9141062# Development
9151063
0 commit comments