Possible to add a form in Admin console?

Curious to know if it is possible to modify/create a form in the Admin Panel.

(Purpose: Need to be able to add new users created from Camunda admin to some tables in my application along with some other form fields.)

Hi,

in general you can extend the webapps with plugins to add such functionality. You can find more information about plugins in the Cockpit documentation: https://docs.camunda.org/manual/7.5/webapps/cockpit/extend/plugins/

Admin does not have many plugin points, but maybe you can build something on top of the existing one: https://docs.camunda.org/manual/7.5/webapps/admin/extend/plugins/

Does this help you?

Cheers
Sebastian

Hi,

Sorry for late reply, had been working on something else.

In this case, I would like to know if something like embedded task forms can be added to the admin page for creating users.

Thanks,
Manpriya

Hi Manpriya,

embedded task forms are always related to a specific process instance and display the form for a user task. If you have a process for creating users with an usertask, then the tasklist with the embedded forms would be the correct place for that.

If you just want to have a customizable form to add a user and maybe do some automation like permission assignment without having a BPM process behind it, then you can do that with a plugin.

Does this answer your question?

Cheers
Sebastian

Okay… thanks.
I will check if the plugins solve my purpose.

I’ve tried to build a simple form for the admin console.

The examples for the Cockpit work fine. So I have tried to convert a cockpit plugin to an admin plugin doing the following:

  • Base class for my plugin changed to AbstractAdminPlugin
  • Cusom queries removed from example

The Rest service is working now.

For the GUI form I ended with the following file structure:

├───src
│   ├───main
│   │   ├───java
│   │   │   └───de
│   │   │       └───digipen
│   │   │           └───camunda
│   │   │               └───CockpitPluginFromArchetype
│   │   │                   │   AdminPlugin.java
│   │   │                   ├───db
│   │   │                   │       ProcessInstanceCountDto.java
│   │   │                   └───resources
│   │   │                           CockpitPluginRootResource.java
│   │   │                           ProcessInstanceResource.java
│   │   └───resources
│   │       ├───META-INF
│   │       │   └───services
│   │       │           org.camunda.bpm.admin.plugin.spi.AdminPlugin
│   │       └───plugin-webapp
│   │           └───adminPlugin
│   │               │   info.txt
│   │               └───app
│   │                       dashboard.html
│   │                       plugin.css
│   │                       plugin.js

But after building with maven and deploying the plugin the admin panel fails on load with the following Errors:

GET http://localhost:8080/camunda/api/admin/plugin/adminPlugin/static/app/plugin.css RESPONSE 500

16-Mar-2017 19:24:08.044 WARNING [http-nio-8080-exec-27] null.null org.camunda.bpm.engine.rest.exception.RestException: It was not able to load the following file 'app/plugin.js'.
	at org.camunda.bpm.webapp.plugin.resource.AbstractAppPluginRootResource.getAsset(AbstractAppPluginRootResource.java:142)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:167)
	at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:257)
	at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222)
	at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:211)
	at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:542)
	at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:524)
	at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:126)
	at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
	at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
	at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.camunda.bpm.engine.rest.filter.CacheControlFilter.doFilter(CacheControlFilter.java:41)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.camunda.bpm.webapp.impl.security.filter.SecurityFilter.doFilterSecure(SecurityFilter.java:67)
	at org.camunda.bpm.webapp.impl.security.filter.SecurityFilter.doFilter(SecurityFilter.java:51)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.camunda.bpm.webapp.impl.security.auth.AuthenticationFilter$1.execute(AuthenticationFilter.java:59)
	at org.camunda.bpm.webapp.impl.security.auth.AuthenticationFilter$1.execute(AuthenticationFilter.java:56)
	at org.camunda.bpm.webapp.impl.security.SecurityActions.runWithAuthentications(SecurityActions.java:38)
	at org.camunda.bpm.webapp.impl.security.auth.AuthenticationFilter.doFilter(AuthenticationFilter.java:56)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:617)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1527)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1484)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745)


16-Mar-2017 19:24:48.688 WARNING [http-nio-8080-exec-29] null.null org.camunda.bpm.engine.rest.exception.RestException: It was not able to load the following file 'app/plugin.css'.
	at org.camunda.bpm.webapp.plugin.resource.AbstractAppPluginRootResource.getAsset(AbstractAppPluginRootResource.java:142)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:167)
	...

Has anybody got a HelloWorld admin form to work, can provide an example project, an archetype or can give an advice how to do it?