Environment: Service Desk 7.4
In the 7.4 New Features Guide on page 20 it explains the newly introduced functionality of how you can create and update CIs or Users from within your process by using process actions. In this guide I am going to run through an example of how this might be applied. This is quite a complicated set of steps so I have split them into 3 sections which splits out the 3 different areas of functionality involved.
Design Scenario: "Our current process is to book a laptop in and assign in a slot number which corresponds to a physical location within the IT department and every laptop booked in is assigned a location in the slot. What I would like to do is be able to book in the Laptop and assign it a slot number from a pool, which when the laptop is completed and we had back it is unassigned from the slot."
In this example, we are going to drive the update to the CI from the Request process but obviously the same steps could be done from other processes.
SECTION 1 - Creating a Slot CI with a relationship to your process object
1. First of all we need to create a new configuration type which will hold the list of slots which can be booked. We do this by creating a new object below the Configuration Item parent object within Object Designer.
2. Next we create a new boolean attribute on the Slot object which will indicate if the slot is currently booked or not. The True and False text can be specified here to make the use of this attribute a bit clearer. Also, set the Default Value in here to False so when adding a new slot it will be created as an un-booked slot.
3. Still in Object designer, next drag the new Slot object down the object for the process which you want to be able to pick the slot from. In this example, I want to be able to raise Requests for a laptop to be booked in so I will drag the Slot object down to Request under the Request Management section. Ensure that you answer No to the question that is asked (as if not there will be performance implications).
4. You should now have a one-to-one relationship with the Slot object created:
5. In Object Designer, now drag the Configuration Item object (or Laptop object if you will ONLY book laptops) to the Slot object. This time when you are asked the question you could say Yes if you will want to show a collection tab on the CI to show if it is booked into a Slot. If not answer No.
6. Before saving the changes for this relationship you may want to change the name of it to make it more obvious what it will store:
7. In Window Manager, create a new window for your new Slot object and add on the attributes that you need to record about the slot:
NOTE: At a later date once you are happy that this process is all working ok then you might want to make the Booked boolean and Booked Configuration Item read only on this window so it can only be updated via Process actions. Or perhaps have a read-only view published to most analysts but a read-write view published to certain Administrators.
8. In Configuration Management create the slot configuration item records for each of your slots, leaving the Booked boolean and the Booked Config Item fields blank / untouched.
SECTION 2 - Creating the actions and adding them into your process design
9. In Object Designer, locate your tRequest object and highlight the one-to-one relationship that you have created with the new Slot object. Click on the "Manage Actions" option in the action pane. Click to Add a new action as an "Update Related" action and then give it a name to indicate when this will be used such as "Book / Unbook Slot":
10. In Process Designer, deactivate the Request process that you are going to amend. Then create two new manual windowless (where "Allow association with window" = False) actions. One for "Book Slot" and one for "Un-book Slot":
11. In your process design you will need to have two manual actions coming from a status - one for "Book Slot" and one for "Un-book Slot". Each of these manual actions will be followed by the automatic action of "Book / Un-book Slot" that we created at step 9:
12. For each of the 2 "Book / Unbook Slot" automatic actions we need to fill in value types to pick the CI and Slot that has been selected on the process (Request in this case). We also need to set the Booked? boolean to tick (book) or untick (un-book) the CI item as appropriate to the manual action before it in the process.
13. In order to do this right-click on the Slot title and select Value Type. Select a Runtime Value and then navigate to the Slot relationship then select the Title attribute. Next right-click on the Booked Configuration Item and select Value Type. Select a Runtime Value and then navigate to the CI relationship then select the attribute (no need to expand the CI object here). On the Booked? attribute just pick either Booked or Un-booked as appropriate.
14. Save and activate your process.
15. In Window Manager, ensure that on your Request window you have the Configuration Item and Slot relationship attributes added. You could also pull through the related "Booked?" attribute from the Slot object so this will show read only whether the selected Slot has already been booked or not. This is how a basic Request window could look in Console:
16. Now when you are at the correct point in your process you are able to click either the "Book Slot" or "Un-book Slot" and the Slot CI record will automatically be updated. The related "Booked?" attribute displayed on your Request window will also verify that this has happened.
SECTION 3 - Filtering your list of slots to show booked / unbooked slots
17. In Object Designer, create a new boolean attribute on the Request object. This will be ticked on the Request window to filter the list to show either booked or unbooked slots as required:
18. In Window Manager, add this new attribute onto your Request window:
19. In Object Designer you will be creating two system filters, one to list all Slots where they are flagged as booked and one to list all slots that are not flagged as booked (unbooked). Locate the Slot relationship on the Request object and click into the Filter Selectors property:
20. Click New Filter rule and under Select a filter query click New. Give the filter a relevant title and click Created for Everyone. Then click OK:
21. Drag the Slot.Title attribute into the Selected Attributes area. Then right-click on it and select the Attribute Properties to "Use this column to sort data" so that the slot list will be correctly ordered. Click Next:
22. On the conditions drag the "Booked?" attribute and set the value Is Equal To = True. Click Finish and then save your changes:
23. Follow steps 20 to 22 again but to create the unbooked filter so set the condition "Booked?" attribute Is Equal To = False.
24. On the "Booked Slots" filter create a New Condition where the Request.Show Booked Un-booked boolean (created at Step 17) is equal to True.
25. On the "Un-booked Slots" filter create a New Condition where the Request.Show Booked Un-booked boolean (created at Step 17) is equal to False.
26. Your list of slots available to pick on your Request window will now filter depending on what you pick in the boolean at runtime: