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,

    I've got a combination of your suggestions going, creating a Managed Unit to identify the machines I want to move and the search step to look in the Managed Unit but the Run Workflow is still greyed out.  I can create the exact same workflow with an automatic trigger (I used the description changing) and it works fine but my on demand one won't run, either on a schedule or on demand and I'm a bit stuck.  I raised it with support and they've recommended asking here.  Has anyone ever come across this before please? I'd add a screenshot but I don't see a way to add an image, only a URL to one.

    Thanks again for all your help so far, I'm sooooo close. 

  • You say you have a search step to look in the Managed Unit but you didn't mention if you have any Activity(ies) below the search step that will act upon the objects found by the search step?

    Secondly, have you tried right clicking your Workflow in the left pane of the MMC and running it that way?

  • Hi,

    Thanks for the reply. once the search is run it gets the DN then there is a group of if-else activities that look at the name of the machine and move it accordingly. e.g. if the DN starts LPCxxx it gets moved to Corporate Laptops and if the DN starts BHSxxx (one of our schools) it looks at the Parent OU to identify whether it's a desktop or laptop and moves it to School Laptops/Desktops.

    There is no run option in the left hand pane of my mmc.  I don't know if it's a bug with our installation (7.5.0) or if I've done something wrong.  All I've done in the options and start conditions is set the schedule so I don't know if I've just missed something in the parameters and script bits, although in my first attempt I tried adding the DN parameter it uses after the search and get the MMC contents with the script initialization and it didn't make any difference, and looking at the other comments that was wrong anyway.  Sorry if that's me being daft, I've only ever used change workflows before. 

    Thanks

    Charlene

  • One thing that could prevent the workflow from being run is if one of the Activities is misconfigured or not fully configured.  Either way, there would be red circle with an exclamation point ( ! )on the offending one(s).

    Also, verify that the Allow the workflow to be run on demand  setting is enabled.

  • Part of the activity was disabled on purpose (I've done that before without issue to test part of a workflow at a time) so I enabled that and completed the parts I hadn’t put together yet.  It still failed to run so I copied the whole lot into a new workflow and the run button appeared. Go figure!  It’s not actually running the workflow properly now because it isn’t moving the computers but it gives me something to work with more than the one that didn’t run at all. I've now got a working automated workflow that relies on an attribute being changed manually, and a change workflow that will trigger but doesn't actually move the computers, yet all the activities are the same.  I love puzzles. :D 

  • Glad to hear you've made some progress.  I have seen similar things before.  With respect to the computers not moving, are there any errors appearing in your Admin Service Windows Event log?  Can you tell from that log if the move activity (or is it a script?) is actually being launched?

  • There wasn't an error in the Run history, it looked like it wasn't finding anything.  However the event viewer did have an error saying the IfElse activity is skipped because branch condition is not satisfied on any of its branches.  I had a look at the branches thinking I've made an error and I think I've figured out what's wrong.  In my initial Change Workflow tests I was using the Workflow Target attributes as the conditions, which I then copied and pasted into the new one to keep everything the same but with the change workflow that's no longer an option.  It didn't give me an alert or anything that there was a problem with it and because I've been copying and pasting everything I didn't notice that condition isn't there.   I have to use Found Object ("Search for objects") in everything instead.  It's in one of Stu's screenshots but I didn't notice it, my apologies.  That would explain why the Change workflow works and the automated one doesn't.  

    In other news, I think there is a bug with our installation after all; I've been disabling the workflows when I wasn't working on them as a precaution and the one I created yesterday didn't have the Run option today so I've had to redo it again.  It seems that any time I disable an automated workflow the Run button stays disabled even when the workflow is enabled again.

    Thanks for all your help and patience.

  • YA BEAUTY!!! It's working!  I need to do some more testing on a "real" case of a machine being updated, going into the Managed Unit, the workflow running then the machine coming out but it's looking good. Thanks for all your help   and  , I couldn't have done it without you both

Reply Children