Data Table Block and workflow execution APIs: an example

Modified on Fri, 24 Jul 2020 at 06:01 PM

We can combine the Workflow execution API with the data editing functionality provided by the Data table block. In this section we will explore how to create an Omniscope project where the report allows the user to visualise, edit and publish the data to an external system, all within the report app. 

There are two powerful functionalities that the report end user is able to utilise here:

1) manually make data edits in the report

2) trigger a workflow execution from the report (here this execution will result in edited data replacing the source data in the database.)


You can find more information about the workflow execution APIs here: https://help.visokio.com/support/solutions/articles/42000073133-workflow-execution-rest-apis .


Here is a simple example: the Data table block is loaded with the records coming from a database table, and it is connected to the Report block and a Database publisher block. The goal is to be able to explore and edit the data using the report app and being able to publish the table back to a database table (either the same table as the source, or a different table), all without leaving the report app. 


       


In the report we added the Workflow Execution custom view from the community developed custom views, and configured it so as to execute the Database output block (without refreshing from source):


       



The data can be edited in the Table view (via a double click on a cell):


       

It is possible to check the process is working as intended by pinning the report (pin button from the 3 dot menu inside the Report), and clicking on the Publish Data button, to view the data flowing between the blocks:



N.B. It is important to disable refresh from source, otherwise the data inside the data table block will be overwritten with the data coming from upstream (Database input block in this example), discarding any edits.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article