workflow trigger not an Active Roles operation

Hi,

I'm using Active Roles 7.5 and I'm looking for assistance on creating a workflow (on demand or automated) where the trigger isn't initiated within an Active Roles operation.  We have our computers sorted into Operating system and type (desktops, laptops, tablets) and I'd like to automate a process where if one is updated from Windows 10 to Windows 11 the move will be done for us.  I have a series of if-else operations to do the sorting that seem to work perfectly when we test with something like changing the description field but the operating System isn't one that can be altered, so the trigger won't work.  Changing the description in our Active Directory didn't trigger the workflow so I know using a Modify to operatingSystem attribute won't work either, which is what I'd originally intended but I assume because the change to OS won't be a manual change through Active Roles, the same would happen where the workflow would never be triggered.  I'm thinking of using an automated workflow to run a couple of times a day instead but I'm not sure how to get it to check the Windows 10 OU and identify the computers on Windows 11 to know it has to move those ones.  Has anyone done something like this before that may be able to offer advice please?  Will I maybe need to use a Powershell script to spit out a csv of the computers that need to be moved and then feed it back into the if-else bit I already have set up, or do the if-else within the powershell and just have a workflow that runs the script?

I hope I've explained that well enough! Any ideas will be great.

Thanks


Charlene

Parents
  • Hi  

    For a non-scripted option, you could use a workflow, with a series of Search Activity steps. The below is a collection of "Search", "If/Else" and "Move" activity steps.

    Where in an automation workflow you'd

    1. Search for a list of all your workstation OUs starting at Domain\Workstations (in my case, I'd have "Domain\Workstations\Windows 11" and "Domain\Workstations\Windows 10"), then for each OU found  
      1. Search for all workstation contained directly in the current found OU
        1. Then check if the Workstation is in the correct OU, by comparing the Found object "Get Workstation OUs"'s description value to the current workstations operatingSystem property
        2. If it does match, I move on and check the next workstation (1a)
        3. If it does not match, I search for an new OU under "Domain\Workstations"
          1. If an OU is found where the description matches the workstations listed Operation System, I move the object to that OU ...

    You could also play around with the search task for 1a, to only return computers that dont match the description, as the method above would check every workstation, including the ones in the correct OUs, which for large environments may take a while. Also bear in mind, in this example you'd need to ensure an OU exists with a description for each possible value of Operating System in your environment, otherwise the computer would be left where it was.

    Alternatively, as  suggests you could use MU's, and a script module to do the changes, and move according to which ever business rules you need.

Reply
  • Hi  

    For a non-scripted option, you could use a workflow, with a series of Search Activity steps. The below is a collection of "Search", "If/Else" and "Move" activity steps.

    Where in an automation workflow you'd

    1. Search for a list of all your workstation OUs starting at Domain\Workstations (in my case, I'd have "Domain\Workstations\Windows 11" and "Domain\Workstations\Windows 10"), then for each OU found  
      1. Search for all workstation contained directly in the current found OU
        1. Then check if the Workstation is in the correct OU, by comparing the Found object "Get Workstation OUs"'s description value to the current workstations operatingSystem property
        2. If it does match, I move on and check the next workstation (1a)
        3. If it does not match, I search for an new OU under "Domain\Workstations"
          1. If an OU is found where the description matches the workstations listed Operation System, I move the object to that OU ...

    You could also play around with the search task for 1a, to only return computers that dont match the description, as the method above would check every workstation, including the ones in the correct OUs, which for large environments may take a while. Also bear in mind, in this example you'd need to ensure an OU exists with a description for each possible value of Operating System in your environment, otherwise the computer would be left where it was.

    Alternatively, as  suggests you could use MU's, and a script module to do the changes, and move according to which ever business rules you need.

Children
  •   's suggested approach is indeed a good one if your use cases around  the If /Then logic and what needs to be done with / to your computers are fairly simple.

  • Hi,

    Thanks very much for your reply.  I've got something like your first screenshot except probably a little simpler, where the if-else are on one level.  Our corporate machines are names DPCxxx, LPCxxx and TABxxx depending on their type, so anything starting that gets moved into the W11 Corp\ Desktop, Laptop and Tablet OUs.  Then for the school ones, which all have a code per school on them rather than named by the type of machine, I look at the parent OU and move them into W11 Schools\Laptops, Desktops or tablets, if that makes sense.  When I used the description field changing as the trigger to run tests it worked perfectly.  The action works fine when I use a simple trigger like changing the description, it's getting it to use the OperatingSystem changing as the trigger instead I'm struggling with because that isn't changed by Active Roles itself.  I'll try using your get method and let you know how I get on, or stick to the MU version, which is working as a collection method, I just need to figure out how to start it.  I thought as long as Allow workflwo to be manually triggered was ticked I could run it using the Run workflow button any time I wanted but that's greyed out at the moment.

    Ta

    Charlene