cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieving property data from workflow package

srobinson
Champ in-the-making
Champ in-the-making
I am using Alfresco Community 4.2.d and I have a workflow where I use a service task to initially setup users and process variables.  I have a need to get property information from the document that is stored in the workflow package. My question is how do I do this through my service task class?  I see how I can use the WorkflowService to get the workflow package contents, but that method requires a taskId and I am having difficulty getting access to the current service task id  through the DelegateExecution object that my service task has access to.

Any help on this is greatly appreciated.

Thanks,

- Shannon
5 REPLIES 5

mitpatoliya
Star Collaborator
Star Collaborator
that is depend on in which class and at which stage you are trying to retrieve your document?

It is at the second step in the workflow and it is a service task.  My service task implements JavaDelegate as the activiticlass.  There are no listeners associated with this service task.

- Shannon

mstein
Champ in-the-making
Champ in-the-making
The package is stored as an execution variable. Try doing a execution.getVariable for bpm_package. That is the system folder and your document is a child of that.

I can post some code if requested.

Max

shadow4110
Champ in-the-making
Champ in-the-making
hello mstein,
i have NodeRef of bpm_package. but i cant access the children of this system folder…

kaynezhang
World-Class Innovator
World-Class Innovator
get workflow package attached items

List<ChildAssociationRef> assocs = nodeService.getChildAssocs(workflowPackage);
                for (ChildAssociationRef assoc : assocs)
                {
                    NodeRef nodeRef = assoc.getChildRef()
                }