Custom Workflow Java Class
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2014 08:04 AM
Hey,
we need to customize tasks list view so that tasks for every user are visible for everyone. First, I thought I could use webscript to fetch all the active tasks and return them but then I noticed there is no that kind of method that would return tasks of every user. So only solution seems to be to implement the feature using Java. My plan was to extend Workflow class and add a new method that returns the needed tasks. However, I'm quite clueless how to deploy/extend the changes to my local Alfresco server. Could anyone help me where to start? It seems not many ppl have created extensions using Java and I wanted to avoid it as well but this time it seems to be the only choice. Of course all suggestions/tips are welcome how to implement the described feature. Maybe there is an easier way. If I come with a solution I will explain it here in case someone needs the information. Any help would be greatly appreciated.
Thanks in advance,
Henri L
we need to customize tasks list view so that tasks for every user are visible for everyone. First, I thought I could use webscript to fetch all the active tasks and return them but then I noticed there is no that kind of method that would return tasks of every user. So only solution seems to be to implement the feature using Java. My plan was to extend Workflow class and add a new method that returns the needed tasks. However, I'm quite clueless how to deploy/extend the changes to my local Alfresco server. Could anyone help me where to start? It seems not many ppl have created extensions using Java and I wanted to avoid it as well but this time it seems to be the only choice. Of course all suggestions/tips are welcome how to implement the described feature. Maybe there is an easier way. If I come with a solution I will explain it here in case someone needs the information. Any help would be greatly appreciated.
Thanks in advance,
Henri L
Labels:
- Labels:
-
Archive
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2014 02:45 AM
Hey,
I built the Alfresco project using Maven. I added a custom class (CustomWorkflow that extends Workflow) to alfresco-repository module. I've then deployed the newly built alfresco.war to my Alfresco server. Then I added a dependency to alfresco-4.2.e/tomcat/shared/classes/alfresco/extension/custom-template-services-context.xml like this:
But when I start the server I get an class not found error. For some reason Alfresco doesn't find the class even though it should be included in alfresco.war. What I'm doing wrong?
I built the Alfresco project using Maven. I added a custom class (CustomWorkflow that extends Workflow) to alfresco-repository module. I've then deployed the newly built alfresco.war to my Alfresco server. Then I added a dependency to alfresco-4.2.e/tomcat/shared/classes/alfresco/extension/custom-template-services-context.xml like this:
<beans> <bean id="workflowTemplateExtension" parent="baseTemplateImplementation" class="org.alfresco.repo.template.CustomWorkflow"> <property name="extensionName"> <value>workflow</value> </property> <property name="serviceRegistry"> <ref bean="ServiceRegistry"/> </property> </bean></beans>
But when I start the server I get an class not found error. For some reason Alfresco doesn't find the class even though it should be included in alfresco.war. What I'm doing wrong?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2014 12:18 AM
You will need to create your own class and than inject the services which you want to use in that class.
In your example the class attributes value should be replaced with your own custom class.
<c>
<beans>
<bean id="workflowTemplateExtension" parent="baseTemplateImplementation" class="org.alfresco.repo.template.CustomWorkflow">
<property name="extensionName">
<value>workflow</value>
</property>
<property name="serviceRegistry">
<ref bean="ServiceRegistry"/>
</property>
</bean>
</beans>
</c>
Krutik Jayswal
Alfresco Developer
http://krutikjayswal-alfresco.blogspot.in
In your example the class attributes value should be replaced with your own custom class.
<c>
<beans>
<bean id="workflowTemplateExtension" parent="baseTemplateImplementation" class="org.alfresco.repo.template.CustomWorkflow">
<property name="extensionName">
<value>workflow</value>
</property>
<property name="serviceRegistry">
<ref bean="ServiceRegistry"/>
</property>
</bean>
</beans>
</c>
Krutik Jayswal
Alfresco Developer
http://krutikjayswal-alfresco.blogspot.in
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2014 07:15 AM
Refer these links to create workflow in alfresco :
http://docs.alfresco.com/3.4/tasks/kb-code-workflow.html
http://alfrescosolutionsv.blogspot.in/2013/07/creating-custom-workflow-in-alfresco.html
http://docs.alfresco.com/3.4/tasks/kb-code-workflow.html
http://alfrescosolutionsv.blogspot.in/2013/07/creating-custom-workflow-in-alfresco.html
