02-27-2008 09:21 AM
02-28-2008 04:25 AM
02-28-2008 10:11 AM
<swimlane name="initiator"/>
<!–Definition du processus–>
<start-state name="start">
<task name="scwf:submitReviewTask" swimlane="initiator"/>
<transition name="submit" to="Submit">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<!– Ajout de l'aspect versionable au document concerne –>
<script>
var test = bpm_package;
var doc = test.children[0];
doc.addAspect("cm:versionable");
doc.save();
</script>
<script>
<variable name="groupe" access="read,write" />
<expression>groupe = people.getGroup("GROUP_Service GRH");</expression>
</script>
</action>
<action>
<script>
var nomInitiator = userhome.properties.name;
var user = people.getPerson(nomInitiator);
var group = people.getContainerGroups(user);
var chefGroup = null;
var nbr = group.length;
if(group[0].properties.id == (people.getGroup("GROUP_Service informatique")).properties.id)
{
chefGroup = people.getGroup("GROUP_Chef informatique");
}
if(group[0].properties.id == (people.getGroup("GROUP_Service comptabilite")).properties.id)
{
chefGroup = people.getGroup("GROUP_chef comptabilite");
}
if(group[0].properties.id == (people.getGroup("GROUP_Secretaria")).properties.id)
{
chefGroup = people.getGroup("GROUP_chef secretaria");
}
<variable name="groupe" access="read,write" />
<expression>groupe = chefGroup;</expression>
</script>
</action>
</transition>
</start-state>
<node name="Submit">
<transition name="Assignee1 review" to="Assignee1 review"/>
</node>
<swimlane name="assignee1">
<assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
<pooledactors>#{groupe}</pooledactors>
</assignment>
</swimlane>
<task-node name="Assignee1 review">
<task name="scwf:assignee1Review" swimlane="assignee1"/>
<transition name="approve" to="Assignee2 review"/>
<transition name="reject" to="Revise"/>
</task-node>
02-29-2008 09:10 AM
<swimlane name="initiator"/>
<!–Definition du processus–>
<start-state name="start">
<task name="scwf:submitReviewTask" swimlane="initiator"/>
<transition name="submit" to="Submit">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<!– Ajout de l'aspect versionable au document concerne –>
<script>
var test = bpm_package;
var doc = test.children[0];
doc.addAspect("cm:versionable");
doc.save();
var nomInitiator = userhome.properties.name;
var user = people.getPerson(nomInitiator);
var group = people.getContainerGroups(user);
if(group[0].properties.name == (people.getGroup("GROUP_Service informatique")).properties.name)
{
executionContext.setVariable("scwf_chefGroup","GROUP_Chef informatique");
}
if(group[0].properties.name == (people.getGroup("GROUP_Service comptabilite")).properties.name)
{
executionContext.setVariable("scwf_chefGroup","GROUP_Chef(s) service comptabilite");
}
if(group[0].properties.name == (people.getGroup("GROUP_Secretaria")).properties.name)
{
executionContext.setVariable("scwf_chefGroup","GROUP_chef secretaria");
}
if(group[0].properties.name == (people.getGroup("GROUP_Service GRH")).properties.name)
{
executionContext.setVariable("scwf_chefGroup","GROUP_Chef(s) service GRH");
}
</script>
</action>
</transition>
</start-state>
<node name="Submit">
<transition name="Assignee1 review" to="Assignee1 review"/>
</node>
<swimlane name="assignee1">
<assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
<pooledactors>#{people.getGroup(scwf_chefGroup)}</pooledactors>
</assignment>
</swimlane>
<task-node name="Assignee1 review">
<task name="scwf:assignee1Review" swimlane="assignee1"/>
<transition name="approve" to="Assignee2 review"/>
<transition name="reject" to="Revise"/>
</task-node>
<type name="scwf:submitReviewTask">
<parent>bpm:startTask</parent>
<properties>
<property name="scwf:chefGroup">
<type>d:text</type>
<default>GROUP_Service GRH</default>
</property>
</properties>
</type>
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.