I have a plugin with a task which create a java object, which I want to display on the build result. I managed to write to the database using Bandana in my task, but when I run the build, it does not work since the dataprovider is executed before the task writes to the database. How can I tell the dataProvider to wait for a task to finish ?
1 Like
Rather than using a DataProvider could you use a rest api and fetch the data, sure polling is not great but it could work.
I added a condition to not display the webpanel if database is empty, and it just worked.
/**
* Determine whether the web fragment should be displayed
*
* @param context The optional map of parameters specified in XML.
* @return true if the user should see the fragment, false otherwise
*/
@Override
public boolean shouldDisplay(Map<String, Object> context) {
return bm.getValue(CTX, "key") != null;
}
1 Like