AnsweredAssumed Answered

log4j Debugging Javascript in Workflow

Question asked by hyperation on Nov 10, 2009
Latest reply on Nov 11, 2009 by hyperation

I am having trouble trying to enable log4j logs to appear in console or log files.

I modified the example AdHoc workflow a bit by adding logger.log lines:

   <task-node name="adhoc">
      <task name="wf:adhocTask" swimlane="assignee">
         <event type="task-create">
             logger.log("Test DEBUG MODE 1");
               if (bpm_workflowDueDate != void) taskInstance.dueDate = bpm_workflowDueDate;
               if (bpm_workflowPriority != void) taskInstance.priority = bpm_workflowPriority;
      <transition name="" to="completed">
         <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
           logger.log("Test DEBUG MODE 2");
              if (wf_notifyMe)
                 var mail = actions.create("mail");
                 mail.parameters.subject = "Adhoc Task " + bpm_workflowDescription;
                 mail.parameters.from =;
                 mail.parameters.text = "It's done";

I've enabled DEBUG on the log4j.propertoes file:

But when I initiate the workflow in the default Alfresco UI there is nothing being logged.  The workflow goes through correctly in each state.  I see values like wf_notifyMe being populated in the Javascript Debugger.

Can someone please tell me what I did wrong or did not do so I can enable logging in the console?