Skip to content

Software License Shared Process

Goal

  • I want to have ONE process for how software licenses are requested.
  • I want service desk to be able to add new software license services based on the same process
  • I want service desk to be able to change if software license requires approval or not
  • I don't want service desk to edit the process itself

This scenario will cover the following components

  • Page
  • Shared Process
  • Roles
  • Cost
  • Code Activity (If cost is greater than 50) - always require approval

High-level summary of what will be done / We'll need to do the following

  • Add a page where services (software licenses) will be published
  • Add a service desk group as member of the ServiceAdmin role
  • Create a Shared Process which will contain the process for all published services
  • Include an Approval Form in Shared Process
  • Include a Setup form in Shared Process

Shared Process - Should check if cost of license is greater than 50, then it should require an approval from the service owner - Should require approval if defined in setup form - Should display a summary of request as a single status update for the requester

Add Page

  1. Go to AdminWeb > Pages > Add Page
  2. Name Identifier "SoftwareLicense"
  3. Name Name "Software Licenses"
  4. Drag-and-drop Service list to the Page sections canvas.
  5. Save

Create Shared Process

A instruction for the whole step can be viewed below (gif)

  1. Go to AdminWeb > Shared processes > Add process
  2. Name Identifier "SharedSoftwareLicense"
  3. Name Name "Shared Software License"
  4. Add Description "You must supply a software license id and cost when adding a new software license."
  5. Click Form editor
  6. Drag-and-drop a textfield called "Requester" and bind it to a variable. This field should be mandatory.
  7. Click Copy Selected Form CopySelectedForm
  8. Name it ApprovalForm and make the Requester Field readonly.
  9. Click Confirm
  10. Go to Setup form tab and add a textfield for "Software License Id" and a checkbox for "Require Approval". The textfield should be mandatory.

  11. Go to Workflow Editor and start by adding a Code activty

  12. Add the following parameters by using the "Add" button.

    Name Bound
    orderCost System.Order.Cost
    requireApproval requireApproval
  13. Add the following javascript code

    if (orderCost > 50 ) {
        var requireApproval = true;
    }
    
  14. Add a Conditional Sequence and bind it to RequireApproval

  15. Add an Approval activity within the conditional sequence
    1. Bind approver to Service Owner
    2. Bind form to ApprovalForm
  16. Go to Variables tab and add a string variable called "StatusMessage"
  17. Go to Workflow editor and add a Assign activity after the approval activity.

    1. Bind it to the variable StatusMessage
    2. In the body field, add the following (Note: You must type @ instead of copy+paste the data below)
      Your order of item @SoftwareLicenseId was approved by @System.ServiceOwner.Email
      
  18. Add a State activity after the assign activity and bind it to StatusMessage

  19. Add a End Workflow activity after the state activity.
  20. After and outside the Conditional sequence block, repeat the step with Assign and State activity, but instead type the following text
    Your order of item @SoftwareLicenseId was automatically approved.
    

Update Role

This will add an AD group to the role ServiceAdmin. The group will then only be able to edit services.

  1. Go to AdminWeb > Roles
  2. Select role ServiceAdmin
  3. In the Rule field, add the following return user.hasClaim('Group', 'gg-it-servicedesk'); (Replace gg-it-servicedesk with Active Directory group name in your environment)
  4. Save
  5. Logon with a user account that is member of groupname. This user should now have the role ServiceAdmin and only see the Services in the admin page.

Add service based on Shared Process

Now we want to test out the scenario where service desk and add software license services based on the shared process.

Repeat the process below and create 3 services which should cover the following test scenarios

  • Should require approval when cost is greater than 50
  • Should require approval when Require approval checkbox in setup form is true
  • Should automatically be approved when cost is below 50 and no approval is required.

You should logon and do the following with an account that is member of the ServiceAdmin role, but you can complete the following with your current admin account as well.

  1. Go to Services > Add service > Select Shared Software License process > Enter catalog info
  2. Name Identifier "PhotoshopLicense"
  3. Name Name "Photoshop License"
  4. Optional: Add image
  5. Go to Set page and access tab
  6. Set Cost to a value above 50
  7. Set Pages to Software Licenses page you created earlier.
  8. Set Owner to your email address.
  9. Go to Process Setup (This is the Setup Form)
  10. Enter "1001" as Software License Id
  11. Leave "Require Approval" blank
  12. Click Create