Go to the page with services and klick "refresh"

for Repository

http://www.localhost:8080/alfresco/service/index

for Share

http://www.localhost:8080/share/service/index

 

1. add user Task in yout bpmn-xml-file:

<userTask id="myTask" name="My Task" activiti:formKey="myappwf:myTask">
            <extensionElements>
                <activiti:taskListener event="create" delegateExpression="${CreateMyTaskListener}" />
            </extensionElements>
</userTask>

2. add CreateMyTaskListener bean to the workflow-context.xml file

<bean id="createMyTaskListener"
        class="de.lustin.alfresco.workflow.CreateMyTaskListener"
        parent="activitiCreateTaskListener">
    </bean>

<bean id="createMyTaskListener.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>CreateMyTaskListener</value>
                <ref bean="createMyTaskListener" />
            </list>
        </property>
</bean>

3. Create a Java class

import org.alfresco.repo.workflow.activiti.tasklistener.TaskCreateListener;

public class CreateMyTaskListener extends TaskCreateListener {

    @Override
    public void notify(DelegateTask delegateTask) {

...

1. add service Task in yout bpmn-xml-file:

<serviceTask id="java_execution" name="Java Execution" activiti:delegateExpression="${JavaExecutionDelegate}" />

2. add JavaExecutionDelegate bean to the workflow-context.xml file

<bean id="JavaExecutionDelegate"
        class="de.lustin.alfresco.workflow.JavaExecutionDelegate"
        parent="baseJavaDelegate">
</bean>

3. Create a Java class

import org.alfresco.repo.workflow.activiti.BaseJavaDelegate;

public class JavaExecutionDelegate extends BaseJavaDelegate {

    @Override
    public void execute(DelegateExecution execution) throws Exception {

...

To deploy changed activiti workflow diagramm, you don`t need to restart server.

1. Got to the activiti workflow console: http://localhost:8080/alfresco/activiti-admin

2. Deployments -> deploy new

Disabling quick share and social link

add to alfresco-global.properties (tested with Version 5.0.1 but it should work already with version 4.2.193)

system.quickshare.enabled=false