bpmnkiekogito

Add Custom Actors and Groups in Kogito User Task


I am trying to customize my own BPMN editor using the kie-tools repository bu kiegroup. I am able edit and modify various features and UI. But in case of User Tasks, i am unable to populate the Actors and Group list as per my required logic.

Is there any way we can do that. Manually adding to the list is possible.


Solution

  • depends on what are you trying to achieve.

    The main Actors/Groups code model for User task is here:

    And if you are looking to modify save/load it is on the marshaller parts:

    It should be enough for start, but if you need something more specific, please provide more information what are you trying to achieve.

    UPD: answer on the question below

    If you need to add some predefined values, you just need to know some basics high level overview of Stunner forms:

    For Actors and Groups there is a bit difference because they share the same Form element but the main idea is still the same. Forms code is located here. You can see widget package which actually a renderer and *SearchService which is provider. Finally AssigneeType inside of AssigneeEditorWidget used to distinguish actors from groups if needed.

    search method of AssigneeLocalSearchService is called by the Form element on load and populating predefined values it should be what are you looking for. Just add values to this collection (don't forget about AssigneeType to distinguish actors from groups) and it should be it.

    Let me know if you have any further questions, thank you!