I am working on data list action a plugin that runs a process when clicked. In  order to do that I would like the user to specify which process must be run but I need some clarification on how to use plugin JSON properties to get a dropdown listing all of the available processes.

I see from the Run Process menu option that its JSON properties look something like this.


        name : 'processDefId',

        label : '@@userview.runprocess.process@@',

        type : 'selectbox',

        required : 'True',

        options_ajax : '[CONTEXT_PATH]/web/json/app/%s/%s/plugin/org.joget.apps.userview.lib.RunProcess/service?action=getOptions'


However when I use this exact AJAX options URL the dropdown displays nothing. Could it be that I need to set the [CONTEXT_PATH] (whatever that is) in my plugin? And do the two parameters (%s) get inserted automatically?

Any help would be appreciated.

  • No labels

1 Comment

  1. Ok I figured it out. You need to add the application params when loading JSON properties in the plugin class.

    public String getPropertyOptions() { AppDefinition appDef = AppUtil.getCurrentAppDefinition();
            String appId = appDef.getId();
            String appVersion = appDef.getVersion().toString();
            Object[] arguments = new Object[] {appId, appVersion};
            String json = AppUtil.readPluginResource(getClass().getName(), "/properties/startProcessDataListAction.json", arguments, true);
            return json;