How to implement Auto task in Alfresco for Activiti
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2012 11:40 PM
Hi guys,
I am using activiti to built a workflow and I need to create an automated task so as to access certain custom type model properties in Alfresco from the workflow. The task has to carry out a number of functions such as transforming a document and applying an md5 hash to the content. As such we would like to implement the task using a JAVA bean. And from the alfresco/activiti documentation, It is unclear how to do this. The two options seem to be:
Extend the BaseJavaDelegate class
Or
Implement the ActivityBehavior interface.
So can anyone shed some light on how to implement this for an Alfresco Activiti workflow.
Regards,
Kavi
I am using activiti to built a workflow and I need to create an automated task so as to access certain custom type model properties in Alfresco from the workflow. The task has to carry out a number of functions such as transforming a document and applying an md5 hash to the content. As such we would like to implement the task using a JAVA bean. And from the alfresco/activiti documentation, It is unclear how to do this. The two options seem to be:
Extend the BaseJavaDelegate class
Or
Implement the ActivityBehavior interface.
So can anyone shed some light on how to implement this for an Alfresco Activiti workflow.
Regards,
Kavi
Labels:
- Labels:
-
Archive
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2012 09:02 AM
Hi,
You could do it creating a service task:
In the workflow definition define the service task:
In the spring bean define the myTask bean as follows and add it to the activitiBeanRegistry:
The MyTaskDelegate has to extend the JavaDelegate class
More info in here
Adei
You could do it creating a service task:
In the workflow definition define the service task:
<serviceTask id="socialPublish" name="My task" activiti:delegateExpression="${myTask}"> <documentation>My task</documentation></serviceTask>
In the spring bean define the myTask bean as follows and add it to the activitiBeanRegistry:
<util:map id="activitiBeanRegistry" map-class="java.util.HashMap"> <entry key="services" value-ref="ServiceRegistry"/> <entry key="myTask" value-ref="myTask"/> </util:map> <bean id="myTask" class="org.alfresco.poc.wf.delegates.MyTaskDelegate"> <property name="…"> <ref bean="…" /> </property> </bean>
The MyTaskDelegate has to extend the JavaDelegate class
More info in here
Adei
