cancel
Showing results for 
Search instead for 
Did you mean: 

Logger.log clarification

chicco0386
Champ on-the-rise
Champ on-the-rise
Hi all,
I not understand why my javascrpt doesn't print anything in this situation:

My peace of code is this:

<node name="Genera template documenti">
        <action class="it.mytria.tria.wf.action.GeneraTemplate"></action>
        <transition to="End">
            <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
                <script>
                    logger.log("———-PROVA LOG");
                </script>
            </action>
        </transition>
    </node>
In this first piece of code the logger.log doesn't print anything, but if I remove the piece of code:
<action class="it.mytria.tria.wf.action.GeneraTemplate"></action>
it's print "———-PROVA LOG".

Why the logger works fine only if I remove the above piece of code?

For me it's important to understand this situation

THANK YOU
1 REPLY 1

chicco0386
Champ on-the-rise
Champ on-the-rise
I reply to myself.
If I must to execute more action inside a node, this actions don't must writen like this:
<node name="Genera template documenti">
         <action class="it.mytria.tria.wf.action.GeneraTemplate"></action>
        <transition to="End">
              <action class="it.mytria.tria.wf.action.Prove"></action>
        </transition>
    </node>

Because the second action (inside of transition's tag) doesn't will execute.

So I must to write my code like this:
<node name="Genera template documenti">
        <event type="node-enter">
            <action class="it.mytria.tria.wf.action.GeneraTemplate"></action>
        </event>
        <transition to="End">
               <action class="it.mytria.tria.wf.action.Prove"></action>
        </transition>
    </node>

So all the two actions will execute.

BYE