Activiti-OSGi and custom FormType
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2013 10:01 AM
Hello everyone,
I am trying to convert my kinda monolitic Activiti-application to an OSGI-based one.
In my process definition I use a custom formtype for URLs.
When trying to deploy the bundle/process I get an exception, that Activiti doesn't know about the formtype "url".
This makes sense to me, because when using the StandaloneProcessEngineConfiguration I had to register my formtype like this:
And that's my question: is there a way to tell the ConfigurationFactory, ProcessEngineFactory, ProcessEngineConfiguration, BluePrintELResolver or anyone else about my formtype, so that the Engine will find it during deployment?
I am trying to convert my kinda monolitic Activiti-application to an OSGI-based one.
In my process definition I use a custom formtype for URLs.
When trying to deploy the bundle/process I get an exception, that Activiti doesn't know about the formtype "url".
This makes sense to me, because when using the StandaloneProcessEngineConfiguration I had to register my formtype like this:
<bean id="processEngineConfiguration"[…] <property name="customFormTypes"> <bean class="de.data.experts.activiti.transfer.UrlFormType"/> </property> </bean>
And that's my question: is there a way to tell the ConfigurationFactory, ProcessEngineFactory, ProcessEngineConfiguration, BluePrintELResolver or anyone else about my formtype, so that the Engine will find it during deployment?
Labels:
- Labels:
-
Archive
4 REPLIES 4
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2013 01:35 AM
Well, I was hoping for some more responses.
In the meantime I tried subclassing ConfigurationFactory and some other things but nothing worked.
Maybe that's a sign that ConfigurationFactory could be improved to support custom formtypes.
In the meantime I tried subclassing ConfigurationFactory and some other things but nothing worked.
Maybe that's a sign that ConfigurationFactory could be improved to support custom formtypes.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2013 08:26 AM
The ConfigurationFactory exposes a StandaloneProcessEngineConfiguration… Use that to call setCustomFormTypes BEFORE the process-engine has been initialized, or call getFormTypes.add() AFTER the process-engine has been initialized to get the custom types picked up…
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2013 01:43 AM
Thank you for your answer Frederik.
I suppose adding formtypes before the initialization of the process-engine won't work with blueprint, because my blueprint-wrapper-bundle gets started before my process-bundle.
I tried to add my custom formtype after creation with a bundle activator and it worked, you can see the code here: https://gist.github.com/anonymous/6137726
I know I gotta change the thing with Thread.sleep() but I am happy so far, that it's working.
Maybe I'll find a way to make it more blueprint-like and put the lookup into a content.xml.
I suppose adding formtypes before the initialization of the process-engine won't work with blueprint, because my blueprint-wrapper-bundle gets started before my process-bundle.
I tried to add my custom formtype after creation with a bundle activator and it worked, you can see the code here: https://gist.github.com/anonymous/6137726
I know I gotta change the thing with Thread.sleep() but I am happy so far, that it's working.
Maybe I'll find a way to make it more blueprint-like and put the lookup into a content.xml.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2013 03:49 AM
Glad to see it working. Feel free to share a better/cleaner approach.
