Details
-
Feature
-
Status: Released (View Workflow)
-
Major
-
Resolution: Fixed
-
2.0.0
-
None
Description
Current Situation
- YADE File Transfer configurations are managed from the JOC Cockpit Configuration view. Users can choose new tabs to create individual transfer configurations that are stored in XML format with the JS7 database.
- The JOC Cockpit GUI offers download capabilities for the resulting XML configuration file. The user has to transfer the XML file to the respective Agent to make the File Transfer configuration available. It is considered a tedious approach to keep the File Transfer configuration in JOC Cockpit and the XML configuration file with Agents in sync.
Desired Behavior
- YADE File Transfer Configurations should be deployable to Agents by a single button operation similar to workflows and other objects.
- To this purpose the YADE File Transfer configuration can be assigned a Job Resource.
- In the JOC Cockpit GUI users can select a single Job Resource that is assigned the XML configuration of the current tab.
- For the selected Job Resource a variable is created from the name of the tab and the content of the XML configuration.
- The Job Resource can be assigned to any workflows or jobs that perform YADE File Transfer operations and is deployed to Agents that are assigned a job that holds a reference to the Job Resource.
- The respective YADE job has access to the YADE File Transfer configuration from a temporary file:
- The job makes use of an environment variable that returns the path to the temporary XML file.
- The environment variable assignment makes use of the fileContent() function introduced with
JS-1972.
Examples
- Example for Job Resource yade-xml holding a variable yadeXml with the XML File Transfer configuration
{ "arguments": { "yadeXml": "'<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<Configurations/>\n'" }, "env": { "YADE_XML": "\"fileContent( $js7Unique +++ 'yade.xml', $yadeXml )\"" } }
- Example for Job Script receiving the path to the XML configuration file directly from the Job Resource's environment variable YADE_XML:
#!/bin/bash $YADE_BIN -settings $YADE_XML \ -profile some-transfer
- Alternative example for Job Environment Variable populated from the Job Resource Variable yadeXml
YADE_XML = fileContent( $js7Unique +++ 'yade.xml', $yadeXml )
- Alternative example for Job Environment Variable populated from the yade-xml Job Resource and the yadeXml variable
YADE_XML = fileContent( $js7Unique +++ 'yade.xml', jobResourceVariable( 'yade-xml', 'yadeXml' ) )