Workflow Soluiton

 View Only
  • 1.  Need help comparing two workflow Collections - NS 7.1 Software Resources

    Posted Jun 05, 2013 11:56 AM

    I currently have a workflow running that copies New\Changed Software Rersources from our Stage 7.1 environment to Production.   Up to now I have been using SSIS and tables to create the compare data.  I am trying to integrate all of that into workflow and have created two components with the data extracts that need to be compared.  Basically I am trying to filterout all the items in the two collections that are identical and then take actions on the ones that are different.  I have tried the "Remove Items from Collection" component with a equals comparison and a mapping from one table to the other.  One other question I have is related to the datatypes of these SQL Components.  Each of the components has its own datatype and I feel that this may be impacting my ability to compare them correctly.  may next step may be to move to generating this dynamically or by acting directly on the NS Webservices and comparing that way.  Any thoughts or insight would be appreciated.  Thanks! 



  • 2.  RE: Need help comparing two workflow Collections - NS 7.1 Software Resources

    Posted Jun 05, 2013 12:58 PM

    To get a distinct list quickly, use the Test Collection For Duplicates component. There's a checkbox called Output Distinct Values List where you can output a distinct list along the Has Duplicates path. I'd call this component "after" the comparisons to get a distinct list quick and easy.

    Trying to come up with a "pseudoflow" to find all elements that appear more than once in a list...



  • 3.  RE: Need help comparing two workflow Collections - NS 7.1 Software Resources

    Posted Jun 12, 2013 02:33 PM

    Thanks reecardo, I was able to get past the first hurdle and am able to get a list of all Software Releases in our stage environemnt that are not in our production environment by do a "Is in Collection" (Prod) check on each Guid from Stage.  My next step is to get a list of all items in Stage that are changed from the values in Prod.  Currently I am passing a date variable through to a SQL query and getting a collection of items chnages in the past day etc.  Does it make more sense to try to pass variables to SQL or to compare two collections in Workflow?



  • 4.  RE: Need help comparing two workflow Collections - NS 7.1 Software Resources

    Posted Jun 12, 2013 03:11 PM

    If an item in your collection of objects exposes a "datechanged" field, you can really go etiher way: use a SQL query, or run though every item in a collection and toss out elements that exceed the date threshold. As far as performance goes, the SQL query may be the quickest way.