Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagexml
titleStart an external Shell Simulation by Executing External Script
linenumberstrue
<Action Name="startSimulatorAcStartSimulatorAction" Documentation="Start the simulator">
  <Workflow Limit="1" Live="1" Timeout="-1">
    <Task name="Main">
      <StartOsWindows>StartProcess.exe cmd.exe "/K c:\Users\Dev\Documents\atomiton\bitbucket\tqlsimulator\build\install\TQLSimulator\bin\TQLSimulator.bat local
        -runAsFleetEventsGen eventOptions=10"</StartOsWindows>
      <StartOsUnix>bash config/startupscript.sh</StartOsUnix>
      <StartOsMac>[:CmdOsUnix:]</StartOsMac>
      <StopOsWindows>TaskKill.exe /PID [%:Output.ActionArgument.currentSimulatorState/Known/text():%]</StopOsWindows>
      <StopOsUnix>kill [%:Output.ActionArgument.currentSimulatorState/Known/text():%]</StopOsUnix>
      <StopOsMac>[:CmdOsUnix:]</StopOsMac>
      <Output<Event name="ActionArgumentArgument" as="ActionArgument"/>
      <Invoke name="startSimulatorAcInvokeScript" waitFor="ActionArgument" skip-if="[%:Output.ActionArgument.currentSimulatorState/starts-with(Value, 'off'):%]"
        execute="[:Start[:OsTag:]:]">
      </Invoke>
      <Output name="ActionResult">
        <Value>
          <currentSimulatorState>
            [%:Invoke/startSimulatorAcInvokeScript/Message/Value/text():%]
          </currentSimulatorState>
        </Value>
      </Output>
      <Invoke name="stopSimulatorAc" waitFor="ActionArgument" skip-if="[%:Output.ActionArgument.currentSimulatorState/starts-with(Value, 'on'):%]"
        execute="[:Stop[:OsTag:]:]">
      </Invoke>
    </Task>
  </Workflow>
</Action>

...