- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 05-31-2021 08:56 AM
Hello All,
While working with workflows, you might come across a situation, where you want a number of activities to be hidden/restricted for a group of users. However, you still need input from these users in the later activities using the workflows. The quickest way that strikes your mind should be to insert an ‘If-condition’ and check whether the user has that specific role or not. But, instead of making it complicated, what if we use it this way?
Let's get a better understanding of the scenario first. We have put into sections below including a screenshot that demonstrates the sub-flow for the Non-Licensed users. I have cropped the image for a better picture.
Scenario :
- We had a requirement where the workflow needed to be split between the users after the ‘If-condition’ activity (ref. #1 in the picture above).
- We had classified users in our system into -
-
- Licensed users - The users who were the members of these three groups : SN.ITBM, SN.ITSM and SN.Stakeholders.
- Non-licensed users - All the rest users who weren’t a part of these three groups, were considered as Non-Licensed.
- The below issues we faced for Non-licensed users :
- The Non-Licensed users were considered as the non-authorized ones
- They needed to access the workflow we created, but at a certain point we wanted to restrict them from the workflow.
- We will make it simple by providing you a screenshot here. We wanted the Non-Licensed users to access the ‘Approval activity’ above, and restrict them from the further flow uptil ‘Set Values’ (ref. #16 in the picture). And here was where the flow needed to split into two ways, based on the user types as discussed.
Solution :
We at Infocenter found a tricky, yet a working solution to overcome this situation using Survey Management!
- We created a survey using the Assessment Metrics Type[asmt_metric_type] table.
- We designed the survey using the Survey Builder, and created a question, in which we added two options as 'Approved' and 'Reject’.
- We specified some conditions in the survey, when it should get attached to the trigger record. In our case, the triggers are applied on Requested Items.(You will find the details in the screenshots we have provided.)
- Whenever the conditions on the trigger record matches with the survey conditions, a new Survey record gets created in the Survey instance table, for that specific RITM record.
- And as soon as the record gets created, an email notification is triggered, through which the survey link is sent to the user who has opened the RITM.
- The user then finds the link to the survey in the email, and he either ‘Approves’ or ‘Rejects’ the approval.
- After any of the two options, appropriate comments are added in the parent RITM.
We are providing you a detailed stepwise explanation below, from which you will get a clear understanding of what we did, along with the screenshots.
On how to create basic surveys, see the documentation on Get started with Survey Management
Hope you find this helpful!
Implementation :
1.) We created a Survey in the 'Assessment Metrics Type [asmt_metric_type]' table, in which we added two options as ‘Accept’ or ‘Reject’.
For this you need to -
- Search for ‘Survey’ in the filter navigator.
- Navigate to the ‘View Surveys’ under Survey, and click on the ‘New’ button.
(Refer to the screenshots below.)
- Fill in the name and other information, and ‘Save’.
- Click on the ‘Survey Designer’ UI Action. This directs to the Survey Designer UI where we design our surveys.
- Start building the survey. Add an appropriate question and two options ‘Approve’ and ‘Reject’. And then click on ‘Save’.
2.) We have a workflow created on the Requested Item [sc_req_item] table as below.
3.) As shown in the above screenshot, in the 'If condition' activity, it checks whether user that has opened the Requested Item record is a Licensed user or not.
As soon as it recognizes it is a Non-Licensed user,
- Set the State as 'Pending survey' and Stage as 'fulfillment'.
- Add a comment on the RITM form.
Note: We have created a new Ritm State=Pending survey
4.) This condition then adds an Instance Record to the 'Survey Instance' table, where the Trigger Id field is populated with the associated RITM record.
5.) And the Survey is sent to the email address of the user who opened the RITM record, on which the User needs to click on the link provided in the email, where it redirects to the Survey form.
This is how the triggered email looks like -
6.) Until the survey is submitted by the user, and the approval action is retrieved (either Accept or reject), we have put a 'Wait For' condition in our workflow which waits for an action, and then moves forward.
7.) If the user 'Approves' via Survey -
- Set the State as 'Closed Complete' and Stage as 'Completed'.
- Add a comment on the RITM form.
8.) Or if the user 'Rejects' via Survey -
- RITM is re-opened with State as ‘Work in Progress’ and Stage as ‘Fulfillment’.
- The workflow creates a 'Rework' Task.
- The Reject Reason that the user fills in the survey after Rejecting the approval, is retrieved and posted as an Additional Comment in the RITM record, and also gets appended in the description field of the Task created after the keywords set as 'Ticket completion was rejected by Requester <<Reject Reason>>'.
- Fulfiller completes and closes the 'Rework' Task.
- RITM again transitions to State as 'Pending survey' and Stage as 'Fulfillment'
9.) You might be wondering, what if the user never submits the survey? Would the workflow keep waiting until then? Our answer is ‘No’!
To handle this situation, we have set a duration for the survey of 14 days. So if the user does not fill the survey within 14 days, the survey will expire and its state would change to 'Cancelled'. As soon as the survey state changes, the ‘Wait For’ activity in the workflow gets triggered, and the RITM closes. To achieve this, there was an OOTB Scheduled Job too, but we have created a new one as due to some reasons, we weren’t getting a proper output.
So this is how we achieved Survey Management for restricting some workflow activities from different users. You can also use different surveys for distinctive users. Let us know if you have any queries regarding this, in the comment box below.
Please mark as helpful if it helps. Take care.
Thanks!
Nishita Padwal
Solving complex scenarios at Infocenter