Subscribe
Accepted Solution

Custom Error Message When Filter/Finder Fails

Hi All,

        I have a Worflow with a finder for volume resize, where it make sure, because of the volume resize, the containing aggr doest breach any of the aggr thresholds like 

  1. Aggregate Used Space Threshold of say 80%
  2. Aggregate OverCommitment Threshold of say 120%

When an user provides all input and the finder fails as it breached one of the two or both, I get a generic error as below

 

Failed to execute filter 'Filter Volume Based on the Containing Aggregates OverCommit and Used Space Threshold Tacking Snapshot into account' with parameters: {clusterName=cluster1, aggrOverCommitInPercentage=120, volName=volume1, svmName=vserver1, TargetUsedDecimalPct=0.8, aggrUsedSpaceInPercentage=80}
At command 'Find Volume and its Aggr Used, OverCommit Percentage', tab 'Volume', variable 'findVolume', property 'name'

 

I do have a custom error message in the advace tab of the resource section as below.

So my question is how to get the custom error message when this resource selection fails, instead of generic error message ?

ResourceSelection.JPG

 

Regards

Adai

Re: Custom Error Message When Filter/Finder Fails

Adai, 

 

    The section to enter custom error message is MVEL enabled. You can identify this easily by looking at the instruction  message above box: 

 

(Type CTRL +DOWN Arrow for auto complete options)

 

This message box is has auto complete option available. Places like Workflow description, Execution Comments are NOT MVEL enabled and so auto complete is avalable for it.

 

So for giving a custom message all you need to do is put the message within double-quotes.

 

pic2.png

 

 

pic2.png

 

 

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

Re: Custom Error Message When Filter/Finder Fails

Thanks Abhishek, that dint strike me. Learnt it now.

So can I get some of the variable or constant values in there ? If its MVEL enabled with autocomplete ?

 

Regards

Adai

Re: Custom Error Message When Filter/Finder Fails

That explanation was crystal clear and really stay in for ever. Would be great if such informations are availabe in Workflow developer Guide or a FAQ on some of the tricks like this and others.

 

Regards

Adai

Re: Custom Error Message When Filter/Finder Fails

Thanks for the feeback Adai. I'm already working on something on those lines to help wfa customers make better use of the product. 

 

I'll be posting it soon. 

 

sinhaa 

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

Re: Custom Error Message When Filter/Finder Fails

Hi Sinhaa,

               Looks like I hit a bug or I am missing something. When I use reference varialbe in the Custom Error Message it thorw error.

 

Here is my custom error Message:

Message:

"The Containining aggregate - " + findVolume.aggregate.name + " of volume " + findVolume.name + " is exceeding one or both of the following thresholds Aggregate OverCommit % - " + AggrOverCommitInPercentage + " and Aggregate Used % - " + AggrUsedSpaceInPercentage

 

Output:

Illegal expression: "The Containining aggregate - " + findVolume.aggregate.name + " of volume " + findVolume.name + " is exceeding one or both of the following thresholds Aggregate OverCommit % - " + AggrOverCommitInPercentage + " and Aggregate Used % - " + AggrUsedSpaceInPercentage
At command 'Find Volume and its Aggr Used, OverCommit Percentage', tab 'Volume', variable 'findVolume', property 'name'

 

Where as when I use just constants and userinput it works like a charm.

 

Message:

"The Resize of the Volume " + $volName + " by" + $incrementSizeInMB + " GB is exceeding one or both the aggregates theresholds, Aggr OverCommit = " + AggrOverCommitInPercentage + " % and Aggr Used = " + AggrUsedSpaceInPercentage + " %"

 

Output:

Workflow aborted.
The Resize of the Volume cifs_audit_test_02 by1 GB is exceeding one or both the aggregates theresholds, Aggr OverCommit = 120 % and Aggr Used = 80 %
At command 'Find Volume and its Aggr Used, OverCommit Percentage', tab 'Volume', variable 'findVolume'

 

The WFA version is 2416155

 

Regards

Adai

 

 

Re: Custom Error Message When Filter/Finder Fails

This is not a wfa bug.

 

"The Containining aggregate - " + findVolume.aggregate.name + " of volume " + findVolume.name + " is exceeding one or both of the following thresholds Aggregate OverCommit % - " + AggrOverCommitInPercentage + " and Aggregate Used % - " + AggrUsedSpaceInPercentage

 

Now, how am I suppose to know just by looking at the above message what is findVolume, AggrOverCommitInPercentage and where is all it defined in your workflow?

 

Adai, the basic requirement to debug a workflow planning/preview error like this is to have the workflow and you haven't provided it. So please do. 

 

sinhaa 

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

Re: Custom Error Message When Filter/Finder Fails

Hi Sinhaa,

               I have emailed you the workflow. Once you take a look and let me know, will post back the findings.

 

Regards

Adai

Re: Custom Error Message When Filter/Finder Fails

Adai,

 

Just as I suspected before looking at your workflow.

 

"The Containining aggregate - " + findVolume.aggregate.name + " of volume " + findVolume.name + " is exceeding one or both of the following thresholds Aggregate OverCommit % - " + AggrOverCommitInPercentage + " and Aggregate Used % - " + AggrUsedSpaceInPercentage

 

The problem here is self-referencing. So this error section has to be executed when findVolume is NOT found. See now, you are using findVolume.aggregate.name in the error message if the findVolume is NOT found, right? So if findVolume itself is not found i.e. NULL because the filter fails to find a correct volume then how can it get findVolume.aggregate.name or findVolume.name.

 

So now this expression become illegal. Auto-complete can't detect this, it only shows the valid columns for the variable.

 

I hope this is clear.

 

sinhaa

 

 

 

 

 

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

Re: Custom Error Message When Filter/Finder Fails

Understood. Thanks for the clarificaiton. 

 

Regards

Adai