Put this operation definition in a plugin descriptor: <operation name="InvokeMethod" <parameters> <c:simple-property name="methodName" type="string" /> <c:list-property name="parameters" required="false"> <c:map-property name="parameter"> <c:simple-property name="name" type="string" /> <c:simple-property name="value" type="string" /> </c:map-property> </c:list-property> </parameters> <results> <c:simple-property name="results" type="longString"/> </results> </operation> Now try to immediately schedule that operation. The screen renders OK, but I cannot add any parameters. I hit the "add" button in the map rendering, but it doesn't do anything. I submit the operation anyway and I get a failure, a non-descript NPE in the stack trace. org.rhq.core.clientapi.agent.PluginContainerException: Failed to submit invocation request. resource=[500051], operation=[InvokeRestMethod], jobId=[rhq-resource-500051-1435506829-1213254974555_=_rhq-resource-500051_=_1213254975416] at org.rhq.core.pc.operation.OperationManager.invokeOperation(OperationManager.java:149) at org.rhq.core.pc.operation.OperationManager.invokeOperation(OperationManager.java:108) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.rhq.enterprise.communications.command.impl.remotepojo.server.RemotePojoInvocationCommandService.execute(RemotePojoInvocationCommandService.java:184) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.sun.jmx.mbeanserver.StandardMetaDataImpl.invoke(StandardMetaDataImpl.java:414) at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784) at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:201) at $Proxy1.execute(Unknown Source) at org.rhq.enterprise.communications.command.server.CommandProcessor.handleIncomingInvocationRequest(CommandProcessor.java:335) at org.rhq.enterprise.communications.command.server.CommandProcessor.invoke(CommandProcessor.java:230) at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:734) at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:560) at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:369) at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:165) Caused by: java.lang.NullPointerException: [Warning] null ... 23 more
mazz, do any existing operations have a definition like this, or is this only for a custom plugin you're writing now?
i think i'm the first to try this. I don't know of any other plugins that (try to) do this.
This would come in handy for example to define environment variables of a script to execute by the operation. This particular scenario can be worked around by putting the env vars in the plugin/resource configuration of the resource in question, but that seems a little bit ugly to me.
on the other hand, defining the list of env vars for the script in the plugin/resource config has the advantage of not having to define them every time the operation is run.
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-574
This should no longer be an issue in coregui.
List of maps is supported for Config editor and Group Config editor. Tested at http://localhost:7080/coregui/#Test/Configuration/ConfigEditor
Bulk closing of old issues that are in VERIFIED state.