2 Replies Latest reply on May 14, 2018 5:28 AM by eservent

    Is there a way to access the output generated by System.log() in one workflow from another one?

    badnik Lurker

      For default error handling I would like to call a subworkflow that among other things gathers the output from System.log() in the failing workflow.

      There seems to be a way to access that data considering the client does just that, but can that be done in a subworkflow?

      So far I tried to read the content of server.log but while that contains the information I am looking for I was wondering if there is a better way to go about this?

       

      Thanks.

        • 1. Re: Is there a way to access the output generated by System.log() in one workflow from another one?
          iiliev Virtuoso
          VMware EmployeesCommunity Warriors

          Hi,

           

          The client doesn't get the output of System.log(); in fact, System.log() does not have any output value, it just dumps text to the log file.The context of log file(s) is then indexed, and the client has access to this indexed data.

           

          This indexed data is not exposed to scripting, so currently there is no better way to consume it in a workflow than reading the log files and parsing the data you need.

          1 person found this helpful
          • 2. Re: Is there a way to access the output generated by System.log() in one workflow from another one?
            eservent Enthusiast

            Hello badnik,

             

            I had a similar problem before VRO7. When you loose your window client of VRO6, and reopened it, all logs had disappeared. So I tried to find a way to retrieve logs later.

            In VRO7, logs are still present but not a long time, so I continue to use my previous solution sometimes.

             

            My solution is to use both System.log and Server.log (I added a wrapper to log info into both System and Server).

            The System Log shows real time log and Server Log saved log in the WorkflowToken object.

             

            When I need to review all logs, I use the workflow token id to retrieve the WorkflowToken object and read all servers logs saved in attribute logEvents.

             

            Hope that can help,

            Emmanuel.