Bug 1008794

Summary: Taskform is searched with TaskName but without package name in business-central
Product: [JBoss] JBoss Enterprise BRMS Platform 5 Reporter: Toshiya Kobayashi <tkobayas>
Component: jBPM ConsoleAssignee: Kris Verlaenen <kverlaen>
Status: NEW --- QA Contact:
Severity: high Docs Contact:
Priority: unspecified    
Version: BRMS 5.3.1CC: agiertli
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
repository_export_duplicate_taskform_name.zip none

Description Toshiya Kobayashi 2013-09-17 05:38:21 UTC
Description of problem:

If you have 2 same name taskform FLTs which exist in differet packages, business-central may pick up a taskform FLT in a wrong package.

Because GuvnorConnectionUtils.getFormTemplateURLFromGuvnor()/templateExistsInRepo() iterates all packages in Guvnor and search taskform with just 'TaskName'.

Official docs tells:

https://access.redhat.com/site/documentation/en-US/JBoss_Enterprise_BRMS_Platform/5/html-single/BRMS_Business_Process_Management_Guide/index.html#Adding_New_Process_and_Task_Forms

> 8.7. Adding New Process and Task Forms
> 
> Task forms for a specific type of human task (uniquely identified by its task name) can be linked to that human task by creating a template with the name {taskName}.ftl.

So it's a designed behaviour but it doesn't sound nice to users. A better behaviour would be searching taskform with 'package name' + 'TaskName'.


Steps to Reproduce:
1. Import attached repository_export_duplicate_taskform_name.zip (It has 2 'TaskA-taskform.flt' which exist in 'pkg1' and 'pkg2')
2. Login business-central as john
3. Go to 'Process Overview' and start 'process2'
4. Go to 'Personal Tasks' and view the TaskA from pkg2.process2

Actual results:

The task form is one from pkg1. You will see in the taskform:

User Task Form: process1.TaskA 

Expected results:

The task form is one from pkg2. You will see in the taskform:

User Task Form: process2.TaskA

Comment 2 Toshiya Kobayashi 2013-09-17 05:47:49 UTC
Created attachment 798613 [details]
repository_export_duplicate_taskform_name.zip

Comment 3 Anton Giertli 2013-09-17 09:56:08 UTC
My idea of generated task form identifier is, that it would consist of following

[pkg-name]_[process-name]_[task-name].ftl

This would mean that there could be same task name in :
1) two different processes in two different packages
2) two different processes in same package

There would be conflict if there would be same task names defined in one process but this is not likely to happen and it is quite confusing design such process.