01-30-2024 12:21 PM
Hi! I need to create a task that requires to complete a doc, with a due date.
But that due date should be added to the calendar automatically.
Is there any way to do that?
Thanks!!
02-16-2024 03:40 PM
Hi! I finally found the solution:
I added this xml:
<bean id="my.activitiBeanRegistry" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean" depends-on="activitiBeanRegistry">
<property name="targetObject">
<ref bean="activitiBeanRegistry" />
</property>
<property name="targetMethod" value="put" />
<property name="arguments">
<list>
<value>workflowTaskListener</value>
<ref bean="workflowTaskListener" />
</list>
</property>
</bean>
<bean id="workflowTaskListener" class="com.someco.bpmn.WorkflowTaskListener" parent="activitiCreateTaskListener"/>
</beans>
Where WorkflowTaskListener is my new Listener.
Thanks all!
02-01-2024 06:49 AM
There is no default way to add this.
You need some customization to add calendar entry on workflow start.
02-06-2024 06:26 PM
Could you give me some example for add calendar event?
I've looking how to add an event listener in the workflow but I'm not sure if it has to be javascript or java code.
Thanks!
02-07-2024 05:27 AM
You need to use CalendarService to add entry.
You can use server side javascript code also.
Ref : https://stackoverflow.com/questions/64459998/alfresco-calendar-event-using-server-side-javascript
02-08-2024 12:27 PM
Hi! Now i'm trying to add a listener implemented with java, but I can't make it work.
If I put like this:
<userTask id="alfrescoUsertask1" name="Alfresco User Task" activiti:assignee="${initiator.properties.userName}" activiti:formKey="wf:activitiReviewTask"> <extensionElements> <activiti:taskListener event="create" delegateExpression="${workflowTaskListener}"/> </extensionElements> </userTask>
And I added @Component annotation to the WorkflowTaskListener class.
Also tried to define the bean in service-context.xml like this:
<bean id="workflowTaskListener" class="com.someco.bpmn.WorkflowTaskListener" />
so I have this error:
Caused by: org.activiti.engine.ActivitiException: Unknown property used in expression: ${workflowTaskListener} at org.activiti.engine.impl.el.JuelExpression.getValue(JuelExpression.java:53) at org.activiti.engine.impl.bpmn.listener.DelegateExpressionTaskListener.notify(DelegateExpressionTaskListener.java:44) at org.activiti.engine.impl.delegate.TaskListenerInvocation.invoke(TaskListenerInvocation.java:34) at org.activiti.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:37) at org.activiti.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocation(DefaultDelegateInterceptor.java:25) at org.activiti.engine.impl.persistence.entity.TaskEntity.fireEvent(TaskEntity.java:740) ... 243 more Caused by: org.activiti.engine.impl.javax.el.PropertyNotFoundException: Cannot resolve identifier 'workflowTaskListener' at org.activiti.engine.impl.juel.AstIdentifier.eval(AstIdentifier.java:83) at org.activiti.engine.impl.juel.AstEval.eval(AstEval.java:50) at org.activiti.engine.impl.juel.AstNode.getValue(AstNode.java:26) at org.activiti.engine.impl.juel.TreeValueExpression.getValue(TreeValueExpression.java:114) at org.activiti.engine.impl.delegate.ExpressionGetInvocation.invoke(ExpressionGetInvocation.java:33) at org.activiti.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:37) at org.activiti.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocation(DefaultDelegateInterceptor.java:25) at org.activiti.engine.impl.el.JuelExpression.getValue(JuelExpression.java:50) ... 248 more
And if I define the taskListener like this:
<userTask id="alfrescoUsertask1" name="Alfresco User Task" activiti:assignee="${initiator.properties.userName}" activiti:formKey="wf:activitiReviewTask">
<extensionElements>
<activiti:taskListener event="create" class="com.seco.bpmn.WorkFlowTaskListener"/>
</extensionElements>
</userTask>
It gives me an NullPointer error in the listener class because I want to autowire a Service:
public class WorkflowTaskListener implements TaskListener {
private static final Log logger = LogFactory.getLog(WorkflowTaskListener.class);
@Autowired
private CalendarService calendarService;
Aclaration: I'm working with project created with maven sdk alfresco.
Please help, I don't know what else to try.
Thanks!!
02-16-2024 03:40 PM
Hi! I finally found the solution:
I added this xml:
<bean id="my.activitiBeanRegistry" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean" depends-on="activitiBeanRegistry">
<property name="targetObject">
<ref bean="activitiBeanRegistry" />
</property>
<property name="targetMethod" value="put" />
<property name="arguments">
<list>
<value>workflowTaskListener</value>
<ref bean="workflowTaskListener" />
</list>
</property>
</bean>
<bean id="workflowTaskListener" class="com.someco.bpmn.WorkflowTaskListener" parent="activitiCreateTaskListener"/>
</beans>
Where WorkflowTaskListener is my new Listener.
Thanks all!
07-01-2024 07:50 PM
About showing due dates from Tasks in your calendar—I get why that's super handy. It's like having everything in one place, right?
07-03-2024 02:19 AM
Yes, that is possible to create a task that requires the doc with an automatically added due date on the calendar. Many professional or project management tools are free you can easily use them, To avoid and don't miss any deadlines when you create a task it will automatically appear in your calendar. Additionally, you can utilize online resources, for example, students using nursing assignment help to solve their educational encumbrances, same as you can create tasks easily and won't miss any due dates.
09-17-2024 11:00 AM
Absolutely agree with you!
Explore our Alfresco products with the links below. Use labels to filter content by product module.