Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Work Tasks

Prerequisites for Debugging Exceptions

  • Last UpdatedJun 06, 2024
  • 6 minute read

There are various ways in which the user can view the details of the exceptions and warning messages that are encountered while using the product. AVEVA Work Tasks provides powerful debugging facilities which can be used to track configuration issues or exceptions during runtime.

Following are the components for debugging exceptions:

  • Log Files

  • Logger Console

  • Event Viewer

  • Email alert for Exceptions

Following topics provide extra information on settings for debugging:

  • Understanding and Setting Debug Level

  • Understanding log messages

Log Files

The log files are located in the <AVEVA Work Tasks installed path>\Logs (For example: C:\Program files\AVEVA\Work Tasks\\Logs) folder. Logs for a specific repository will be available inside the folder with repository name. Global exceptions will be logged directly under <AVEVA Work Tasks installed path>\Logs folder. The naming convention used for log files is “Current Year + Current Month + Current Day”.

Log files created under repository will contain repository name prefixed. For example, TelematicsRepository_20140213.log.

Logger Console

This is a debugging tool which can be used to watch the messages logged real time. The Logger Console can be used by developers to view the messages logged by AVEVA Work Tasks during development. Only one instance of the Logger Console can be opened at a time. The Logger Console can be opened only on AVEVA Work Tasks installed machines. We recommend to keep the Logger Console closed in production environment as the memory usage will be high. The log history for the Logger Console can be viewed from Log files.

To open the Logger Console,

On the Windows Start menu, point to Programs, point to AVEVA, and then click WTLogger Console.

Event Viewer

Exceptions and warnings are also logged in the Event Viewer. This helps users to check for exception or warning on the production environment. Users have an option to stop logging these exceptions. In addition, users can even avoid logging certain messages in the Event Viewer. Refer to the instructions given under the following headings -

  • To stop logging errors and warnings in the Event Viewer

  • To stop logging specific warnings, messages, or errors in the Event Viewer

To stop logging errors and warnings in the Event Viewer, complete the following steps:

  1. On the Windows Start menu, click Run.

  2. Type Regedit.

  3. Click OK.

  4. The Registry Editor screen appears.

  5. Create a Registry Key named "StopLoggingOnEventViewer" and set the value as Yes in AVEVA Work Tasks registry under "HKEY_LOCAL_MACHINE\SOFTWARE\AVEVA\WorkTasks".

To stop logging specific warnings, messages, or errors in the Event Viewer:

  1. Create a new registry key named "DoNotLogEventViewerMessages" of type "Multi-String Value" in the path HKEY_LOCAL_MACHINE\SOFTWARE\AVEVA\WorkTasks.

  2. Add the messages or a portion of a message that need to be omitted from being logged in the event viewer.

  3. Restart the services.

    The error and warning messages specified in the key value will not be logged in the event viewer.

    Email alert for Exceptions

    Option to get email alerts for all exceptions logged from AVEVA Work Tasks. Mail settings and email id has to be configured for enabling this feature. After it is configured, the exceptions are sent as email message to the mail id specified in To Email field.

    1. On the Windows Start menu, point to Programs, point to AVEVA, and then click Farm Configuration Wizard.

    2. On the Edit Settings window, check Service Settings.

    3. Click the icon next to Global Settings. Select the Communication tab, and set From Email and To Email fields.

      Understanding and setting Debug Level

      The number of messages getting displayed, varies based on the Debug Level which is set in Farm Configuration Wizard.

      To change the Debug Level:

      • Debug Level 1:

        Information related to starting and ending of a workflow instance and runtime exceptions occurred are logged. We recommends this Debug Level on production environment.

      • Debug Level 2:

        Information related to starting and ending of a workflow instance, runtime exceptions occurred during workflow execution and step by step information of each activity execution (Example: Human activities log the number of resources available, Properties set for the activity, Task assigned information for each user) are logged. We recommends this Debug Level on developer environment.

      • Debug Level 3:

        Information related to starting and ending of a workflow instance, runtime exceptions occurred and Task (Human activity) assigned to user information are logged.

      To set the Debug Level:

      1. On the Windows Start menu, point to Programs, point to AVEVA, and then click Farm Configuration Wizard.

        The Welcome to the AVEVA Work Tasks Farm Configuration Wizard appears.

      2. Click Next. The Edit AVEVA Work Tasks Farm Settings window appears.

      3. Select Service Settings.

      4. Click Next. The Services/Global Settings window appears.

      5. Click against Global Settings. The Global Settings screen appears.

      6. Click Log/Transaction.

      7. Select the Debug Level from the drop down box.

      8. Click OK.

        Understanding log messages

        The log messages are represented by the following symbols:

        • Information (i): This type of message is preceded by a lower case 'i'. It indicates messages containing general information about the events being logged. Each message of this type has four parts.

        • Warning (?): This type of message is preceded by a question mark '?'. These messages are warning notes to the users about the events being logged. The messages of this type have a structure similar to the 'Information' messages with the same four parts as mentioned earlier.

        • Error (!): This type of message is preceded by an exclamation mark '!'. It indicates error messages with details specific to the error. Messages of this type can be further classified into four parts similar to the other two messages. In addition, it has the 'Exception Stack Trace', which occurs before the machine name and date/time. It can be identified by the keyword 'Source' and it can be used to trace the source of the error.

        Example

        i - @#@Date - 10:48:52 PM.635@#@ApplicationName - LeaveApplication@#@WorkflowName - EmployeeLeave@#@ExecutionId - 5@#@ExecutionDetailsId - 85@#@WorkItemId - cd16d86c-5269-4f26-aa97-ad532bd65837@#@Module - C:\WINDOWS\assembly\GAC_MSIL\Skelta.HWS\3.5.0.0__926ee05bf5158731\Skelta.HWS.dllC:\WINDOWS\assembly\GAC_MSIL\Skelta.HWS\3.5.0.0__926ee05bf5158731\Skelta.HWS.dll , Assembly version = 3.5.9009@#@_MachineName - skeltadtp22, Process - WFEngine.NET2@#@Message - Activity of type (Leave Form) added for resource – Michelle Rose@#@

        The following table explains the information available in the message:

        Information

        Description

        i –

        Type of log

        Date - 10:48:52 PM.635

        Log Date Time

        ApplicationName – LeaveApplication

        Repository Name

        WorkflowName – EmployeeLeave

        Workflow Name

        ExecutionId – 5

        Workflow instance ID. Each workflow instance will have a unique ID.

        ExecutionDetailsId – 85

        Workflow Step ID.

        WorkItemId - cd16d86c-5269-4f26-aa97-ad532bd65837

        Work item or task ID.

        Module -C:\WINDOWS\assembly\GAC_MSIL\Skelta.HWS \3.5.0.0__926ee05bf5158731\Skelta.HWS.dll C:\WINDOWS\assembly\GAC_MSIL \Skelta.HWS\3.5.0.0__926ee05bf5158731 \Skelta.HWS.dll , Assembly version = 3.5.9009

        Assembly details to track message stack.

        _MachineName - skeltadtp22

        Machine Name

        Process - WFEngine.NET2

        Process from which the message was logged.

        Message - Activity of type (Leave Form) added for resource – Michelle Rose

        Custom Message

        Since the message was logged as information, there is no stack information available.

        For exceptions the first message will carry the stack trace. Check the following message.

        ! -  Source -    at System.Data.SqlClient.SqlConnection.GetOpenConnection(String method)   at System.Data.SqlClient.SqlConnection.ValidateConnectionForExecute(String method, SqlCommand command)   at System.Data.SqlClient.SqlCommand.ValidateCommand(String method, Boolean async)   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)   at System.Data.SqlClient.SqlCommand .ExecuteScalar()   at Workflow.NET.DataHandler.SQLDataHandler.ExecuteInsert (DataRow Row, Boolean InsertId) in M:\SkeltaDev3.0\Workflow.NET\SQLDataHandler.cs:line 1152, Date - 4:08:16 PM.888, Module - C:\WINDOWS\TEMP\Skelta2007Temp\ShadowTempDefault\assembly\dl3\057300c8\ f66dc290_1643c901\Workflow.NET.NET2.DLL@#@_MachineName - skeltanb30, Process - WFEngine.NET2, Message - @@SQL -insert into SKWorkItemTransaction (Id,Application, ChannelName,HWSActivityId,WorkItemId,VirtualActorId,QueueId,Type,ToVirtualActorId,CreatedDateTime,CommentsId,DataId,CurrentStatus,LastUpdatedDateTime) values (@p1,@p2,@p3, @p4,@p5,@p6,@p7,@p8,@p9,@p10,@p11,@p12,@p13,@p14) ; select @@identity, - ExecuteScalar requires an open and available Connection. The connection's current state is open.@#@

        In This Topic
        Related Links
        TitleResults for “How to create a CRG?”Also Available in