Home Advanced Request Offering

Advanced Request Offering ARO

Can we use the results of the ARO to initiate the creation of an MA ?

Answers

  • james_kleinschnitzjames_kleinschnitz Cireson Dev, Product Owner Advanced IT Monkey ✭✭✭
    Could you possibly give a little bit more details and maybe an example of what you are trying to do?
  • Billy_WilsonBilly_Wilson Member Ninja IT Monkey ✭✭✭✭
    Not sure what you mean here but I used to build my Service Catalog runbooks that way. Some folks prefer to have all of the supporting Activities already created in the SR template for the ARO but I preferred to have Orchestrator create the Activities based on the User Input and the result of the initial Review Activity.

    Its kind of six of one, half a dozen the other but I hope this helps answer your question.
  • Narmin_HemnaniNarmin_Hemnani Customer IT Monkey ✭
    Here's what I am thinking, when a user clicks on a multi-select and the response is 'true' upon selection, then I would like to create an MA for this decision otherwise, no MA is generated.
  • Davin_ClouthierDavin_Clouthier Customer Adept IT Monkey ✭✭
    edited September 2017
    Currently we have a workflow that does something similar to this if certain conditions in the user input are true we create a Review Activity. Maybe this function will give you an idea on how you might tackle this:
    Function Create-ManagerApproval($WorkflowPosition, $AffectedUser, $ApprovalTitle, $ApprovalDescription) {
       try {
           if($AffectedUser.GetType().Name -eq "EnterpriseManagementObject") {
                $ActiveDirectoryUser = Get-AdUser $AffectedUser.UserName -Properties Department, Manager, DirectReports
           }
           elseif($AffectedUser.GetType().Name -eq "ADUser") {
                $ActiveDirectoryUser = $AffectedUser
           }
           else {
                throw "Invalid Account Type Given"
           }
           $DirectReports = $ActiveDirectoryUser | Select-Object -ExpandProperty DirectReports
    
           if($DirectReports) { return $false }
           else {
                $ActiveDirectoryManager = Get-AdUser $ActiveDirectoryUser.Manager
                if($ActiveDirectoryManager) {
                    $SCSMManager = Get-SCSMUser -username $ActiveDirectoryManager.SamAccountName
                    if($SCSMManager) {
                        $RAProperty = @{
                            Title = $ApprovalTitle;
                            Id = 'RA{0}';
                            SequenceId = $WorkflowPosition
                        }
                        $ManagerApprovalActivity = New-SCSMObject -Class $ClassReviewActivity -PropertyHashtable $RAProperty -NoCommit
                        $ManagerApprovalActivity.commit()
                        Set-SCSMObject -SMObject $ManagerApprovalActivity -Property Description -Value $ApprovalDescription
                        $ReviewerProperty = @{ 
                            ReviewerId = "Reviewer{0}"; 
                            Mustvote = $true; 
                            Veto = $true 
                        }
                        $Reviewer = New-SCSMObject -Class $ClassReviewer -PropertyHashtable $ReviewerProperty -NoCommit
                        $Relation1 = New-SCSMRelationshipObject -NoCommit -Relationship $RelationshipHasReviewer -Source  $ManagerApprovalActivity -Target $Reviewer
                        $Relation2 = New-SCSMRelationshipObject -NoCommit -Relationship $RelationshipHasReviewerUser -Source $Reviewer -Target $SCSMManager
                        $Relation1.commit()
                        $Relation2.commit()
    
                        return $true
                    }
                    else {  throw "Manager has AD Account but no SCSM User" }
                }
                else { throw "Somehow we have no Manager and no Direct Reports, this user lives in between dark matter and anti matter" }
           }
    
        }

    to go into a little more detail, every one of our ARO's starts off with a automation MA, we made a new workflow management pack with authoring tool with powershell inside that is triggered off of MA going from pending to in progress. 

    This code above is placed inside the workflow, then the management pack is uploaded to the console, and the dll generated is moved to the scsm server directory. Once the ARO is created the first MA kicks off and it does this powershell to check what user input the user has made. Then it creates approvals and manaual activities accordingly. 

    Hope this helps.
  • Jeff_LangJeff_Lang Customer Ninja IT Monkey ✭✭✭✭
    we have some requests where the initial activity is a Cireson Powershell Activity, this activity will check the answers to the request and add the Review/Manual Activities to the request depending on the answers supplied. similar to the code posted above by @Davin_Clouthier
  • Billy_WilsonBilly_Wilson Member Ninja IT Monkey ✭✭✭✭
    All great ideas! Narmin, I'd be happy to post an example runbook if you want to go the SCORCH route but the code above from Davin and Powershell activity suggestion from Jeff are great options. Its nice to know there are different ways to accomplish the same goal.
  • Narmin_HemnaniNarmin_Hemnani Customer IT Monkey ✭
    thank you so much, I would like to see an example preferably creating an MA for a existing SR activity which is triggered with a decision, this means that if some decision is (true) then an MA is created for a specific group in the Activity Implementer. However, if the decision is a No and don't do anything.
  • Marek_LefekMarek_Lefek Customer Advanced IT Monkey ✭✭✭
    I have an SR - "Employee onboarding" where user can ask for access to 3 systems  by setting checkbox for each. 
    In SR template there are 3 MA: "Set access to system 1", "Set access to system 3", "Set access to system 3" and RB task that check the checkboxes and each is not set, it set the MA as "omitted". In that case we have lot of MA that are ommited. 
    Is there better option eg. if checkbox is marked - than create an activity with parameters as category?


  • Narmin_HemnaniNarmin_Hemnani Customer IT Monkey ✭

    Thank you - sounds like something we are trying to do as well except that with ARO you have the option to select what you want the user to display select or not, I was looking for logic that drives the decision from the check box to create MA or not. Your description of resolving the issue sounds good as well.

  • Davin_ClouthierDavin_Clouthier Customer Adept IT Monkey ✭✭

    It sounds like you both are asking if something built in exists, it does not. The options you have to make it work with a custom solution are:

    Workflow

    Runbook

    Custom Form Task

    Powershell Activity


    With any of these solutions it will require intervention from outside of the ARO itself, you might want to consider putting in a feature request if a custom solution is outside what you guys are willing to attempt.

    Feature requests are up voted by the community and then based on the needs of the community, Cireson will consider the feature request based on this. Cireson also has consultation and custom code services if you contact them. So your three main options are use one of the 4 custom solution methods, make a feature request and if its popular enough cireson will take it from there, or hire cireson to build this for you.

    Hope this helps!

  • Narmin_HemnaniNarmin_Hemnani Customer IT Monkey ✭
    Thank you, would be nice to have a cireson solution without much customization
  • Marek_LefekMarek_Lefek Customer Advanced IT Monkey ✭✭✭
    Could you advise which is better/easier? Or decribe more? As I mean custom form is a different solution than workflow but I don't have experience to compare.
    Is it better to ommit activities or create New activities after sr registration? 

  • Narmin_HemnaniNarmin_Hemnani Customer IT Monkey ✭
    I am also new to this and would not be able to give a good comparison.
Sign In or Register to comment.