AnsweredAssumed Answered

Failed to signal transition 'approve' from workflow task

Question asked by houssem_iet on Jul 22, 2010
Hi,

I'm working on Advanced workflow in Alfresco 3.3 version using Ubuntu environment..I'm facing the following problems:

1) Catalina.out doesn't show the message (I've tried logger.log("hello world!!"),System.out.println("this is a message"),messageactionhandler..)

2) I've changed the log4j.properties content as below:
log4j.logger.org.alfresco.repo.jscript=debug

3)I've changed also the startup.sh content,as I added the following source code to this file:
# Set juli LogManager if it is present
if [ -r "/etc/tomcat"/logging.properties ]; then
  JAVA_OPTS="$JAVA_OPTS "-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager" "-Djava.util.logging.config.file="/etc/tomcat/logging.properties"
fi

Finally,the following code represents the processdefintion.xml 's content:


<?xml version="1.0" encoding="UTF-8"?>

<process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="scwf:publishWhitepaper">
        <swimlane name="initiator" />

        <swimlane name="marketing">
                <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
                        <pooledactors>#{people.getGroup('GROUP_marketing')}</pooledactors>
                </assignment>
        </swimlane>
       
        <swimlane name="operations">               
                <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
                        <pooledactors>#{people.getGroup('GROUP_operations')}</pooledactors>
                </assignment>
        </swimlane>

        <start-state name="start">
                <task name="scwf:submitReviewTask" swimlane="initiator" />
               
                <transition name="" to="Submit">
                </transition>
        </start-state>
  
        <node name="Submit">
                <event type="node-enter">
                        <script>
                                System.out.println("———- Node Leave of LicenseTask ————");
                                <variable name="approve_rejectCount" access="read,write"/>
                                <expression>
                                       
                                        approve_rejectCount = true;
                                </expression>
                        </script>
                </event>
                <transition name="" to="fork1"></transition>
        </node>

        <fork name="fork1">
                <transition name="" to="MarketingReview"></transition>
                <transition name="tr2" to="OperationsReview"></transition>
        </fork>

        <task-node name="MarketingReview">
                <task name="scwf:marketingReview" swimlane="marketing" />
                <transition name="approve" to="join1">
                        <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
                                <script>
                                        logger.log("approved by MarketingReview");
                                </script>
                        </action>
                </transition>
                <transition name="reject" to="join1">
                        <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
                                <script>
                                        logger.log("rejected by MarketingReview");
                                </script>
                        </action>
                </transition>
        </task-node>
        <task-node name="OperationsReview">

                <task name="scwf:operationsReview" swimlane="operations" />

                <transition name="approve" to="join1">
                        <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
                                <script>
                                        logger.log("approved by operationsreview");
                                </script>
                        </action>
                </transition>
                <transition name="reject" to="join1">
                        <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
                                <script>
                                        logger.log("rejected by operationsreview");
                                </script>
                        </action>
                </transition>
        </task-node>

        <join name="join1">
                <transition name="" to="AllApproved"></transition>
        </join>
  
    
        <decision name="AllApproved">
       
                <transition to="Revise" name="reject">
                        <condition>#{approve_rejectCount == false}</condition>
                       
                </transition>
                        <transition to="Approved" name="">
                        <condition>#{approve_rejectCount == true}</condition>
                </transition>
        </decision>


        <node name="Approved">
                <transition name="" to="end1">
                        <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
                                <script>
                                        logger.log("Review rejected");
                                </script>
                        </action>
                </transition>
        </node>
  
        <task-node name="Revise">
                <task name="scwf:revise" swimlane="initiator"></task>
                <transition name="submit" to="Submit"></transition>
                <transition name="done" to="end1"></transition>
        </task-node>

        <end-state name="end1"></end-state>
  
</process-definition>

Outcomes