Active IQ Unified Manager Discussions

WFA - error with user input condition

sheelnidhig
2,242 Views

Hello Guys,

 

I am trying to use the Condition or user input fields for my workflow, and it is showing me an error when i added some more value for a condition:

 

the new conditions are :

a1 - Standard (7 days ret), a2 - Standard (14 days ret), a4 - Standard (30 days ret), b1 - Basic (7 days ret), b2 - Basic (14 days ret), b4 - Basic (30 days ret), c1 - Standard Replicated (7 days ret),  c2 - Standard Replicated (14 days ret), c4 - Standard Replicated (30 days ret), g1 - Premium (7 days ret),  g2 - Premium (14 days ret), g4 - Premium (30 days ret)

 

I get the following error,

error.jpg

 

I was wondering if we have any limitation with the set or conditions or text length.

 

My use case:

These are the services list based on which the backup options will be enabled or if we dont select any of these service the backup option wont be made abailable to user.

and alternate could be if i can put an (not equal or not match) condition instead of (equal or match ) condition.

 

Thanks,

Sheel

1 REPLY 1

coreywanless
2,208 Views

I think there is a limit. There are a couple ways to get rid of this.

 

I will suggest my quick and dirty method, that may help with end users that are wanting to run workflows.

 

1. Break out the User Input into two inputs, and use enum for those

  - Tier - Standard, Basic, Standard Replicated, Premium

  - Backup Retention - 7, 14, 30

2. Add a function to your list of functions. (Under Designer -> functions)

Here is the function:

def custom_ServiceList(tier, retention){
String tierletter = "";
String retentionnumber = "";
if(tier.toLowerCase() == 'standard'){
tierletter = 'a';
}
else if(tier.toLowerCase() == 'basic'){
tierletter = 'b';
}
else if(tier.toLowerCase() == 'standard replicated'){
tierletter = 'c';
}
else if(tier.toLowerCase() == 'premium'){
tierletter = 'g';
}
if(retention == '7'){
retentionnumber = '1';
}
else if(retention == '14'){
retentionnumber = '2';
}
else if(retention == '30'){
retentionnumber = '4';
}

return tierletter + retentionnumber + " - " + tier + " (" + retention + " days ret)";
}

 

3. In your workflow you can call this function however you need to. "custom_ServiceList($UserInput_Tier,$UserInput_BackupRetention)"

Public