<workflow wfd_version="1.0" critical="false" reporting="true" id="05cd2204-48f9-43ba-86b4-204fd9c57341" descriptor="%WFDESC%" startstep="step_1772544656897" name="Mantenimiento de Señalización - Armario de Relés" layoutCatalogName="1773151931961_main_catalog" secondaryLayoutCatalogName="1773151932474_second_catalog">
  <input>
    <param required="false" name="external_id" type="string"/>
  </input>
  <context>
    <param name="critical">false</param>
  </context>
  <rules>
    <rule _class=".RulePojo" id="menu_selection_377a1adf-b0df-4c14-b4b8-889c2b9eee39">
      <expression>#{event(MENU_SELECTION):command} == 'FW'</expression>
      <actions>
        <action _class=".ActionRefPojo" ref="menu_selection_377a1adf-b0df-4c14-b4b8-889c2b9eee39"/>
      </actions>
    </rule>
    <rule _class=".RulePojo" id="finish_workflow">
      <expression>1</expression>
      <actions>
        <action _class=".ActionRefPojo" ref="finish_workflow"/>
      </actions>
    </rule>
    <rule _class=".RulePojo" id="info_menu">
      <expression>#{event(MENU_SELECTION):command} == 'MENU' || #{event:command} == 'INFO'</expression>
      <actions>
        <action _class=".ActionRefPojo" ref="start_info"/>
      </actions>
    </rule>
    <rule _class=".RulePojo" id="auto_start">
      <expression>1</expression>
      <actions>
        <action _class=".ActionRefPojo" ref="start_camera"/>
      </actions>
    </rule>
    <rule _class=".RulePojo" id="attach_displayed_content">
      <expression>1</expression>
      <actions>
        <action _class=".ActionRefPojo" ref="resolve_context"/>
        <action _class=".ActionRefPojo" ref="attach_displayed_content"/>
      </actions>
    </rule>
  </rules>
  <actions>
    <start_workflow _class=".ActionPojo" id="start_info" wf="info_menu"/>
    <finish_workflow _class=".ActionPojo" id="finish_workflow"/>
    <setvar _class=".ActionPojo" id="resolve_context">
      <context_of>step</context_of>
      <context_update>
        <param name="displayed_title" type="string">#{what}</param>
        <param name="displayed_message" type="string">#{how}</param>
        <param name="displayed_message_2" type="string" descriptor="additional step description">#{with}</param>
        <param name="displayed_video_name" type="string" descriptor="URI of video in the step">#{video_name}</param>
        <param name="displayed_img" type="string" descriptor="URI of image in the step">#{img}</param>
      </context_update>
    </setvar>
    <action _class=".ActionPojo" id="attach_displayed_content" type="add_attachment">
      <param name="content" type="string">?{
                var localData = {};
                localData["displayed_title"] = context.displayed_title;
                localData["displayed_message"] = context.displayed_message;
                localData["displayed_message_2"] = context.displayed_message_2;
                localData["displayed_video_name"] = context.displayed_video_name;
                localData["displayed_img"] = context.displayed_img;
                JSON.stringify(localData)}?</param>
      <param name="type" type="string">displayed_content</param>
      <param name="override" type="bool">true</param>
    </action>
    <step_transition _class=".ActionPojo" id="menu_selection_377a1adf-b0df-4c14-b4b8-889c2b9eee39" to="#{menu_selection_377a1adf-b0df-4c14-b4b8-889c2b9eee39}"/>
  </actions>
  <steps>
    <step id="exit" descriptor="End" uitemplate="BLANK" debug_mode="false" persist="false" screen_lock_enabled="false">
      <states>
        <onresume>
          <rule _class=".RuleRefPojo" ref="attach_displayed_content"/>
          <rule _class=".RuleRefPojo" ref="finish_workflow"/>
        </onresume>
        <onevent>
          <rule _class=".RuleRefPojo" ref="info_menu"/>
        </onevent>
        <onleave>
          <rule _class=".RulePojo" id="rule_exit_setvar_prev_step_id_e9b56f15239e48eb8295df9f21602839_compiled_7ed4ecea">
            <expression>1</expression>
            <actions>
              <setvar _class=".ActionPojo" id="4f625506-d5fe-4a1f-bdb6-c9c789e166c7">
                <context_of>workflow</context_of>
                <context_update>
                  <param name="prev_step_id_e9b56f15239e48eb8295df9f21602839">exit</param>
                </context_update>
              </setvar>
            </actions>
          </rule>
        </onleave>
      </states>
    </step>
    <step id="step_1772544656897" descriptor="Información Inicial" uitemplate="step_1772544656897_CUSTOM" debug_mode="false" persist="false" screen_lock_enabled="false">
      <states>
        <onresume>
          <rule _class=".RuleRefPojo" ref="attach_displayed_content"/>
        </onresume>
        <onevent>
          <rule _class=".RuleRefPojo" ref="info_menu"/>
          <rule _class=".RuleRefPojo" ref="menu_selection_377a1adf-b0df-4c14-b4b8-889c2b9eee39"/>
        </onevent>
        <onleave>
          <rule _class=".RulePojo" id="rule_step_1772544656897_setvar_prev_step_id_e9b56f15239e48eb8295df9f21602839_compiled_2299b92d">
            <expression>1</expression>
            <actions>
              <setvar _class=".ActionPojo" id="89ad7e0f-20f6-4414-9863-e25aecb10bf2">
                <context_of>workflow</context_of>
                <context_update>
                  <param name="prev_step_id_e9b56f15239e48eb8295df9f21602839">step_1772544656897</param>
                </context_update>
              </setvar>
            </actions>
          </rule>
        </onleave>
      </states>
      <mapping>
        <ui_element name="WITH_TEXT">
          <param name="content" type="string">Extra</param>
        </ui_element>
        <ui_element name="MEDIA">
          <param name="content" type="string">#{video_name}</param>
        </ui_element>
        <ui_element name="WHAT_TEXT">
          <param name="content" type="string">Información Inicial</param>
        </ui_element>
        <ui_element name="IMAGE">
          <param name="content" type="string">#{img}</param>
          <param name="scale_type" type="string">#{scale_type}</param>
        </ui_element>
        <ui_element name="TOPIC">
          <param name="content" type="string">#{taskTopic}</param>
        </ui_element>
        <ui_element name="HOW_TEXT">
          <param name="content" type="string">Información requerida inicial</param>
        </ui_element>
        <ui_element name="PAGENR">
          <param name="content" type="string">#{pagenumber}</param>
        </ui_element>
        <ui_element name="MORE">
          <param name="menu_id">1</param>
        </ui_element>
        <ui_element name="FW">
          <param name="menu_id">0</param>
        </ui_element>
        <ui_element name="PAUSE_TASK">
          <param name="menu_id">4</param>
        </ui_element>
        <ui_element name="DOCUMENTATION">
          <param name="menu_id">2</param>
        </ui_element>
        <ui_element name="ASSIST">
          <param name="menu_id">3</param>
        </ui_element>
        <ui_element name="CANCEL_TASK">
          <param name="menu_id">5</param>
        </ui_element>
      </mapping>
      <context>
        <param name="how" type="string">Información requerida inicial</param>
        <param name="more_button_pause_task" type="bool">true</param>
        <param name="more_button_cancel_task" type="bool">true</param>
        <param name="with" type="string">Extra</param>
        <param name="video_name" type="string" descriptor="URI of video in the step"/>
        <param name="img" type="string">xai:/wf-editor/e71379d6-7009-4ff9-99f2-ac6446029cf3/logo+fcx.png?version=1</param>
        <param name="scale_type" type="string" descriptor="the scale type of image inside the step">FIT_CENTER</param>
        <param name="auto_play" type="bool">true</param>
        <param name="what" type="string">Información Inicial</param>
        <param name="taskTopic" type="string"/>
        <param name="pagenumber" type="string"/>
        <param name="more_button_assist" type="bool">true</param>
        <param name="more_button_documentation" type="bool">true</param>
        <param name="menu_selection_377a1adf-b0df-4c14-b4b8-889c2b9eee39" type="string">component_db492073-4201-49c0-b87b-c4cd2f8ab97f</param>
      </context>
      <handlers>
        <handler type="MoreButtonStepHandler"/>
      </handlers>
    </step>
    <step id="component_2aba7d4b-e9a7-495c-afa3-fa35732e74b8" descriptor="component_2aba7d4b-e9a7-495c-afa3-fa35732e74b8" uitemplate="BLANK" reporting="false">
      <states>
        <onenter>
          <rule _class=".RulePojo" id="rule_component_2aba7d4b-e9a7-495c-afa3-fa35732e74b8_setvar_target_step_compiled_9ab3b0b3">
            <expression>!(exists(#{restored}))</expression>
            <actions>
              <setvar _class=".ActionPojo" id="685be413-0cc8-4c5f-bb84-5db62fb94ac4">
                <context_of>step</context_of>
                <context_update>
                  <param name="target_step">None</param>
                </context_update>
              </setvar>
            </actions>
          </rule>
        </onenter>
        <onresume>
          <rule _class=".RulePojo" id="rule_component_2aba7d4b-e9a7-495c-afa3-fa35732e74b8_to_exit_compiled_469f98ed">
            <expression>(#{target_step} != 'None')</expression>
            <actions>
              <step_transition _class=".ActionPojo" id="265f26eb-90a5-45c3-a4fb-83c395ea5ab2" to="exit"/>
            </actions>
          </rule>
          <rule _class=".RulePojo" id="rule_component_2aba7d4b-e9a7-495c-afa3-fa35732e74b8_compiled_9c75db90">
            <expression>#{target_step} == 'None' &amp;&amp; (#{prev_step_id_e9b56f15239e48eb8295df9f21602839} == 'component_db492073-4201-49c0-b87b-c4cd2f8ab97f')</expression>
            <actions>
              <start_workflow _class=".ActionPojo" id="2878d6ca-9324-45c5-a2c5-98e92bcc8148" wf="component_2aba7d4b-e9a7-495c-afa3-fa35732e74b8">
                <output>
                  <param name="selected_button" type="string">#{wrapper_param_cf5b05f5a7fe4bba92d17f098734222a}</param>
                </output>
              </start_workflow>
              <setvar _class=".ActionPojo" id="e28aac11-3b1f-40cb-a257-cab5418de200">
                <context_of>step</context_of>
                <context_update>
                  <param name="target_step">Set</param>
                </context_update>
              </setvar>
            </actions>
          </rule>
          <rule _class=".RulePojo" id="rule_component_2aba7d4b-e9a7-495c-afa3-fa35732e74b8_compiled_7ecc69e4">
            <expression>#{target_step} == 'None' &amp;&amp; (!((exists(#{prev_step_id_e9b56f15239e48eb8295df9f21602839}) &amp;&amp; #{prev_step_id_e9b56f15239e48eb8295df9f21602839} == 'component_db492073-4201-49c0-b87b-c4cd2f8ab97f')))</expression>
            <actions>
              <start_workflow _class=".ActionPojo" id="6195d364-5c96-4903-9898-0ad00e04e50c" wf="component_2aba7d4b-e9a7-495c-afa3-fa35732e74b8"/>
              <setvar _class=".ActionPojo" id="7076bf73-43b4-4ecf-acdb-7c65a8fcb9ff">
                <context_of>step</context_of>
                <context_update>
                  <param name="target_step">Set</param>
                </context_update>
              </setvar>
            </actions>
          </rule>
        </onresume>
        <onleave>
          <rule _class=".RulePojo" id="rule_component_2aba7d4b-e9a7-495c-afa3-fa35732e74b8_setvar_prev_step_id_e9b56f15239e48eb8295df9f21602839_compiled_2ad6c78f">
            <expression>1</expression>
            <actions>
              <setvar _class=".ActionPojo" id="1a1bfedd-ea92-401d-ace1-fa149d50d0a7">
                <context_of>workflow</context_of>
                <context_update>
                  <param name="prev_step_id_e9b56f15239e48eb8295df9f21602839">component_2aba7d4b-e9a7-495c-afa3-fa35732e74b8</param>
                </context_update>
              </setvar>
            </actions>
          </rule>
        </onleave>
      </states>
      <mapping/>
      <context/>
    </step>
    <step id="component_db492073-4201-49c0-b87b-c4cd2f8ab97f" descriptor="component_db492073-4201-49c0-b87b-c4cd2f8ab97f" uitemplate="BLANK" reporting="false">
      <states>
        <onenter>
          <rule _class=".RulePojo" id="rule_component_db492073-4201-49c0-b87b-c4cd2f8ab97f_setvar_target_step_compiled_34a2b0d7">
            <expression>!(exists(#{restored}))</expression>
            <actions>
              <setvar _class=".ActionPojo" id="d7dd60f1-957b-4060-a3d8-adb079f14695">
                <context_of>step</context_of>
                <context_update>
                  <param name="target_step">None</param>
                </context_update>
              </setvar>
            </actions>
          </rule>
        </onenter>
        <onresume>
          <rule _class=".RulePojo" id="rule_component_db492073-4201-49c0-b87b-c4cd2f8ab97f_to_step_1772544656897_compiled_16adf820">
            <expression>#{target_step} != 'None' &amp;&amp; (((#{selected_button}=='RETURN')))</expression>
            <actions>
              <step_transition _class=".ActionPojo" id="8c96a73c-ce97-4a1e-a68a-01d7276a13f2" to="step_1772544656897"/>
            </actions>
          </rule>
          <rule _class=".RulePojo" id="rule_component_db492073-4201-49c0-b87b-c4cd2f8ab97f_to_component_2aba7d4b-e9a7-495c-afa3-fa35732e74b8_compiled_788f2b16">
            <expression>(#{target_step} != 'None') &amp;&amp; (!((exists(#{selected_button})) &amp;&amp; (((#{selected_button}=='RETURN')))))</expression>
            <actions>
              <step_transition _class=".ActionPojo" id="cf33dd54-0339-4d0a-95b7-ea6b7a9fd2b1" to="component_2aba7d4b-e9a7-495c-afa3-fa35732e74b8">
                <output>
                  <param name="wrapper_param_cf5b05f5a7fe4bba92d17f098734222a" type="string">#{selected_button}</param>
                </output>
              </step_transition>
            </actions>
          </rule>
          <rule _class=".RulePojo" id="rule_component_db492073-4201-49c0-b87b-c4cd2f8ab97f_compiled_0e016186">
            <expression>#{target_step} == 'None'</expression>
            <actions>
              <start_workflow _class=".ActionPojo" id="7d6f82b4-aa6b-45fc-82cc-4dc5f8d60a01" wf="component_db492073-4201-49c0-b87b-c4cd2f8ab97f"/>
              <setvar _class=".ActionPojo" id="0344c91c-db6f-4b04-b1fb-7ee24d61bfa8">
                <context_of>step</context_of>
                <context_update>
                  <param name="target_step">Set</param>
                </context_update>
              </setvar>
            </actions>
          </rule>
        </onresume>
        <onleave>
          <rule _class=".RulePojo" id="rule_component_db492073-4201-49c0-b87b-c4cd2f8ab97f_setvar_prev_step_id_e9b56f15239e48eb8295df9f21602839_compiled_560ad4c6">
            <expression>1</expression>
            <actions>
              <setvar _class=".ActionPojo" id="ee28a66a-7ffa-45cf-9c33-57f7b81f86b0">
                <context_of>workflow</context_of>
                <context_update>
                  <param name="prev_step_id_e9b56f15239e48eb8295df9f21602839">component_db492073-4201-49c0-b87b-c4cd2f8ab97f</param>
                </context_update>
              </setvar>
            </actions>
          </rule>
        </onleave>
      </states>
      <mapping/>
      <context/>
    </step>
  </steps>
</workflow>
