cancel
Showing results for 
Search instead for 
Did you mean: 

Moved file disappears from the resources package ? [SOLVED]

abcbien
Champ in-the-making
Champ in-the-making
Hi,

I wrote a java action (extending JBPMSpringActionHandler) that creates somes folders and move the file referenced in the bpm_package in one of those new folders. The task runs fine, the file is moved (I checked it with the explorer) but in the next task of the workflow, I don't see anymore a file in the 'resource' section of the GUI presenting the next workflow task (it's written  'No resources found').

However, when, in the next task, I list the childs of the process variable bpm_package, I still can see the file and its path is the new one. Smiley Surprised
So why don't we see it anymore in the resource section (using the Alfresco Explorer interface) ?

I'd like the file to stay availlable in the GUI, even if we move it in java.

Some code:
The way I find the file in java:

JBPMNode bpm_package = (JBPMNode) executionContext.getContextInstance().getVariable("bpm_package");
NodeRef pkg = bpm_package.getNodeRef();
List<ChildAssociationRef> childs = nodeService.getChildAssocs(pkg);
NodeRef fileInWorkflowNodeRef = null;
for (ChildAssociationRef child : childs) {
    fileInWorkflowNodeRef = child.getChildRef();

I create some folders, and move the 'fileInWorkflowNodeRef' to the new folders.


I really hope someone could help me,
Thanks,
Alain.
1 REPLY 1

abcbien
Champ in-the-making
Champ in-the-making
The assignee for the task doesn't have access rights to the file in the package. Thats why he could not see it !
Why didn't I think to it earlier ?!  :roll:

Maybe this experience will help others.

Alain