cancel
Showing results for 
Search instead for 
Did you mean: 

Problème sur aspect optionnel dans un Workfl avancé [Résolu]

huberd
Champ in-the-making
Champ in-the-making
Bonjour,

j'ai défini dans mon workflow la possibilité de définir ou non une liste de relecteurs grâce à l'aspect suivant :

   <aspects>
      <aspect name="lwf:reviewAssignees">
         <associations>
            <association name="lwf:reviewAssignees">
               <source>
                  <mandatory>false</mandatory>
                  <many>false</many>
               </source>
               <target>
                  <class>cm:person</class>
                  <!–mandatory>true</mandatory–>
                  <mandatory>false</mandatory>
                  <many>true</many>
               </target>
            </association>
         </associations>
      </aspect>

En rendant la possibilité de renseigner cet aspect optionnel grâce à la ligne <mandatory>false</mandatory>, je cherche la méthode Java ou Javascript à integerer dans mon workflow qui me permettra de tester l'existance ou non de la variable lwf_reviewAssignees issue de l'aspect lwf:reviewAssignees. Suite à l'existance ou non de cette variable, je pourrai orienter mon workflow vers une étape de relecture ou directement vers l'approbation.

Pour info voici l'écran pricipal de choix de mon workflow.

   <config evaluator="node-type" condition="lwf:submitReviewAndApprovalTask" replace="true">
      <property-sheet>
         <separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />
         <show-property name="bpm:workflowDescription" component-generator="TextAreaGenerator" />
         <show-property name="bpm:workflowPriority" display-label-id="wf_review_priority" />
         <separator name="sep2" display-label-id="users_and_roles" component-generator="HeaderSeparatorGenerator" />
         <show-association name="lwf:reviewAssignees" display-label-id="lwf_reviewers" />
         <separator name="sep3" display-label-id="lwf_review_options" component-generator="HeaderSeparatorGenerator" />
         <show-property name="lwf:requiredReviewPercent" />
      </property-sheet>
   </config>

et voici la partie concernée de mon workflow

   <!–**************************–> 
   <!–**    <Start State>     **–>
   <!–**        start         **–>
   <!–**************************–> 
   <start-state name="start">
      <task name="lwf:submitReviewAndApprovalTask" swimlane="initiator" />
      <event type="node-leave">
         <action class="lpr.alfresco.repo.workflow.jbpm.WriteInfo">
            <type>Start State</type>
            <name>start</name>
            <disable>false</disable>
         </action>
        
         <!– Remove all currents Permissions –>
         <action class="lpr.alfresco.repo.workflow.jbpm.SetPermissions">
            <permission>remove</permission>
         </action>
          
         <!– … –>
                  
      </event>
      <transition name="" to="checkreview"/>
   </start-state>
  
  
   <!–**************************–>
   <!–**      <Decision>      **–>
   <!–**     checkreview      **–>
   <!–**************************–>
   <decision name="checkreview">
      <event type="node-enter">
        <action class="lpr.alfresco.repo.workflow.jbpm.WriteInfo">
            <type>Decision</type>
            <name>checkreview</name>
            <disable>false</disable>
         </action>
      </event>
      <transition name="" to="startreview">
             // ICI la condition qui permet de détécter que l'aspect lwf:reviewAssignees a bien été
             // renseigné ou que la variable lwf_reviewAssignees est non nul ou tout simplement
             // qu'elle existe.
      </transition>     
      <transition name="" to="startapproval"/>
   </decision>

Merci pour vote aide précieuse.
2 REPLIES 2

huberd
Champ in-the-making
Champ in-the-making
Lorsque je créé la condition suivante:

      <transition name="" to="startreview">
         <condition>#{lwf_reviewAssignees != null}</condition>
      </transition>     

dans le noeud de décision suivant :

   <!–**************************–>
   <!–**      <Decision>      **–>
   <!–**     checkreview      **–>
   <!–**************************–>
   <decision name="checkreview">
      <event type="node-enter">
        <action class="lpr.alfresco.repo.workflow.jbpm.WriteInfo">
            <type>Decision</type>
            <name>checkreview</name>
            <disable>false</disable>
        </action>
      </event>
      <transition name="" to="startreview">
         <condition>#{lwf_reviewAssignees != null}</condition>
      </transition>     
      <transition name="" to="startapproval"/>
   </decision>

Dans le cas où je ne choisis aucun relecteur, la condition suivante est tout de même évaluée et retourne vrai.

<condition>#{lwf_reviewAssignees != null}</condition>

ce qui fait passé le workflow à l'étape startreview alors qu'elle devrait passer directement à l'étape startapproval. Donc cela me génère le message d'erreur suivant, ce qui est normal vu que l'aspect lwf:reviewAssignees n'a pas été renseigné dans le workflow.

==> ******************************
==> *           <Node>           *
==> *         startreview        *
==> ******************************

lpr.alfresco.repo.workflow.jbpm.SetDocumentStatus (Start)
lpr.alfresco.repo.workflow.jbpm.SetDocumentStatus (End)

lpr.alfresco.repo.workflow.jbpm.MoveDocument (Start)
lpr.alfresco.repo.workflow.jbpm.MoveDocument (End)

lpr.alfresco.repo.workflow.jbpm.SetPermissions (Start)
09:54:08,456 DEBUG [repo.jscript.RhinoScriptProcessor] Imports resolved, adding resource '_root' content:
initiator
09:54:08,456 DEBUG [repo.jscript.RhinoScriptProcessor] Script content resolved to:
initiator
09:54:08,472 DEBUG [repo.jscript.RhinoScriptProcessor] Time to execute script: 16ms
AssignActor : DHuberso
lpr.alfresco.repo.workflow.jbpm.SetPermissions (End)

09:54:08,660 DEBUG [repo.jscript.RhinoScriptProcessor] Imports resolved, adding resource '_root' content:
lwf_reviewAssignees
09:54:08,660 DEBUG [repo.jscript.RhinoScriptProcessor] Script content resolved to:
lwf_reviewAssignees
09:54:08,675 DEBUG [repo.jscript.RhinoScriptProcessor] Time to execute script: 15ms
09:54:09,363 ERROR [ui.common.Utils] Une erreur système s'est produite pendant l'opération : Failed to signal transition 'null' from workflow task 'jbpm$1547'
org.alfresco.service.cmr.workflow.WorkflowException: Failed to signal transition 'null' from workflow task 'jbpm$1547'
   at org.alfresco.repo.workflow.jbpm.JBPMEngine.endTask(JBPMEngine.java:1536)
   at org.alfresco.repo.workflow.WorkflowServiceImpl.endTask(WorkflowServiceImpl.java:444)
   at sun.reflect.GeneratedMethodAccessor1203.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154)
   at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:40)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
   at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
   at org.alfresco.repo.audit.AuditComponentImpl.auditImpl(AuditComponentImpl.java:256)
   at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:191)
   at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
   at $Proxy43.endTask(Unknown Source)
   at org.alfresco.web.bean.workflow.StartWorkflowWizard.finishImpl(StartWorkflowWizard.java:197)
   at org.alfresco.web.bean.dialog.BaseDialogBean$1.execute(BaseDialogBean.java:118)
   at org.alfresco.web.bean.dialog.BaseDialogBean$1.execute(BaseDialogBean.java:115)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:225)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:155)
   at org.alfresco.web.bean.dialog.BaseDialogBean.finish(BaseDialogBean.java:124)
   at org.alfresco.web.bean.wizard.WizardManager.finish(WizardManager.java:520)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132)
   at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:61)
   at javax.faces.component.UICommand.broadcast(UICommand.java:109)
   at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
   at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:171)
   at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
   at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
   at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
   at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
   at org.alfresco.web.app.servlet.NTLMAuthenticationFilter.doFilter(NTLMAuthenticationFilter.java:329)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
   at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:834)
   at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:640)
   at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1286)
   at java.lang.Thread.run(Unknown Source)
Caused by: org.jbpm.graph.def.DelegationException: Failed to execute supplied script: Failed to execute supplied script: ReferenceError: "lwf_reviewAssignees" n'est pas défini (AlfrescoScript#1)
   at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:367)
   at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:358)
   at org.jbpm.graph.def.Node.execute(Node.java:343)
   at org.jbpm.graph.def.Node.enter(Node.java:318)
   at sun.reflect.GeneratedMethodAccessor1153.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:147)
   at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$498d4af7.enter(<generated>)
   at org.jbpm.graph.def.Transition.take(Transition.java:151)
   at org.jbpm.graph.def.Node.leave(Node.java:393)
   at org.jbpm.graph.exe.ExecutionContext.leaveNode(ExecutionContext.java:136)
   at org.jbpm.graph.node.Decision.execute(Decision.java:150)
   at org.jbpm.graph.def.Node.enter(Node.java:318)
   at sun.reflect.GeneratedMethodAccessor1153.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:147)
   at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$498d4af7.enter(<generated>)
   at org.jbpm.graph.def.Transition.take(Transition.java:151)
   at org.jbpm.graph.def.Node.leave(Node.java:393)
   at org.jbpm.graph.node.StartState.leave(StartState.java:70)
   at sun.reflect.GeneratedMethodAccessor1219.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:147)
   at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$498d4af7.leave(<generated>)
   at org.jbpm.graph.exe.Token.signal(Token.java:194)
   at org.jbpm.graph.exe.Token.signal(Token.java:139)
   at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:475)
   at org.alfresco.repo.workflow.jbpm.WorkflowTaskInstance.end(WorkflowTaskInstance.java:126)
   at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:389)
   at org.alfresco.repo.workflow.jbpm.JBPMEngine$25.doInJbpm(JBPMEngine.java:1512)
   at org.springmodules.workflow.jbpm31.JbpmTemplate$1.doInHibernate(JbpmTemplate.java:87)
   at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:367)
   at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:333)
   at org.springmodules.workflow.jbpm31.JbpmTemplate.execute(JbpmTemplate.java:80)
   at org.alfresco.repo.workflow.jbpm.JBPMEngine.endTask(JBPMEngine.java:1489)
   … 54 more
Caused by: org.alfresco.service.cmr.repository.ScriptException: Failed to execute supplied script: Failed to execute supplied script: ReferenceError: "lwf_reviewAssignees" n'est pas défini (AlfrescoScript#1)
   at org.alfresco.repo.processor.ScriptServiceImpl.executeScriptString(ScriptServiceImpl.java:282)
   at org.alfresco.repo.processor.ScriptServiceImpl.executeScriptString(ScriptServiceImpl.java:256)
   at sun.reflect.GeneratedMethodAccessor935.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154)
   at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:40)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
   at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
   at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:238)
   at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
   at $Proxy48.executeScriptString(Unknown Source)
   at org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript.executeScript(AlfrescoJavaScript.java:159)
   at org.alfresco.repo.workflow.jbpm.ForEachFork.execute(ForEachFork.java:92)
   at org.jbpm.graph.def.Action.execute(Action.java:122)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:147)
   at org.jbpm.graph.def.Action$$EnhancerByCGLIB$$c567862b.execute(<generated>)
   at org.jbpm.graph.def.Node.execute(Node.java:338)
   … 89 more
Caused by: org.alfresco.service.cmr.repository.ScriptException: Failed to execute supplied script: ReferenceError: "lwf_reviewAssignees" n'est pas défini (AlfrescoScript#1)
   at org.alfresco.repo.jscript.RhinoScriptProcessor.executeString(RhinoScriptProcessor.java:185)
   at org.alfresco.repo.processor.ScriptServiceImpl.executeScriptString(ScriptServiceImpl.java:278)
   … 117 more
Caused by: org.alfresco.error.AlfrescoRuntimeException: ReferenceError: "lwf_reviewAssignees" n'est pas défini (AlfrescoScript#1)
   at org.alfresco.repo.jscript.RhinoScriptProcessor.executeScriptImpl(RhinoScriptProcessor.java:518)
   at org.alfresco.repo.jscript.RhinoScriptProcessor.executeString(RhinoScriptProcessor.java:181)
   … 118 more
Caused by: org.mozilla.javascript.EcmaError: ReferenceError: "lwf_reviewAssignees" n'est pas défini (AlfrescoScript#1)
   at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3226)
   at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3216)
   at org.mozilla.javascript.ScriptRuntime.notFoundError(ScriptRuntime.java:3289)
   at org.mozilla.javascript.ScriptRuntime.name(ScriptRuntime.java:1567)
   at org.mozilla.javascript.gen.c64._c0(AlfrescoScript:1)
   at org.mozilla.javascript.gen.c64.call(AlfrescoScript)
   at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:337)
   at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2755)
   at org.mozilla.javascript.gen.c64.call(AlfrescoScript)
   at org.mozilla.javascript.gen.c64.exec(AlfrescoScript)
   at org.mozilla.javascript.Context.evaluateString(Context.java:1144)
   at org.alfresco.repo.jscript.RhinoScriptProcessor.executeScriptImpl(RhinoScriptProcessor.java:510)
   … 119 more

Comment faire pour évaluer correctement la variable lwf_reviewAssignees ou la présence ou absence l'aspect lwf:reviewAssignees dans le workflow courrant.

Merci pour votre aide précieuse.

huberd
Champ in-the-making
Champ in-the-making
Bon, j'ai enfin fini par résoudre mon problème. Ma solution vaut ce qu'elle vaut, mais bon si cela interesse quelqu'un…
En faite j'ai écris une petite classe qui me permet de tester si la variable existe ou pas en fonction de son type. Si son type est undefined alors la variable n'existe pas et donc ma classe me retourne false. Dans le cas contraire, elle me retourne true.

package lpr.alfresco.repo.workflow.jbpm;

import lpr.alfresco.util.MyLogger;
import org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript;
import org.alfresco.repo.workflow.jbpm.JBPMSpringActionHandler;
import org.dom4j.Element;
import org.alfresco.service.ServiceRegistry;
import org.alfresco.service.cmr.workflow.WorkflowException;
import org.jbpm.graph.exe.ExecutionContext;
import org.jbpm.graph.exe.Token;
import org.springframework.beans.factory.BeanFactory;

public class CheckTypeExist extends JBPMSpringActionHandler {

   private static final long serialVersionUID = 1L;
   
   private BeanFactory factory;
   private ServiceRegistry services;   

   // Patameters
   private Element var;
   private String type;
       
   @Override
   protected void initialiseHandler(BeanFactory factory) {
      this.factory = factory;
      services = (ServiceRegistry)this.factory.getBean(ServiceRegistry.SERVICE_REGISTRY);
   }
   
   public void execute(ExecutionContext executionContext) throws Exception {
      MyLogger.debugln("lpr.alfresco.repo.workflow.jbpm.CheckNull (Start)…",1);
      if (type == null || type.length() == 0) {
            throw new WorkflowException("CheckTypeExist variable name has not been provided");
        }
      
      Boolean result=true;
      String varStr = var.getTextTrim();
        if (varStr != null && varStr.length() > 0)
        {
            if (varStr.startsWith("#{"))
            {
                String expression = varStr.substring(2, varStr.length() -1);
                expression = "typeof " + expression;
                //System.out.println("Expression: " + expression);
                Object eval = AlfrescoJavaScript.executeScript(executionContext, services, expression, null);

                if (eval == null) {
                   throw new WorkflowException("var expression '" + varStr + "' evaluates to null");
                }
                if (eval.equals("undefined")) {
                   result=false;
                }
                //System.out.println("Eval / result: " + eval + " / " + result);
            }
        }
      Token rootToken = executionContext.getToken();
       executionContext.getContextInstance().createVariable(type, result, rootToken);
       MyLogger.debugln("lpr.alfresco.repo.workflow.jbpm.CheckNull (End)…",1);
   }
      
}

Pour l'utilser dans votre workflow:

       <!– Check is the variable lwf_reviewAssignees exist –>         
         <action class="lpr.alfresco.repo.workflow.jbpm.CheckTypeExist">
            <var>#{lwf_reviewAssignees}</var>
            <type>reviewtype</type>
         </action>

Donc dans mon cas cela donne ceci:

   <!–**************************–>
   <!–**      <Decision>      **–>
   <!–**     checkreview      **–>
   <!–**************************–>
   <decision name="checkreview">
      <event type="node-enter">
         <action class="lpr.alfresco.repo.workflow.jbpm.WriteInfo">
            <type>Decision</type>
            <name>checkreview</name>
            <disable>false</disable>
         </action>

       <!– Check is the variable lwf_reviewAssignees exist –>        
         <action class="lpr.alfresco.repo.workflow.jbpm.CheckTypeExist">
            <var>#{lwf_reviewAssignees}</var>
            <type>reviewtype</type>
         </action>
        
          <!– Set read permission for the initiator –>
         <action class="lpr.alfresco.repo.workflow.jbpm.SetPermissions">
         <actor>#{initiator}</actor>
            <permission>set</permission>
         </action>
        
         <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
            <script>
               logger.log("Review Type is seting up to: " + reviewtype);
            </script>
         </action>
      </event>
      <transition name="approval" to="startapproval"/>
      <transition name="review" to="startreview">
         <condition>#{reviewtype == "true"}</condition>
      </transition>     
   </decision>
Getting started

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.