How to check if custom workflow action is actually invoked ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dirk.dinger
    Junior Member
    • Nov 2018
    • 17

    How to check if custom workflow action is actually invoked ?

    Hello EspoCRM developers,

    I am totaly new to the EspoCRM source code and PHP in general. I managed to configure a custom workflow action ( As I can see it in the workflow editor).
    I added a log statement similar to one that I found in the code
    class AppProject extends \Espo\Core\Templates\Services\BasePlus { public function appCreateAction($workflowId, Entity $entity, $additionalParameters = null) { $GLOBALS['log']->info('hello world'); } } I do not see this in the log file data/logs/espo-....log I set the log level to DEBUG in the config.php but there a no log entries except [2018-11-16 10:24:01] Espo.DEBUG: BPM: processPendingFlows [] [] I would expect much more debug output. Am I missing something ? Any help appreceated. Dirk
  • tanya
    Senior Member
    • Jun 2014
    • 4308

    #2
    Hello,
    can you find your entityDefs Workflow definition in data/cache/application/metadat.php? What if instead of log, throw an error?

    Comment

    • dirk.dinger
      Junior Member
      • Nov 2018
      • 17

      #3
      Yes the action is in the metadata.php. If I throw an Exception I get an error when I try to save the entity that is associated with my custom workflow action - this is one step forward
      But I would like it better to see some log output. If I on purpose make some syntax error in my Service Action I do not see this anywhere.

      Comment

      • tanya
        Senior Member
        • Jun 2014
        • 4308

        #4
        check access to log file.
        If you use different user for web and for crontab, you can have problem with access to log file. (depends on who was first today and who created this file)

        also you can try higher log level for message, like error(). Only for test. But DEBUG level covers info() messages, as I know

        Comment

        • dirk.dinger
          Junior Member
          • Nov 2018
          • 17

          #5
          removed all log files and set Level to 'ALL'. Now I can see the log messages ;-)

          Comment

          Working...