I declared a custom task "MyTask" based on the standard BPMN2 ScriptTask. I managed to modify its appearance by implementing some methods in my feature container, but I am not able to change its name at creation time. In my case, I would like to name it "MyTask 1" instead of "Script Task 1".
Is it possible to customize the name of the newly created custom task ?
finally I override the add() method of my AddFeature to modify the name generated during the creation of the business object. In the create() method of my CreateFeature, I put a property in the context before calling AbstractCreateFlowElementFeature.create(). Then I retrieve this property in the add() method of my AddFeature to know if the object is being created or simply added. I don't know if there is a better solution but it seems to work.