File "Invoke-_InternalServiceMethod.xaml"

Full Path: C:/Windows/System32/ServerManagerInternal/ServerManagerShell/Invoke-_InternalServiceMethod.xaml
File size: 14.12 KB
MIME-type: text/plain
Charset: utf-8

<Activity mc:Ignorable="sads sap" x:Class="ServerManager.StartSMService"
 xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities"
 xmlns:av="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
 xmlns:mmi="clr-namespace:Microsoft.Management.Infrastructure;assembly=Microsoft.Management.Infrastructure"
 xmlns:mpa="clr-namespace:Microsoft.PowerShell.Activities;assembly=Microsoft.PowerShell.Activities"
 xmlns:mpua="clr-namespace:Microsoft.PowerShell.Utility.Activities;assembly=Microsoft.PowerShell.Utility.Activities"
 xmlns:mv="clr-namespace:Microsoft.VisualBasic;assembly=System"
 xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities"
 xmlns:s="clr-namespace:System;assembly=mscorlib"
 xmlns:s1="clr-namespace:System;assembly=System.Core"
 xmlns:s2="clr-namespace:System;assembly=System"
 xmlns:s3="clr-namespace:System;assembly=System.ServiceModel"
 xmlns:s4="clr-namespace:System;assembly=System.ComponentModel.Composition"
 xmlns:sa="clr-namespace:System.Activities;assembly=System.Activities"
 xmlns:sads="http://schemas.microsoft.com/netfx/2010/xaml/activities/debugger"
 xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation"
 xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib"
 xmlns:sma="clr-namespace:System.Management.Automation;assembly=System.Management.Automation"
 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <x:Members>
    <x:Property Name="MethodName" Type="InArgument(x:String)" />
    <x:Property Name="Services" Type="InArgument(s:String[])" />
  </x:Members>
  <sap:VirtualizedContainerService.HintSize>1014,1105</sap:VirtualizedContainerService.HintSize>
  <mva:VisualBasic.Settings>Assembly references and imported namespaces for internal implementation</mva:VisualBasic.Settings>
  <sap:WorkflowViewStateService.ViewState>
    <scg:Dictionary x:TypeArguments="x:String, x:Object">
      <x:Boolean x:Key="ShouldExpandAll">True</x:Boolean>
    </scg:Dictionary>
  </sap:WorkflowViewStateService.ViewState>
  <Sequence DisplayName="Overall Sequence" sap:VirtualizedContainerService.HintSize="974,1065">
    <Sequence.Variables>
      <Variable x:TypeArguments="x:Boolean" Default="True" Name="PSRunInProcessPreference" />
    </Sequence.Variables>
    <sap:WorkflowViewStateService.ViewState>
      <scg:Dictionary x:TypeArguments="x:String, x:Object">
        <x:Boolean x:Key="IsExpanded">True</x:Boolean>
      </scg:Dictionary>
    </sap:WorkflowViewStateService.ViewState>
    <ForEach x:TypeArguments="x:String" DisplayName="Invoke method on each named service" sap:VirtualizedContainerService.HintSize="952,941" Values="[Services]">
      <ActivityAction x:TypeArguments="x:String">
        <ActivityAction.Argument>
          <DelegateInArgument x:TypeArguments="x:String" Name="systemServiceName" />
        </ActivityAction.Argument>
        <Flowchart sap:VirtualizedContainerService.HintSize="922,833">
          <Flowchart.Variables>
            <Variable x:TypeArguments="sma:PSDataCollection(sma:PSObject)" Default="[New PSDataCollection(Of PSObject)]" Name="SystemServices" />
            <Variable x:TypeArguments="x:Int32" Default="15" Name="MaxStatusRetryAttempts" />
            <Variable x:TypeArguments="x:Int32" Default="2" Name="RetrySleepSeconds" />
            <Variable x:TypeArguments="mmi:CimInstance" Name="ServiceObject" />
            <Variable x:TypeArguments="x:Int32" Default="0" Name="StatusRetryAttempts" />
            <Variable x:TypeArguments="x:Boolean" Name="ServiceChangeComplete" />
            <Variable x:TypeArguments="sma:PSDataCollection(sma:PSObject)" Name="systemService" />
          </Flowchart.Variables>
          <sap:WorkflowViewStateService.ViewState>
            <scg:Dictionary x:TypeArguments="x:String, x:Object">
              <x:Boolean x:Key="IsExpanded">False</x:Boolean>
              <av:Point x:Key="ShapeLocation">340,12.5</av:Point>
              <av:Size x:Key="ShapeSize">60,75</av:Size>
              <av:PointCollection x:Key="ConnectorLocation">370,87.5 370,114.5</av:PointCollection>
              <x:Double x:Key="Width">907.5</x:Double>
              <x:Double x:Key="Height">797.01230769230767</x:Double>
            </scg:Dictionary>
          </sap:WorkflowViewStateService.ViewState>
          <Flowchart.StartNode>
            <FlowStep x:Name="__ReferenceID1">
              <sap:WorkflowViewStateService.ViewState>
                <scg:Dictionary x:TypeArguments="x:String, x:Object">
                  <av:Point x:Key="ShapeLocation">263,114.5</av:Point>
                  <av:Size x:Key="ShapeSize">214,191</av:Size>
                  <av:PointCollection x:Key="ConnectorLocation">370,305.5 370,329</av:PointCollection>
                </scg:Dictionary>
              </sap:WorkflowViewStateService.ViewState>
              <mpa:Pipeline DisplayName="Invoke the requested method" sap:VirtualizedContainerService.HintSize="214,191" Result="[systemService]">
                <mpa:Pipeline.Activities>
                  <mpa:GetCimInstance DisplayName="Get the service object" sap:VirtualizedContainerService.HintSize="200,22" Query="[&quot;select * from Win32_Service where Name=&quot;&quot;&quot; + systemServiceName + &quot;&quot;&quot;&quot;]">
                    <mpa:GetCimInstance.Result>
                      <InOutArgument x:TypeArguments="sma:PSDataCollection(sma:PSObject)">
                        <VariableReference x:TypeArguments="sma:PSDataCollection(sma:PSObject)">
                          <VariableReference.Variable>
                            <Variable x:TypeArguments="sma:PSDataCollection(sma:PSObject)" Name="2b87e56e_4014_483b_a146_7fbf612d5277" />
                          </VariableReference.Variable>
                        </VariableReference>
                      </InOutArgument>
                    </mpa:GetCimInstance.Result>
                  </mpa:GetCimInstance>
                  <mpa:InvokeCimMethod DisplayName="do the invoke" sap:VirtualizedContainerService.HintSize="200,22" MethodName="[MethodName]" Result="[systemService]">
                    <mpa:InvokeCimMethod.Input>
                      <InArgument x:TypeArguments="sma:PSDataCollection(sma:PSObject)">
                        <VariableValue x:TypeArguments="sma:PSDataCollection(sma:PSObject)">
                          <VariableValue.Variable>
                            <Variable x:TypeArguments="sma:PSDataCollection(sma:PSObject)" Name="5285ecc1_6c01_465c_a834_e4eccbe74795" />
                          </VariableValue.Variable>
                        </VariableValue>
                      </InArgument>
                    </mpa:InvokeCimMethod.Input>
                  </mpa:InvokeCimMethod>
                </mpa:Pipeline.Activities>
              </mpa:Pipeline>
              <FlowStep.Next>
                <FlowStep x:Name="__ReferenceID0">
                  <sap:WorkflowViewStateService.ViewState>
                    <scg:Dictionary x:TypeArguments="x:String, x:Object">
                      <av:Point x:Key="ShapeLocation">270,329</av:Point>
                      <av:Size x:Key="ShapeSize">200,22</av:Size>
                      <av:PointCollection x:Key="ConnectorLocation">370,351 370,419</av:PointCollection>
                    </scg:Dictionary>
                  </sap:WorkflowViewStateService.ViewState>
                  <mpa:GetCimInstance DisplayName="Reread the service object" sap:VirtualizedContainerService.HintSize="200,22" Query="[&quot;select * from Win32_Service where Name=&quot;&quot;&quot; + systemServiceName + &quot;&quot;&quot;&quot;]" Result="[systemService]" />
                  <FlowStep.Next>
                    <FlowStep x:Name="__ReferenceID2">
                      <sap:WorkflowViewStateService.ViewState>
                        <scg:Dictionary x:TypeArguments="x:String, x:Object">
                          <av:Point x:Key="ShapeLocation">270,419</av:Point>
                          <av:Size x:Key="ShapeSize">200,22</av:Size>
                          <av:PointCollection x:Key="ConnectorLocation">370,441 370,471 370.5,471 370.5,496.5</av:PointCollection>
                        </scg:Dictionary>
                      </sap:WorkflowViewStateService.ViewState>
                      <mpua:SelectObject DisplayName="Emit name &amp; state properties" sap:VirtualizedContainerService.HintSize="200,22" Input="[systemService]" Property="[{&quot;Name&quot;, &quot;State&quot;}]" />
                      <FlowStep.Next>
                        <FlowDecision x:Name="__ReferenceID6" Condition="[systemService.Count &gt; 0]" DisplayName="Is state still Pending?">
                          <FlowDecision.True>
                            <FlowDecision x:Name="__ReferenceID4" Condition="[systemService(0).Properties(&quot;State&quot;).Value.ToString().Contains(&quot;Pending&quot;)]" DisplayName=" Is state still Pending?" sap:VirtualizedContainerService.HintSize="121,87">
                              <sap:WorkflowViewStateService.ViewState>
                                <scg:Dictionary x:TypeArguments="x:String, x:Object">
                                  <x:Boolean x:Key="IsExpanded">True</x:Boolean>
                                  <av:Point x:Key="ShapeLocation">310,496.5</av:Point>
                                  <av:Size x:Key="ShapeSize">121,87</av:Size>
                                  <av:PointCollection x:Key="TrueConnector">310,540 120,540 120,441</av:PointCollection>
                                  <av:PointCollection x:Key="FalseConnector">431,540 460,540 460,624.5 370,624.5 370,654.5</av:PointCollection>
                                </scg:Dictionary>
                              </sap:WorkflowViewStateService.ViewState>
                              <FlowDecision.True>
                                <FlowStep x:Name="__ReferenceID3">
                                  <sap:WorkflowViewStateService.ViewState>
                                    <scg:Dictionary x:TypeArguments="x:String, x:Object">
                                      <av:Point x:Key="ShapeLocation">20,419</av:Point>
                                      <av:Size x:Key="ShapeSize">200,22</av:Size>
                                      <av:PointCollection x:Key="ConnectorLocation">120,419 120,340 270,340</av:PointCollection>
                                    </scg:Dictionary>
                                  </sap:WorkflowViewStateService.ViewState>
                                  <Delay DisplayName="Wait 2 seconds" Duration="[New TimeSpan(0, 0, RetrySleepSeconds)]" sap:VirtualizedContainerService.HintSize="200,22" />
                                  <FlowStep.Next>
                                    <x:Reference>__ReferenceID0</x:Reference>
                                  </FlowStep.Next>
                                </FlowStep>
                              </FlowDecision.True>
                              <FlowDecision.False>
                                <FlowStep x:Name="__ReferenceID5">
                                  <sap:WorkflowViewStateService.ViewState>
                                    <scg:Dictionary x:TypeArguments="x:String, x:Object">
                                      <av:Point x:Key="ShapeLocation">270,654.5</av:Point>
                                      <av:Size x:Key="ShapeSize">200,51</av:Size>
                                    </scg:Dictionary>
                                  </sap:WorkflowViewStateService.ViewState>
                                  <Sequence DisplayName="Workflow Complete" sap:VirtualizedContainerService.HintSize="200,51">
                                    <sap:WorkflowViewStateService.ViewState>
                                      <scg:Dictionary x:TypeArguments="x:String, x:Object">
                                        <x:Boolean x:Key="IsExpanded">True</x:Boolean>
                                      </scg:Dictionary>
                                    </sap:WorkflowViewStateService.ViewState>
                                  </Sequence>
                                </FlowStep>
                              </FlowDecision.False>
                            </FlowDecision>
                          </FlowDecision.True>
                          <FlowDecision.False>
                            <FlowStep x:Name="__ReferenceID7">
                              <sap:WorkflowViewStateService.ViewState>
                                <scg:Dictionary x:TypeArguments="x:String, x:Object">
                                  <av:Point x:Key="ShapeLocation">270,654.5</av:Point>
                                  <av:Size x:Key="ShapeSize">200,51</av:Size>
                                </scg:Dictionary>
                              </sap:WorkflowViewStateService.ViewState>
                              <Sequence DisplayName="Workflow Complete" sap:VirtualizedContainerService.HintSize="200,51">
                                <sap:WorkflowViewStateService.ViewState>
                                  <scg:Dictionary x:TypeArguments="x:String, x:Object">
                                    <x:Boolean x:Key="IsExpanded">True</x:Boolean>
                                  </scg:Dictionary>
                                </sap:WorkflowViewStateService.ViewState>
                              </Sequence>
                            </FlowStep>
                          </FlowDecision.False>
                        </FlowDecision>
                      </FlowStep.Next>
                    </FlowStep>
                  </FlowStep.Next>
                </FlowStep>
              </FlowStep.Next>
            </FlowStep>
          </Flowchart.StartNode>
          <x:Reference>__ReferenceID1</x:Reference>
          <x:Reference>__ReferenceID0</x:Reference>
          <x:Reference>__ReferenceID2</x:Reference>
          <x:Reference>__ReferenceID3</x:Reference>
          <x:Reference>__ReferenceID4</x:Reference>
          <x:Reference>__ReferenceID5</x:Reference>
          <x:Reference>__ReferenceID6</x:Reference>
          <x:Reference>__ReferenceID7</x:Reference>
        </Flowchart>
      </ActivityAction>
    </ForEach>
  </Sequence>
</Activity>