SubuVM
Contributor
Contributor

Suppress error message on Decision activity

I am working on a simple workflow which checks if a directory exists or not and create it.

pastedImage_0.png

When i execute it, if the directory is not present It takes the error path and creates the directory.

This works fine, though it adds a error message to the log when the directory is not there

pastedImage_1.png

Is there a way to supress this?

0 Kudos
5 Replies
iiliev
VMware Employee
VMware Employee

I'm not sure if this error message is coming from the decision activity itself.

The error is reported on line# 7 in item1. Which item in your workflow is the item1 (you can find this out by hovering with the mouse over the items; item names will appear in a tooltip)? Could you show the scripting code, or better export and attach your workflow?

0 Kudos
SubuVM
Contributor
Contributor

I dont see item1 in the workflow.

Attaching the workflow

0 Kudos
SubuVM
Contributor
Contributor

pastedImage_0.png

pastedImage_1.png

0 Kudos
iiliev
VMware Employee
VMware Employee

Right, item1 is located in the workflow List path in guest, which is used by the workflow Check for directory in guest, which is used by your workflow.

The problem is that List path in guest (and other guest operations workflows) do not have their output exception binding set, so when some guest operation throws an error, you cannot just catch and not print the error message

The easiest way to fix it would be to modify these workflows and bind the output exception to some attribute. However, these workflows are sealed (as all out-of-the-box workflows) so you cannot edit them easily. One option would be to duplicate them and use the duplicated copies. Another option would be to write your custom workflows/scripting code to deal with the guest operations, using the existing workflows as a template (the code is not complex).

0 Kudos
SubuVM
Contributor
Contributor

Thanks Ilian lliev, I think custom script is the way to go. I will create one.

0 Kudos