[MAGNOLIA-1152] [wf] uploaded document in one workflow step not available in following one. Created: 17/Oct/06  Updated: 04/Nov/15  Resolved: 04/Nov/15

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Chris Miner Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

Steps to reproduce
1. create a work flow with two steps
2. add an image upload control to the default workflow dialog
3. launch the flow
4. double click on the new item in the inbox
5. upload an image
6. save the dialog
7. proceed the item
8. wait for the item to appear in the inbox again
9. double click on the item. Notice that the dialog gives the impression of having a file. (the remove file button is displayed)

Dump the Store workspace for your workflow and notice that the image field contains something like "java.io.ByteArrayInputStream@47c5543b". The same procedure with a file upload control shows "java.io.FileInputStream@1e88579c" as a value for the field.



 Comments   
Comment by Chris Miner [ 17/Oct/06 ]

Looking into this I found that the WorkItem handed to MgnlParticipant in consume(WorkItem) contains the bad value.

Comment by Chris Miner [ 19/Oct/06 ]

Looking into this further, I find that the root of the problem is in openwfe.org.engine.workitem.AttributeUtils.java2owfe utils. Decoding the attributes of a work item (JCR -> OWFE) creates a StringMapAttribute instance. The put() method of MapAttribute runs the property value (a ByteArrayInputStream) through AttributeUtils.java2owfe(value), which turns the ByteArrayInputStream into a openwfe.org.engine.workitem.StringAttrribute with the help of ByteArrayInputStream's toString() method.

Comment by Chris Miner [ 19/Oct/06 ]

There is also a problem on getting the workitem back into Magolia. Encoding of a Base64Attribute doesn't work. On the owfe side we have attomic attribute types of Base64, Boolean, Double, Integer, Long, String, and XML. On the JCR side we have String, binary, long, double, date, boolean, name, path, and reference. Looks like there should be a problem with dates as well.

Comment by Chris Miner [ 20/Oct/06 ]

OWFE only recently supports binary fields in its JcrBeanEncoder. See http://sourceforge.net/support/tracker.php?aid=1558424. Now that it does, there is additional work to do on the Magnolia side so that binary fields are correctly (en/de)coded. If I figure it out, I'll provide a patch.

Comment by Michael Mühlebach [ 04/Nov/15 ]

Given the thousands of other issues we have open that are more highly requested, we won't be able to address this issue in the foreseeable future. Instead we will focus on issues with a higher impact, and more votes.
Thanks for taking the time to raise this issue. As you are no doubt aware this issue has been on our backlog for some time now with very little movement.
I'm going to close this to set expectations so the issue doesn't stay open for years with few updates. If the issue is still relevant please feel free to reopen it or create a new issue.

Generated at Mon Feb 12 03:24:10 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.