AnsweredAssumed Answered

access to the model

Question asked by anusk on May 10, 2010
Latest reply on May 19, 2010 by sethatrothbury
I'm having troubles implementing advanced workflows. I did a workflow which directly assign
the task "review" to a predefined group, and I would like  when the screen "Workflow options"
appears , it shows the name of the group that handle the task.
The problem is I can’t achieve that, Alfresco always read the script after that screen, and the text field is empty.
I tried with the “task-create” and “task-start” events, but with the same result, so is there any way to access the model.xml from the processdefinition.xml before the screen of workflows options shows up?

And another question, is possible to set the swimlane “initiator” to be the owner of a document, and if other person goes to the “Start Workflow Advanced” in that document Alfresco won’t give the possibility of choosing that workflow? How can I achieve that behavior?

Here is my code
<type name="ag:submit_workflow_task">
            <property name="ag:name_group_reviewer">
            <property name="bpm:packageItemActionGroup">

<start-state name="start">
   <event type="node-enter">
         <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
            <variable name="ag_name_group_reviwer" access="read,write" />
            logger.log("node event fired"); 
            ag_name_group_reviwer = "Approvers";
            logger.log("Grupo: "+ag_name_group_reviwer);  
      <task name="ag:submit_workflow_task" swimlane="initiator"></task>
      <transition name="" to="review"></transition>

Thanks in advanced!