cancel
Showing results for 
Search instead for 
Did you mean: 

Property to select a space

gvandyk
Champ in-the-making
Champ in-the-making
Hi All,

Is there a specific property that can be used to select a space in a workflow? "bpm:assignee" is such a case for selecting a user.

We need to select a space where the contents of the bpmSmiley Tongueackage needs to go after the selected user has approved the task. How do we achieve this?

Kind REgards
Gerrit
3 REPLIES 3

mabayona
Champ on-the-rise
Champ on-the-rise
You can use a JS action associated with the transition "approved" that can do whatever you want.

On how to do it. Have a look at:

http://wiki.alfresco.com/wiki/WorkflowAdministration

   <transition name="" to="approved">
      <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
        <script>
             ….. Put your JS here  
        </script>
      </action>
    </transition>

gvandyk
Champ in-the-making
Champ in-the-making
Hi mabayona

Thanks for your reply but..

We do not have a problem with the JS stuff. The problem we have is, where to move it to. The user needs to be able to select the space where the contents of the package needs to be moved to. If we hard code this, it works but it is essential that our user have the opportunity to select the required target space.

I just cannot believe that this has never been a requirement in Alfresco.

Can anyone suggest any pointers in getting this to work, or where we should start looking.

Gerrit.

mabayona
Champ on-the-rise
Champ on-the-rise
You can use a "constrain" for a variable to define the possible spaces where to move the contents of the bpm_package. This way, the user can select a space from a set of predefined (by the constrain definition) spaces.

If what you want is the possibility of having a field that allows you to navigate the hierarchy of available spaces or something similar, I think this is no possible in JS+custom types and you have to resort to using Java and extending a view.

You can also go down the web scripts path and create a new client.