locked
Orchestrator Create Change with Template causes activities to miss a prefix RRS feed

  • Question

  • Hi all, I am creating a Change Request via Orchestration and I'm having a problem where when it applies the CR Template to the newly created CRs the activity IDs contained in the template are ending up with no prefix, Example:just 412, not RA412 or MA412. 

    I've verified there are no workflows acting on the Change Requests after they are built.

    This is causing some pain because without a prefix the exchange connector does not know how to route an approval or a completion for a Review or Manual Activity.

    While I have come up with the workaround of modifying the xml of each change request template and specifying that the ID of a review activity is RA{0}, this doesn't seem to be scalable, as every time I edit the CR template this manual input will be removed.


    Friday, August 24, 2012 2:54 PM

All replies

  • Hi,

    It seems to be a known challenge in Service Manager in general, see http://social.technet.microsoft.com/Forums/en-US/systemcenterservicemanager/thread/2688c78f-38e5-49fd-9811-d6ff56158f55 Maybe some have more ideas around this in the Service Manager forum.


    Anders Bengtsson | Microsoft PFE | blog at http://www.contoso.se

    Friday, August 24, 2012 8:06 PM
    Answerer
  • Hi,

    simply type CR in front of {0} in the ID-Field, or which prefix you want.

    Prefix for ID in CR or SR

    Regards,

    Stefan


    German Orchestrator Portal , My blog in English

    Saturday, August 25, 2012 5:33 AM
    Answerer
  • Thanks Stefan, but that is not the issue, I added the CR{0}, so the CR has the proper prefixes.. it is that the activities (Manual Activities, Review Activities) contained in the CR Template do not have prefixes when created via Orchestration. thanks for the reply.
    Monday, August 27, 2012 2:28 PM
  • Grant,

    This is purely an SCSM issue.  The workaround is:

    (1) Export the corresponding SCSM management pack where your CR template is stored.

    (2) Open the MP XML file using a text editor.  Add a line to provide the ID for each of the activity included in your template, as shown in the screenshot below:

    )   

    Sa

    (3) Save it and import it back to SCSM

    (4) The bad thing is, if you just import back the custom MP into SCSM, and you open the template again in the UI, you will lose your manual editing and you have to do it again.

    Joe Wong


    Joe

    • Proposed as answer by The_Ronin_69 Thursday, November 15, 2012 12:06 AM
    • Unproposed as answer by The_Ronin_69 Thursday, November 15, 2012 12:06 AM
    • Proposed as answer by Lee Berg Wednesday, March 6, 2013 5:21 PM
    Monday, September 17, 2012 3:14 PM
  • Hi All,

    This is a significant design issue for the Orchestrator IP for SCSM 2012 and 2010.  I've got round it by specifying the CR prefix (as indicated by Stefan) in the task that creates the CR from template, and by using the 'Create related Object' task to create the manual activity I needed.  Creating the Manual activity in this way allows you to specify ID prefix for the task the same way as you can for the CR itself.  Obviously I had to modify my CR templates in SCSM so that the Activities I want to create don't already exist in the CR templates themselves.  Hope this helps.

    Thursday, November 15, 2012 12:23 AM
  • Grant,

    This is purely an SCSM issue.  The workaround is:

    (1) Export the corresponding SCSM management pack where your CR template is stored.

    (2) Open the MP XML file using a text editor.  Add a line to provide the ID for each of the activity included in your template, as shown in the screenshot below:

    )   

    Sa

    (3) Save it and import it back to SCSM

    (4) The bad thing is, if you just import back the custom MP into SCSM, and you open the template again in the UI, you will lose your manual editing and you have to do it again.

    Joe Wong


    Joe


    The workaround works but not ideal. Anyone found another way?
    Thursday, September 26, 2013 12:04 PM
  • I am going to make a runbook very soon, as soon as i have time, since i have the same challenge.

    (should be faily easy to do by using the SCSM IP activities)

    i will post it asap. 



    Best Regards
    Jakob Gottlieb Svendsen
    Trainer/Consultant - Coretech A/S - Blog
    MCT - MCTS - VB.NET - C#.NET - Powershell - VBScript Mastering System Center Orchestrator 2012 - 3 day workshop - worldwide training click here

    Friday, October 4, 2013 7:31 AM
  • Hi,

    Actually this is not purely an SCSM issue.  Creating Manual Activities and Change Requests with Manual Activities embedded using SCSM console properly formats the ID with the prefix you specify in Change and Activity administrative properties.

    This issue is generated because Orchestrator ignores the specified prefix (even the default one) altogether.  I got round this by configuring an Orchestrator Runbook that creates the CR and the child MA activities (similar to the screenshot by Stefan).  I use the 'Create Related Object' action from the SCSM IP.  By doing this not only can I get Orchestrator to specify the CR prefix but also the MA prefix when it creates the related MA object.

    This also works for Review Activities too.

    Best regards,

    Tim

    Friday, October 4, 2013 8:46 AM
  • It is a SCSM issue, i can't see a reason for having every single line of code everywhere to have to iterate through all activities and set the ID.

    We have to do the same when using the SDK (imho it should be handle by the apply template method in the SDK.)

    The SCSM console has speific code that runs through all activities, after applying the template, and sets the ID.

    to create all activities manually is not a (good) solution imho, since we want to be able to apply templates on-the-fly

    and not having to make a specific runbook for each template.



    Best Regards
    Jakob Gottlieb Svendsen
    Trainer/Consultant - Coretech A/S - Blog
    MCT - MCTS - VB.NET - C#.NET - Powershell - VBScript Mastering System Center Orchestrator 2012 - 3 day workshop - worldwide training click here

    Friday, October 4, 2013 8:56 AM
  • ah i forgot that it is impossible to change the ID after the CR has been comitted.

    I think the solution is to create them as you did :)

    i will try to make one that copies the original activities, and inserts the same. but with correct ID.

    (maybe that was even what you also did=)

    and, actually the ID imho, should be placed in the template automatically by the console when creating the template, that would fix all problems!

    have anice day ;)


    Best Regards
    Jakob Gottlieb Svendsen
    Trainer/Consultant - Coretech A/S - Blog
    MCT - MCTS - VB.NET - C#.NET - Powershell - VBScript Mastering System Center Orchestrator 2012 - 3 day workshop - worldwide training click here

    Friday, October 4, 2013 9:09 AM
  • I'm not fully understanding what you are trying to achieve when you say "apply templates on-the-fly"? I take it you're not using the console or PowerShell to do this?

    Ignoring Orchestrator for a moment my understanding is that if you configure SCSM workflows to apply CR and MA templates, the workflow service applies the templates with the appropriate prefixes.  Are you saying that the workflow service uses console code to process configured workflows that apply templates?

    I agree that the problem is a fundamental flaw in the SCSM code and the way Orchestrator SM IP interacts with SCSM, however, if you are already using Orchestrator to apply a CR template for a specific management process, then why not get Orchestrator to apply the appropriate prefixes?  That seems much simpler to me rather than exporting the MP to edit the code, that once imported you then can't manage from the console without editing the code manually all over again.  If you're already using Orchestrator to create and manage CRs then you can edit the template as much as you like without having to remember to export MP, manually edit code line by line, then re-import the MP.  It also means that editing the CR templates can be delegated out much easier than trying to delegate out MP importing/exporting and the skills necessary to get that process right.

    Friday, October 4, 2013 9:16 AM
  • I mean

    by "on the fly" i mean, that i want my customer to be able to change the templates, without having to change the runbook.

    I would love to change the ID, but it is not possible, since the ID can only be changed in code BEFORE you do the commit (which the create change request does internally).

    the workflows use a part of the SDK that can insert the ID (and ofcause this should be added to the ORchestrator IP too). i just dont see any reason for SCSM too add the IDs to the template when it is created, instead of having all different parts of SCSM to run this "Add ID code" everytime i needs to create an object based on a template.

    You are pointing out that it is bad to change the XML in the MP, because then the user/customer cannot use the console to change the template themselves.

    but if you have to make a runbook specific to create all activities manually, then the customer cannot change any workflow in the template either, then they/you have to change the runbook everytime.

    do i understand you correctly? :)


    Best Regards
    Jakob Gottlieb Svendsen
    Trainer/Consultant - Coretech A/S - Blog
    MCT - MCTS - VB.NET - C#.NET - Powershell - VBScript Mastering System Center Orchestrator 2012 - 3 day workshop - worldwide training click here

    Friday, October 4, 2013 9:21 AM
  • Yes, I see what you mean now.

    I'd forgotten that if you start to manage the MA/RA in Orchestrator you remove the ability to delegate out managing that ability using SCSM templates.

    Seems we are caught between a rock and a hard place! 

    Friday, October 4, 2013 9:25 AM
  • exactly.

    i think my solution for now will be to use a PS script or C# code to create the CR and add the template.

    or our temp solution using only the IP will be to

    1. Create CR with template

    2. Get all activities of each type

    3. Create new related activities with the exact same data

    4. Remove the old relationship

    5. set the "invalid" activity to "cancelled" and marks its with a tag in notes (since the IP does not have a remove object activity)

    6. maybe a powershell workflow script that clean up all these cancelled activities

    not pretty imo :)


    Best Regards
    Jakob Gottlieb Svendsen
    Trainer/Consultant - Coretech A/S - Blog
    MCT - MCTS - VB.NET - C#.NET - Powershell - VBScript Mastering System Center Orchestrator 2012 - 3 day workshop - worldwide training click here

    Friday, October 4, 2013 9:30 AM
  • I'm not fully understanding what you are trying to achieve when you say "apply templates on-the-fly"? I take it you're not using the console or PowerShell to do this?

    Ignoring Orchestrator for a moment my understanding is that if you configure SCSM workflows to apply CR and MA templates, the workflow service applies the templates with the appropriate prefixes.  Are you saying that the workflow service uses console code to process configured workflows that apply templates?

    I agree that the problem is a fundamental flaw in the SCSM code and the way Orchestrator SM IP interacts with SCSM, however, if you are already using Orchestrator to apply a CR template for a specific management process, then why not get Orchestrator to apply the appropriate prefixes?  That seems much simpler to me rather than exporting the MP to edit the code, that once imported you then can't manage from the console without editing the code manually all over again.  If you're already using Orchestrator to create and manage CRs then you can edit the template as much as you like without having to remember to export MP, manually edit code line by line, then re-import the MP.  It also means that editing the CR templates can be delegated out much easier than trying to delegate out MP importing/exporting and the skills necessary to get that process right.


    We created a workflow today to test the application of a template on an existing CR. The MA and RA prefixes were not applied to the new activites.
    Wednesday, January 8, 2014 4:36 PM
  • How about this...

    Use Orchestrator to setup the various CR, MA and RA tickets so they get the prefix set correctly.  Then use Service Manager workflow to apply the templates you want to these tickets when they are created, when the source = portal.  This would at least allow delegation of creating and editing Service Manager templates to various staff, without them having admin access and training to update Orchestrator runbooks.

    Thursday, January 16, 2014 9:20 AM
  • good idea tim. could be done too.

    but in this case I needed to do more to the case after creating and applying template. (relations to other items). so the simplest solution was to use a custom IP. download it here: (i thought thelink was in this thread? .. http://gallery.technet.microsoft.com/Integration-Pack-Service-aa228015  


    Best Regards
    Jakob Gottlieb Svendsen
    Trainer/Consultant - Coretech A/S - Blog
    MCT - MCTS - VB.NET - C#.NET - Powershell - VBScript Mastering System Center Orchestrator 2012 - 3 day workshop - worldwide training click here

    • Proposed as answer by The_Ronin_69 Tuesday, March 25, 2014 6:33 PM
    Thursday, January 16, 2014 9:27 AM
  • Any response from Microsoft on this issue?  I'd really like it just to work rather than having to either install a separate IP into our Orch environment, modify XML or create related objects to my "create change using template" object.
    Thursday, April 10, 2014 8:29 PM