title: Custom workflow editor to C#
body: <p>In my free time, I am trying to make my home automation project "easily" customizable. So that I can explain my kids how things work.</p>
  
  <p>Current state of the project:
  I got devices (arduino's) that serve a function, like controlling a LED or locking and unlocking doors.</p>
  
  <p>These devices communicate throught a MQTT Broker with my desktop client that is running a C# program.</p>
  
  <p>Every device has a uniquid ID (MACAddress) and a set of functions: LED on, LED off, etc.</p>
  
  <p>I am creating a XML File that consists of every device in the network. Looking like this:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?xml version="1.0"?&gt;
  &lt;DeviceList&gt;
      &lt;Device&gt;
          &lt;FriendlyName&gt;LockFrontdoor&lt;/FriendlyName&gt;
          &lt;Uid&gt;D1-56-D4-93-94-EC&lt;/Uid&gt;
          &lt;ControllerType&gt;Doorlock&lt;/ControllerType&gt;
          &lt;ControlList&gt;
              &lt;Control&gt;
                  &lt;Name&gt;LockOn&lt;/Name&gt;
                  &lt;Command&gt;/Lock/On&lt;/Command&gt;
              &lt;/Control&gt;
              &lt;Control&gt;
                  &lt;Name&gt;LockOff&lt;/Name&gt;
                  &lt;Command&gt;/Lock/Off&lt;/Command&gt;
              &lt;/Control&gt;
              &lt;Control&gt;
                  &lt;Name&gt;getLockState&lt;/Name&gt;
                  &lt;Command&gt;/Lock/getState&lt;/Command&gt;
              &lt;/Control&gt;
              &lt;Control&gt;
                  &lt;Name&gt;getDoorState&lt;/Name&gt;
                  &lt;Command&gt;/Door/getState&lt;/Command&gt;
              &lt;/Control&gt;
              &lt;Control&gt;
                  &lt;Name&gt;getDeviceState&lt;/Name&gt;
                  &lt;Command&gt;/getState&lt;/Command&gt;
              &lt;/Control&gt;
          &lt;/ControlList&gt;
          &lt;EventList&gt;
              &lt;Event&gt;
                  &lt;Name&gt;Disconnected&lt;/Name&gt;
                  &lt;Command&gt;/Disconnected&lt;/Command&gt;
              &lt;/Event&gt;
              &lt;Event&gt;
                  &lt;Name&gt;Connected&lt;/Name&gt;
                  &lt;Command&gt;/Connected&lt;/Command&gt;
              &lt;/Event&gt;
              &lt;Event&gt;
                  &lt;Name&gt;LockStateOn&lt;/Name&gt;
                  &lt;Command&gt;/Lockstate/On&lt;/Command&gt;
              &lt;/Event&gt;
              &lt;Event&gt;
                  &lt;Name&gt;LockStateOff&lt;/Name&gt;
                  &lt;Command&gt;/Lockstate/Off&lt;/Command&gt;
              &lt;/Event&gt;
              &lt;Event&gt;
                  &lt;Name&gt;DoorOpen&lt;/Name&gt;
                  &lt;Command&gt;/Doorstate/Open&lt;/Command&gt;
              &lt;/Event&gt;
              &lt;Event&gt;
                  &lt;Name&gt;DoorClosed&lt;/Name&gt;
                  &lt;Command&gt;/Doorstate/Closed&lt;/Command&gt;
              &lt;/Event&gt;
          &lt;/EventList&gt;
      &lt;/Device&gt;
      &lt;Device&gt;
          &lt;FriendlyName&gt;LightFrontdoor&lt;/FriendlyName&gt;
          &lt;Uid&gt;89-C9-7C-D8-B5-34&lt;/Uid&gt;
          &lt;ControllerType&gt;Led&lt;/ControllerType&gt;
          &lt;ControlList&gt;
              &lt;Control&gt;
                  &lt;Name&gt;On&lt;/Name&gt;
                  &lt;Command&gt;/LED/On&lt;/Command&gt;
              &lt;/Control&gt;
              &lt;Control&gt;
                  &lt;Name&gt;Off&lt;/Name&gt;
                  &lt;Command&gt;/LED/Off&lt;/Command&gt;
              &lt;/Control&gt;
              &lt;Control&gt;
                  &lt;Name&gt;Blink&lt;/Name&gt;
                  &lt;Command&gt;/LED/Blink&lt;/Command&gt;
              &lt;/Control&gt;
              &lt;Control&gt;
                  &lt;Name&gt;Color&lt;/Name&gt;
                  &lt;Command&gt;/LED/Color/1-255,1-255,1-255&lt;/Command&gt;
              &lt;/Control&gt;
              &lt;Control&gt;
                  &lt;Name&gt;Intensity&lt;/Name&gt;
                  &lt;Command&gt;/LED/Intensity/1-255&lt;/Command&gt;
              &lt;/Control&gt;
              &lt;Control&gt;
                  &lt;Name&gt;getState&lt;/Name&gt;
                  &lt;Command&gt;/LED/getState&lt;/Command&gt;
              &lt;/Control&gt;
              &lt;Control&gt;
                  &lt;Name&gt;getDeviceState&lt;/Name&gt;
                  &lt;Command&gt;/getState&lt;/Command&gt;
              &lt;/Control&gt;
          &lt;/ControlList&gt;
          &lt;EventList&gt;
              &lt;Event&gt;
                  &lt;Name&gt;Disconnected&lt;/Name&gt;
                  &lt;Command&gt;/Disconnected&lt;/Command&gt;
              &lt;/Event&gt;
              &lt;Event&gt;
                  &lt;Name&gt;Connected&lt;/Name&gt;
                  &lt;Command&gt;/Connected&lt;/Command&gt;
              &lt;/Event&gt;
              &lt;Event&gt;
                  &lt;Name&gt;LedStateOn&lt;/Name&gt;
                  &lt;Command&gt;/LedState/On&lt;/Command&gt;
              &lt;/Event&gt;
              &lt;Event&gt;
                  &lt;Name&gt;LedStateOff&lt;/Name&gt;
                  &lt;Command&gt;/LedState/Off&lt;/Command&gt;
              &lt;/Event&gt;
              &lt;Event&gt;
                  &lt;Name&gt;LedStateBlink&lt;/Name&gt;
                  &lt;Command&gt;/LedState/Blink&lt;/Command&gt;
              &lt;/Event&gt;
          &lt;/EventList&gt;
      &lt;/Device&gt;
      &lt;Device&gt;
          &lt;FriendlyName&gt;SpeakerFrontDoor&lt;/FriendlyName&gt;
          &lt;Uid&gt;F8-87-66-D3-81-E0&lt;/Uid&gt;
          &lt;ControllerType&gt;Audio&lt;/ControllerType&gt;
          &lt;ControlList&gt;
              &lt;Control&gt;
                  &lt;Name&gt;PlaySound1&lt;/Name&gt;
                  &lt;Command&gt;/Audio/PlaySound1&lt;/Command&gt;
              &lt;/Control&gt;
              &lt;Control&gt;
                  &lt;Name&gt;PlaySound2&lt;/Name&gt;
                  &lt;Command&gt;/Audio/PlaySound2&lt;/Command&gt;
              &lt;/Control&gt;
              &lt;Control&gt;
                  &lt;Name&gt;getState&lt;/Name&gt;
                  &lt;Command&gt;/Audio/getState&lt;/Command&gt;
              &lt;/Control&gt;
              &lt;Control&gt;
                  &lt;Name&gt;getDeviceState&lt;/Name&gt;
                  &lt;Command&gt;/getState&lt;/Command&gt;
              &lt;/Control&gt;
          &lt;/ControlList&gt;
          &lt;EventList&gt;
              &lt;Event&gt;
                  &lt;Name&gt;Disconnected&lt;/Name&gt;
                  &lt;Command&gt;/Disconnected&lt;/Command&gt;
              &lt;/Event&gt;
              &lt;Event&gt;
                  &lt;Name&gt;Connected&lt;/Name&gt;
                  &lt;Command&gt;/Connected&lt;/Command&gt;
              &lt;/Event&gt;
              &lt;Event&gt;
                  &lt;Name&gt;SoundStatePlaying&lt;/Name&gt;
                  &lt;Command&gt;/Audio/On&lt;/Command&gt;
              &lt;/Event&gt;
              &lt;Event&gt;
                  &lt;Name&gt;SoundStateNotPlaying&lt;/Name&gt;
                  &lt;Command&gt;/Audio/Off&lt;/Command&gt;
              &lt;/Event&gt;
          &lt;/EventList&gt;
      &lt;/Device&gt;
  &lt;/DeviceList&gt;
      </code></pre>
  </div>
  </div>
  </p>
  
  <p>I also created a parralel sequence (Example):
  <a href="https://i.stack.imgur.com/QNt6Q.png" rel="nofollow noreferrer">UML Activity Diagram for the automation project</a></p>
  
  <p>Now what I want to do, is create an editor that can import my XML and where you can create/edit the UML and export this UML in a format that I can import in my C# client to work with the devices.</p>
  
  <p>I know this is probably really difficult, but I am not sure where to start. Is there any software that already can do this for a normal price? Or is there a way to do this easily?</p>
  
  <p>I have searched on Google and found <a href="https://workflowengine.io" rel="nofollow noreferrer">https://workflowengine.io</a> which seems a perfect solution. However, I would need to pay $5,000 which I can't at the moment. I do have enough free time though.</p>
  
  <p>So, what would be a good approach to create this? Or is there a framework or software that already does this?</p>