Active IQ Unified Manager Discussions

Workflow fails with: Given schedule already exists?

WAFLHERDER
2,175 Views

Hi All,

 

As part of the volume creation workflow I also create a CDOT schedule and snapshot policy.

 

When executed my workflow fails with this error:

Given schedule 'XYZ' already exists Location: Row '1' step 'Create schedule'.

 

 

It appears to have attempted to create the schedule, although it already exists on the target cluster (due to a previous run).

 

But why does it even attempt to create these elements?

 

In the parameters for "Create Schedule" I define my variable "vSched" using "by searching for an existing Schedule".


And I have: only "If vSched was not found" then "Fill-in attributes for vSched and execute the command" .

 

For my search ("Using search parameters") I am using:
    By pre-defined filters
        Select one schedule by its natural keys with these parameters:
            The Schedule Name = NAS_SNAP_SCHED (a constant I defined)
            The Cluster name or IP = vTargetCluster.name

 

I thought that this was the correct way to deal with the possibility of pre-existing "elements" i.e. so that the schedule and policy are only created when necessary e.g. the first time the workflow is run against a specific cluster.

 

Using the "Test" button shows that the search is returning no results when "consider reservation data" is not selected).

 

What is going wrong here? Is there something wrong with my search - should I use a different filter/finder/key? Or is something else the problem?

 

Thanks once again for all your support!

2 REPLIES 2

WAFLHERDER
2,100 Views

No feedbackback at all? I can't be the only person to have tried this ... or am I really that weird?

 

Basically, I want to create a couple of objects (a CDOT Schedule and Policy), but only if they don't already exist.

 

What's the recommended technique for doing that?

 

 

 

joele
2,036 Views

Generally speaking that sounds like the correct method to handle creating a schedule only if it doesn't exist.  If your test search isn't returning a result then something is off.  If the schedule already exists (or is in WFA's cache and you have the 'use reservation data' checkbox checked) then it should show up on that test.

 

Any chance you'd be willing to export the workflow and upload it here so I can take a look?  Or PM me and we'll coordinate offline if you don't want it uploaded to the community site.

Public