cancel
Showing results for 
Search instead for 
Did you mean: 

Activiti editor/modeller

simonpl
Champ in-the-making
Champ in-the-making
I am analyzing activiti engine for few weeks now and it seems to fit to my application. I would also like to deliver nice module that allows desiging processes. In explorer application there is one however I am not able to import it into my project. Is there a way to extract editor/modeller part from explorer application so it could be resued?
4 REPLIES 4

frederikherema1
Star Contributor
Star Contributor
The modeler app can be used standalone. It's based on the orxy-opensource components, with some activiti stencil sets and custom saving into engine Model-tables. The storage of the models is abstracted and can be done using a normal file-system or a database, for example.

Previously, the modeler was a separate WAR-file, so it may help if you check out the git-history for earlier versions (I think 5.10) to see how this was configured. The modeler itself is pure javascirpt, so can be extract easily. It's only the configuration of the actuals "storage" after saving that needs some extra attention…

simonpl
Champ in-the-making
Champ in-the-making
Ok, I've tried to invastigate how the connection between vaadin aplication and modeler works - as far as I understand it there are few filters(activated in ExplorerRestApplication) which handle the process of exchanging information. To test if I am able to extract modeler from explorer aplication I created new project with:
- all the js files;
- similar configuration in web.xml(ExplorerFilter and ExplorerRestApplication);
- needed libraries;
When it starts ProcessEngine is activated and simple model uploaded and then link:
http://localhost:8180/TestEditor/service/editor?id=[modelID] is called. Unfortunately it does not work - the problem is that only first servlet is called:

INFO: RestletServlet: [Restlet] Attaching application: org.activiti.explorer.rest.application.ExplorerRestApplication@5abca2e8 to URI: /TestEditor/service
kwi 30, 2013 4:36:58 PM org.restlet.engine.log.LogFilter afterHandle
INFO: 2013-04-30 16:36:58 0:0:0:0:0:0:0:1 - 0:0:0:0:0:0:0:1 8180 GET /TestEditor/service/editor id=1 200 - 0 39 http://localhost:8180 Mozilla/5.0 (Windows NT 6.1; WOW64; rv:20.0) Gecko/20100101 Firefox/20.0 -
kwi 30, 2013 4:36:58 PM com.vaadin.server.DefaultDeploymentConfiguration checkProductionMode

and it stops. I'm not sure why since it all looks the same to me. I'd be grateful for any hints.
You have written that "storage of the models is abstracted and can be done using a normal file-system or a database" - how it can be configured? Which part of modeler is responsible for that?

trademak
Star Contributor
Star Contributor
Did you also include editor.html, stencilset.json and plugins.xml files for example?

Best regards,

simonpl
Champ in-the-making
Champ in-the-making
Ok, I've found cause of my problem - I'm using Vaadin 7 and in my web.xml I've set two servlet mappings for my application servlet:
       
        <servlet-mapping>
  <servlet-name>Testeditor Application</servlet-name>
  <url-pattern>/*</url-pattern>
</servlet-mapping>

<servlet-mapping>
  <servlet-name>Testeditor Application</servlet-name>
  <url-pattern>/VAADIN/*</url-pattern>
</servlet-mapping>
I also have there UIFilter and RestletServlet taken from explorer application. Unfortunately with this configuration I was getting error message from Vaadin: Failed to load the bootstrap javascript: ./../VAADIN/vaadinBootstrap.js when trying to enter http://localhost:8180/TestEditor . With address http://localhost:8180/TestEditor/ui/ application was starting however modeler still was not working. Finally changing <url-pattern>/*</url-pattern> to <url-pattern>/ui/*</url-pattern> in mappings allowed me to run modeler. I guess this simple trick cannot be treated as solution (default address http://localhost:8180/TestEditor/ cannot be used) however it helps for now.
If there's anyone who knows how to set correct configuration or enchance UIFilter behavior to fix this issue I would be grateful for posting it here.