Real-time reporting on multiple BPM datasources in Visual Composer
Recently, with imminent release, we came across a requirement where end user wanted to know processes with particular task subject. Though we have all the Reporting on standard and custom data sources in BW, accommodating it there via custom datasource at last moment would have triggered newer version of Reporting datasource and thereby triggering changes in BW side as well (Uncertain if this limitation - of getting new version created- is fixed in 7.31, we are working on 7.2 SP 5 at the moment). Also, we were not able to find “Subject” field in “BPM_TASKS_DS” which can be pulled in BW (It’s available in “BPM_MY_TASK_DS” which cannot be pulled in BW though), leaving us behind with only option of Visual Composer.
However, showing the processes with particular tasks name/subject requires JOIN operation on the 2 (BPM_MY_TASK_DS and BPM_MY_PROCESS_DS) datasources and whatever searches we did, said that JOIN is not supported in Visual Composer(Would be great to know if there is any alternate way). Nonetheless, with the mandate of fulfilling the requirement we somehow did it using concept of “Entry List”. Though this doesn’t let us go deep down in process’ attributes, we can identify the process names against particular tasks. Thankfully, that was sufficient for the requirement.
Security role required
For having a reporting view on these datasources, you can display data if your user is assigned to the SAP_BPM_SuperDisplay or SAP_BPM_SuperAdmin roles.
(Because, for BPM_MY_PROCESSES_DS, your user needs to be assigned to a role which gives you access to the particular process instance, e.g. Business Process Administratorrole and for BPM_MY_TASKS_DS, your user needs to be assigned to a role which gives you access to the particular task instance, for example Potential Owner, Actual Owner, Business Administrator, and so on.)
: Taking a simple process example – Scheduler Process - having 3 tasks viz. Sales Approval, Finance Approval and HR Approval, we will try to fetch the list of processes having “Finance Approval” task in it.
Create a new Service Component in VC using datasource “BPM_MY_PROCESSES_DS” with simple “In” and “Out” Port. Choose appropriate fields, here we selected ID, Parent_ID, Status, Subject and Description. Save.
Create New Model -> Composite view with datasource “BPM_MY_TASKS_DS” and “In” and “Out” Port. Select appropriate fields, here we selected ID, Parent_ID, Status and Subject.
Create a just a “Start” event to start the model and select a “filter” from Out port.
Define filter operator to filter on tasks with “Subject” containing “Finance” (Right click on Filter -> Define Operator)
Create a “Table View” from a filter.
Go To Layout-> Change the Control type of “Parent Id” field to “DropDown List”( Parent Id specifies the process ID the task is part of)
Create a Dynamic “Entry list” on “Parent ID” field. (right click -> Entry List)
On next screen, choose “Visual Composer components” in provider and search for the service component we created in Step 1.
Skip “Configure Input” and proceed to “Configure Output”. Select “Id” in Value which specifies the process Id in service component (represented here as Parent_Id). Choose “Subject” in Display text which will show the Process Subject of particular tasks.
Make the “Parent_Id” field or perhaps the whole table as Read Only, adjust column’s properties of table as required. Save, Deploy and Run the model.
Export" option can be selected in VC for giving way to export the list to Excel file.
I am not an expert in Visual Composer, hence any views from experts are most welcome to do this in simpler way Or some better way to have reporting on multiple datasources.