Skip to content

Example: Bulk Approvals

Nolan Ehrstrom edited this page Feb 5, 2020 · 14 revisions

Here is an example of how to bulk approve a number of pending requests using a separate process.

At the time of writing, importing and exporting data sources is not supported. It must be manually added with the steps below.

  1. Install package-data-sources
  2. Generate a token for admin user
  3. Create a new data source. Set auth to 'bearer token' and set the token from above.
  4. Add a new list endpoint GET: http://pm.local.processmaker.com/api/1.0/tasks?&include=data&pmql=(request%20%3D%20%22Application%22)%20AND%20(task%20%3D%20%22Approval%22)%20AND%20(status%20%3D%20%22In%20Progress%22)
    • Replace http://pm.local.processmaker.com above with your PM4 server.
  5. Import these 2 processes from the below zip file. Leave all assignments to defaults:
  6. Edit the 'Bulk Approval' process.
  7. Add a 'data connector' node between 'start event' and 'bulk approve form'
  8. In the Configuration, set the Data Connector to the one you created above
  9. In Data Mapping, set a Form Data key 'tasks' with a value 'data'

To run the example:

  1. Start a new 'Application' request.
  2. Open the task. Fill out the text and submit.
  3. Do not complete the next 'Approval' task. Leave it in a 'In Progress' state.
  4. Do this for a few more applications.
  5. Start a new 'Bulk Approvals' process and open the task.
  6. From here, you should see all 'In Progress' applications with the ability to bulk approve or deny them.
Clone this wiki locally