We are developing company ERP system and using Camunda BPM as a process engine.
One of the main features of our system is the creation of the tasks in the company task tracker. We’re not using User Tasks and the Tasklist provided by Camunda Webapps. Instead of it, we implemented the integration with company’s task tracker system. Currently, we use ServiceTask as an activity type for such tasks.
Our current need is to provide the process engineer the convenient way to configure the form which assignee of the task should fill. The configuration of forms in User Tasks is exactly what we need, but I couldn’t find an ability to add this tab for Service Tasks.
So, I have some questions:
Is there a way to extend Service Task editing UI and add the “Forms” tab?
If #1 is no, can we process user task in the same way as service tasks? I mean, can we specify activity handler for User Tasks?
Is there a way to use the User Task without Task List? So, Camunda should not create new tasks in the task list, we want to implement the full logic of User Task processing using our custom Java code. Or User Task is designed to work with Task List only?
Currently, we implement the workflow we need using Service Task with Java handler specified as camunda:delegateExpression. Our custom activity handler does the following things:
Creates a new Redmine issue on activity executions
Leaves the execution when the issue in Redmine system resolved
All the properties are configured as input parameters (using element templates)
Currently, I tend to decide to keep our current implementation with Service Tasks and configure the fields that Redmine user should fill in the taks using the “Extensions” tab and just want to make sure that my assumption that User Task is closely related to Task List is valid.
(As the result, Redmine will show the form with three inputs: employeeId, redmineUserId, photoUrl. Redmine user should fill these fields before ticket resolving).
I’ve studied the source code deeper. It seems that there is no way to fully replace TaskList as the creation of Task in TaskList is made outside of TaskService and cannot be overridden. There is UserTaskActivityBehavior class which call TaskEntity.createAndInsert static method. UserTaskActivityBehavior instance itself is not injected too and created within BpmnParse.parseUserTask method.
@Override
public void performExecution(ActivityExecution execution) throws Exception {
TaskEntity task = TaskEntity.createAndInsert(execution);
taskDecorator.decorate(task, execution);
Context.getCommandContext()
.getHistoricTaskInstanceManager()
.createHistoricTask(task);
// All properties set, now firing 'create' event
task.fireEvent(TaskListener.EVENTNAME_CREATE);
}
So, based on this information, we have the following option only: