How to create new custom task

Hello all,

I am new in the flowable world so my question may look trivial, but anyway.
I need to add a custom task to the palette which basically an HttpTask with some already predefined values. I have added a new group and a new stencil to the stencilset_bpmn.json and all looks fine. But how I should specify what process it has to run? And where to add new logic for the task? Or where to define a list of properties available to a user in UI editor of the process?

It would be great to have something like step-by-step guide about how to add a new custom step with custom logic. Is such a guide exists?

Hi Alex,

I was planning to make such a guide. :slight_smile: You can check Java Service Task in Designer / Modeler

Regards
Martin

Thank you for your reply! I saw the thread you’ve mentioned. It helped a lot! Thanks!

But I’ve stuck on adding custom functionality to the backend and custom properties for the task to the UI. If you will finish your guide then please let me know :slight_smile: This would be a really life-saving tutorial.

I may need to clarify the question (it is possible that such a question may be simpler to answer or comment/give idea or example).

There is the HTTP Task in the palette. When a user uses this task - he needs to set a lot of Attributes/properties (Request Method / Request URL / Request body/ etc.).

And the question is:

Is it possible to create a copy of the “HTTP Task” and put it to palette (with a custom name, for example “My Predefined HTTP Task”) and once a user uses this task - it works really the same as HTTP Task (because, for example, it is just a copy or something inherited from HTTP Task, or just a reference to the original HTTP Task or anything else) but have some or all attributes/properties being predefined (specific method is selected by default, specific URL is set by default, etc)?

If it is possible - what is the current way to do so?

It would be very helpful if it is possible to show us any descriptions, source code examples or anything else of what can shed the light to such a question.

Check out this thread: How to extend Flowable to add "Business Domain" specific BPMN elements

This post: How to extend Flowable to add "Business Domain" specific BPMN elements lists what I did to implement a custom task.

Edit:
This pull request https://github.com/flowable/flowable-engine/pull/373/files added the http task to flowable and can serve as an example (although it is a bit complex and you will need much less code).

1 Like

Thank you! We will try these as well!