Opalis \ Orchestrator Verbose Logging your Workflow

Facebooktwittergoogle_plusredditpinterestlinkedinmail

Most of people who develop Orchestrator workflows think straight forward about the logical solution of the problem that Orchestrator has to solve.

I find it very important to log your steps within the workflow, this is why I’ve “developed” my own way to handle the logging part in the workflows:

First of all, this is my “all can do” workflow which I want to log:

main workflowThis workflow query DB and again query another DB with the results from previous query component, checking the resulted values and run some exe + append the result to file.

That’s nice but what if I’ll have any error while running the workflow ? DB connection lost, Access Denied,RPC Error, etc…

I need a dynamic way to log these errors if it appears, so in addition, I’ve built another workflow which going to log my workflow’s errors:

This short workflow will start with Initialize Data component which will get as an input the following:

  1. Log File Path – the path to the log file which I’ll append the error line.
  2. Step Name – I’ll pass the step name which called the logging workflow from the parent workflow.
  3. Error Message – the error message that I got.
  4. Severity – the severity that I want to log with this error.

Int Data

All the information is being written to text file:

Append to Text

And this is the information I send from my parent workflow:

Parent WorkflowSo, first, we have to edit the link which calls the logging workflow (Invoke Logging workflow), double click the link – uncheck “success” and check “Warning” & “Failed”. for these criteria the link will be activated:

 

criteria

warning and error

After editing the criteria, let’s back to the start… the key is to send to the logging workflow the error we want to log, it’s done by adding information from the last calling component to the ErrorMsg field.

Checking the “Show common Published Data” and choosing “Error summery text”, this published data will contain any error if exists.

Published Data

Well… after running the parent workflow which need to connect SQL Server first.. this is my log output:

Looks good hu ? have fun 🙂

One thought on “Opalis \ Orchestrator Verbose Logging your Workflow

  1. Having read this I thought it was rather enlightening. I appreciate you finding the time and effort to put this informative article
    together. I once again find myself spending a lot
    of time both reading and commenting. But so what, it
    was still worthwhile!

Leave a Reply

Your email address will not be published. Required fields are marked *