cancel
Showing results for 
Search instead for 
Did you mean: 

get property owner

giorgio
Champ in-the-making
Champ in-the-making
What is the correct syntax to capture the value of the property cmSmiley Surprisedwner is the owner of the workflow, in order to assign a property of a file from the review_pooled_definition.xml, put an example in which I capture the name of the group and assigns it.

<task-node name="rejected">

        <transition name="" to="end" />
            <event type="node-enter">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
for (var z = 0; z &lt; bpm_package.children.length; z++)
{
bpm_package.children[z].properties["my:expert"] = bpm_groupAssignee.properties["usr:authorityName"];

bpm_package.children[z].save();
}
</script>
</action>
</event>
    </task-node>


What I want to know is how you would do this same thing for the property owner to take possession of the workflow and do it again when the workflow finishes.

I hope someone can help me because I have not found anything like this example. Thanks and regards.
10 REPLIES 10

giorgio
Champ in-the-making
Champ in-the-making
Hi, I tried to capture the event with this code but has not had any effect. I could get it to steer? might be some event "taking possession"? rather than task-asiggned?

<event type="task-assign">

                        <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">

                                     <script>

                        bpm_package.children[0].properties["my:tecnico"]=  bpm_package.properties["cmSmiley Surprisedwner"];

                          </script>

                         </action>

            </event>