cancel
Showing results for 
Search instead for 
Did you mean: 

Bug with 5.11.1 Designer Custom Service Task?

ryanberg1
Champ in-the-making
Champ in-the-making
Hello,

It appears that in 5.11.1 (possibly 5.11.*) there is a bug where the activiti:class attribute is not set on custom service tasks.

For example, when dropping a custom service task from the palatte, the only attributes set are:

<serviceTask id="servicetask1" name="Test Concat" activiti:extensionId="com.foo.extensions.test.TestConcatTask"></serviceTask>

where the appropriate attributes should be:

<serviceTask id="servicetask1" name="Test Concat" activiti:extensionId="com.foo.extensions.test.TestConcatTask" activiti:class="com.foo.tasks.test.TestConcatTask"></serviceTask>

for this extension code:

package com.foo.extensions.test;

import org.activiti.designer.integration.servicetask.AbstractCustomServiceTask;
import org.activiti.designer.integration.servicetask.PropertyType;
import org.activiti.designer.integration.servicetask.annotation.Help;
import org.activiti.designer.integration.servicetask.annotation.Property;
import org.activiti.designer.integration.servicetask.annotation.Runtime;

@Runtime(delegationClass = "com.foo.extensions.test.TestConcatTask")
public class TestConcatTask extends AbstractCustomServiceTask
{
    @Property(type = PropertyType.TEXT, displayName = "Arg 1", required = true, order = 1)
    @SuppressWarnings("unused")
    private String arg1;
   
    @Property(type = PropertyType.TEXT, displayName = "Arg 2", required = true, order = 2)
    @SuppressWarnings("unused")
    private String arg2;

    /**
     * Returns the name of this Custom Service Task.
     *
     * @return The name of this Custom Service Task.
     */
    @Override
    public String getName() {
        return "Test Concat";
    }

    /**
     * Returns the name of the Palette Drawer in Activiti Designer
     *
     * @return The name of the Palette Drawer in Activiti Designer
     */
    @Override
    public String contributeToPaletteDrawer() {
        return "TEST";
    }

    @Override
    public String getSmallIconPath() {
        return "icons/coins.png";
    }
}

To make it work, the activiti:class attribute must be manually added to the XML, but is subsequently obliterated after any saves using the graphical designer.

Thank you.
-Ryan
5 REPLIES 5

trademak
Star Contributor
Star Contributor
Hi Ryan,

Thanks for raising this issue. It's now fixed on the Github master.

Best regards,

jjfutt
Champ in-the-making
Champ in-the-making
This bug seems to be present in version 5.12 of Activiti Designer. Please advise?

jjfutt
Champ in-the-making
Champ in-the-making
Unfortunately, I upgraded to 5.12 and ran into this issue – is there a way to install the OLDER version of the plugin. I think I had 5.10 before the upgrade.

jjfutt
Champ in-the-making
Champ in-the-making
Never mind – i found another thread in this very forum indicating that Designer Extension process has been updated in 5.12. Following instructions on that now. Please disregard this report. thanks

Not applicable
Hi Ryan,
could you please post a ref to that thread?
Cheers