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:
This 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:
- Log File Path – the path to the log file which I’ll append the error line.
- Step Name – I’ll pass the step name which called the logging workflow from the parent workflow.
- Error Message – the error message that I got.
- Severity – the severity that I want to log with this error.
All the information is being written to text file:
And this is the information I send from my parent workflow:
So, 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:
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.
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”
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!