How to apply a template to a service request
-
Wednesday, November 14, 2012 9:11 PM
I'd like to add a new task to the service manager console so that when one has an open service reqeust, they have a task they can click to apply an existing templete to that service reqeust. That doesn't exist but I'm wondering if that can be added somehow. Any ideas?
Thanks
All Replies
-
Wednesday, November 14, 2012 10:30 PMModerator
I don't think what this is easy to implement. The main problem is activities. If you have few existing activities and try to apply template what also contains few activities then you can break your workflow because activities from template will added with same Sequence number. As example. I have a SR with activities:
0 MA Please review and approve
1 RA Add userand template with activities:
0 MA Approve SR
1 RA Add user to groupand I applied this template to SR. Result will be:
0 MA Please review and approve
0 MA Approve SR
1 RA Add user
1 RA Add user to groupSCSMSolutions
email: freemanru (at) gmail (dot) com- Proposed As Answer by Stefan KoellMVP, Moderator Thursday, November 15, 2012 8:11 AM
- Marked As Answer by Andreas BaumgartenMVP, Moderator Tuesday, January 15, 2013 10:05 PM
-
Thursday, November 15, 2012 7:28 PMThanks for the reply. I was thinking of the same kind of problem that could happen. In my case, the template would be applied where there isn't any activities so I don't think it would be a problem in this case. I'm not sure if there's a way to do this, but perhaps Microsoft left this off for good reason...I don't know.
-
Thursday, November 15, 2012 8:35 PMModeratorIf your SR doesn't have any activities then there is another problem comes to play: your SR stack in Submitted status and even if will add activities to this SR you must restart workflow handled the entire SR process. And I don't think what this can be easy or supported by MSFT.
SCSMSolutions
email: freemanru (at) gmail (dot) com -
Thursday, November 15, 2012 8:36 PMModeratorand BTW, there is one more issue with applying template with activities http://social.technet.microsoft.com/Forums/en-US/systemcenterservicemanager/thread/2688c78f-38e5-49fd-9811-d6ff56158f55
SCSMSolutions
email: freemanru (at) gmail (dot) com -
Thursday, November 15, 2012 8:46 PM
Anton, I'm not clear on the first problem you mentioned about submitted status. Could you go over that one in more detail?
If this is a template to be applied while a service request is in progress, then I was thinking that a task could be designed to allow the user to choose an existing template (from an explicitely defined list of templates), then the task would read the values from the template and apply those values to the form's context (the IDataItem). As long as the template does _not_ have values for those important fields like Status, then it shouldn't hurt anything. For example, if the template only contained the "Title" property, then only the title of the work item would be changed.
-
Thursday, November 15, 2012 10:09 PMModeratorAaron, if SR doesn't contains any activities then SR's workflow what handle the activities set the status of entire SR to Submitted and stopped. So even if will add activities to this SR the status still will be Submitted and doesn't changed until you restart workflow process (somehow).
SCSMSolutions
email: freemanru (at) gmail (dot) com -
Thursday, November 15, 2012 10:41 PM
ahh, ok, i see what you're saying. Yep, you're right. But if the SR already has activities, then applying a template that doesn't contain activities won't affect anything. I was seeing this task design as something you would only run against an in-progress service request that already has activities. The task would apply a template to change only those properties on the service request object itself (no changes to any related objects, nor would it add any new related objects). But that design has a lot of constraints to ensure that only acceptable changes are made. :)
-
Friday, November 16, 2012 12:06 PMModeratorYes, of course you are right. I've just miss from Jrmehl's post what template has no activities.
SCSMSolutions
email: freemanru (at) gmail (dot) com

