Bug 1226953

Summary: [GSS] (6.1.z) Task Text in Business process are not correctly exported when using PNG and PDF formats
Product: [Retired] JBoss BPMS Platform 6 Reporter: William Antônio <wsiqueir>
Component: jBPM DesignerAssignee: Tihomir Surdilovic <tsurdilo>
Status: CLOSED NEXTRELEASE QA Contact: Kirill Gaevskii <kgaevski>
Severity: medium Docs Contact:
Priority: high    
Version: 6.1.0CC: ajuricic, alazarot, kgaevski, kverlaen, mbaluch, rrajasek, tsurdilo, wsiqueir
Target Milestone: CR1   
Target Release: 6.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1216247 Environment:
Last Closed: 2015-11-09 20:28:36 UTC 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:
Bug Depends On: 1216247    
Bug Blocks: 1230825    
Attachments:
Description Flags
sampleProcess
none
samplePdf none

Comment 1 William Antônio 2015-06-01 14:05:14 UTC
+++ This bug was initially created as a clone of Bug #1216247 +++

Description of problem:

When we create a process in Process Designer, the texts are correctly displayed. If we export it to PDF or PNG, the text position is incorrectly shown.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Create a process using the business central app;
2. Add a task to it and double click on it to add some text;
3. Export the process as PNG or PDF.

Actual results:

The text position is wrong, it is displaced and shown outside of the task rectangle;

Expected results:
The text image position should be correct.

Additional info:

Please find attached a sample PNG/PDF and a screenshot of the actual process.

Comment 3 Amana 2015-06-09 19:24:00 UTC
*** Bug 1229853 has been marked as a duplicate of this bug. ***

Comment 5 Tihomir Surdilovic 2015-06-30 01:14:44 UTC
The name of Task nodes could not be split into multiple lines. That got fixed as part of BZ 1233981.
Long node names are wrapped around as a ingle line of text in the available space of the task node. The Task type icon on top-left of the node controls the left margin which gets shifted when the text inside the node is very long.

I am working on auto-resizing the node width/height according to the text entered as the name of the node however this will take some time to resolve. 

There are several workarounds for this issue as well:

1. User increases the node with/height manually to accommodate the text with some left/right margins allowed
2. Reduce the text font size. There is a "font size" property on tasks which allows users to reduce the font size. This will make the text smaller allowing longer text to be entered without problem.
NEEDINFO: the best workaround for now would be to set the default font size to 4 sizes smaller than the current default. Please let me know if this is a reasonable option at this point in time
3. User attaches a text annotation to the task allowing them to add longer description of what the task for example does in addition to the name it has.

Comment 6 Alessandro Lazarotti 2015-06-30 17:54:07 UTC
Tiho, as talked with Kris it should be acceptable for now if the font is automatically changed during the export to fit the node size.

Could that be achieved ?

With an auto fit please the ability of adding line breaks to a task name, the fix becomes acceptable for the scope of this patch update. Customer can play with it and if necessary suggest changes to a next release.

Comment 7 Tihomir Surdilovic 2015-06-30 20:21:59 UTC
When exporting process to png/pdf all text in the process will be reduced to a smaller size to be accommodated into their nodes. 
This is done only during export of png/pdf and will not affect any other user interactions with the process.

6.2.x commit: https://github.com/droolsjbpm/jbpm-designer/commit/d3f517500

Comment 8 Kirill Gaevskii 2015-07-13 11:32:38 UTC
(In reply to Alessandro Lazarotti from comment #6)
> Tiho, as talked with Kris it should be acceptable for now if the font is
> automatically changed during the export to fit the node size.
> 
> Could that be achieved ?
> 
> With an auto fit please the ability of adding line breaks to a task name,
> the fix becomes acceptable for the scope of this patch update. Customer can
> play with it and if necessary suggest changes to a next release.

(In reply to Tihomir Surdilovic from comment #7)
> When exporting process to png/pdf all text in the process will be reduced to
> a smaller size to be accommodated into their nodes. 
> This is done only during export of png/pdf and will not affect any other
> user interactions with the process.
> 
> 6.2.x commit: https://github.com/droolsjbpm/jbpm-designer/commit/d3f517500

Good enough as a hot fix. Verified.

Comment 9 William Antônio 2015-07-14 23:11:24 UTC
Hello,

I would like to tell you about a workaround being used by our customer which is use svg:

* Open the SVG source of a process;
* Copy it to an empty file as a text and save as a .svg extension;
* Open it with some image viewer and the process should be correctly displayed.

Comment 10 Amana 2015-08-25 13:32:57 UTC

Hi all,

Customer is still facing the same issue even after applying the Update 2. I also performed some tests and can see the same. I am attaching a PDF and *.bpmn2 process for further tests.

Thanks!

Comment 11 Amana 2015-08-25 13:34:33 UTC
Created attachment 1066874 [details]
sampleProcess

Comment 12 Amana 2015-08-25 13:35:16 UTC
Created attachment 1066876 [details]
samplePdf

Comment 13 Tihomir Surdilovic 2015-08-26 16:10:43 UTC
Could you please give me more info on this ? After importing the test BPMN2 I do see the alignment problem which is due to the task icon in its top-left corner (dont think we can get around this). However the text is maintained within the boundaries of the task (not going out).   

http://i.imgur.com/lVuVv3n.png

Looking at the provided bpmn2 they did not resize the task nodes (default 80x100) so it seems there is something else going on (would it be possible that the patch was not applied correctly?)


Any info is much appreciated.

Comment 14 William Antônio 2015-08-27 18:18:14 UTC
Hello,

I was having this problem as well, but I noticed that after cleaning the cache completely it works exactly as pointed by Tihomir.

So, everyone please make a test after cleaning the cache. If we try with 6.1 and then with 6.1.2, it will not work, so we will have to clean the cache again.

Comment 15 Amana 2015-08-27 18:25:17 UTC
Yes... I had the same behavior as William described in Comment#14... asking to customer to re-test it.

Thanks all!