NEED TO ATTACH 3 FILES TO MY HUMAN TASK, DOCUMENTREVIEW TUTORIAL SHOWS 1 DO
583123Jun 18 2007 — edited Nov 4 2007The DocumentReview Tutorial shows how to attach 1 document to the Human Task.But my requirement is that, I need to attach 3 documents to my Human Task.
For the 1st attachment, it works fine :-
task:attachment[1]/task:content
But the problem is with the below code for the 2nd and the 3rd attachment :-
task:attachment[2]/task:content
task:attachment[3]/task:content
Please suggest a problem solution for the same.
### Steps to Reproduce ###
I specified the below code in my .bpel file :-
<assign>
<copy>
<from>
<attachment xmlns="http://xmlns.oracle.com/bpel/workflow/task">
<name/>
<URI/>
<content/>
</attachment>
</from>
<to variable="initiateTaskInput" part="payload"
query="/taskservice:initiateTask/task:task/task:attachment"/>
</copy>
<copy>
<from expression="concat(string(bpws:getVariableData('inputVariable','payload','/ns1:E
mployeeDetailsRequest/ns1:EmployeeNumber')), ' Attachment 1')"/>
<to variable="initiateTaskInput" part="payload"
query="/taskservice:initiateTask/task:task/task:attachment[1]/task:name"/>
</copy>
<copy>
<from expression="ora:readFile(bpws:getVariableData('inputVariable','payload','/ns1:Em
ployeeDetailsRequest/ns1:Attachment_1'))"/>
<to variable="initiateTaskInput" part="payload"
query="/taskservice:initiateTask/task:task/task:attachment[1]/task:content"/>
</copy>
<copy>
<from expression="concat(string(bpws:getVariableData('inputVariable','payload','/ns1:E
mployeeDetailsRequest/ns1:EmployeeNumber')), ' Attachment 2')"/>
<to variable="initiateTaskInput" part="payload"
query="/taskservice:initiateTask/task:task/task:attachment[2]/task:name"/>
</copy>
<copy>
<from expression="ora:readFile(bpws:getVariableData('inputVariable','payload','/ns1:Em
ployeeDetailsRequest/ns1:Attachment_2'))"/>
<to variable="initiateTaskInput" part="payload"
query="/taskservice:initiateTask/task:task/task:attachment[2]/task:content"/>
</copy>
<copy>
<from expression="concat(string(bpws:getVariableData('inputVariable','payload','/ns1:E
mployeeDetailsRequest/ns1:EmployeeNumber')), ' Attachment 3')"/>
<to variable="initiateTaskInput" part="payload"
query="/taskservice:initiateTask/task:task/task:attachment[3]/task:name"/>
</copy>
<copy>
<from expression="ora:readFile(bpws:getVariableData('inputVariable','payload','/ns1:Em
ployeeDetailsRequest/ns1:Attachment_3'))"/>
<to variable="initiateTaskInput" part="payload"
query="/taskservice:initiateTask/task:task/task:attachment[3]/task:content"/>
</copy>
</assign>
The 1st task attachment worked fine :-
task:attachment[1]/task:content
But the BPEL Process Manager gives the below exception at Runtime for the 2nd task attachment's <copy> <to> statement
(task:attachment[2]/task:content) :-
<selectionFailure xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/">
<part name="summary">
<summary>
XPath query string returns zero node.
According to BPEL4WS spec 1.1 section 14.3, The assign activity <to> part query should not return zero node.
Please check the BPEL source at line number "152" and verify the <to> part xpath
query.
</summary>
</part>
</selectionFailure>
Please suggest the exact syntax, to specify the task attachment for the 2nd and the 3rd attachments.