Package: orquestaconvert
orquestaconvertConverts Mistral workflows into Orquesta workflowsUsageGetting StartedThe script automatically sets up avirtualenv(if it doesn't exist) that contains all of the necessary depedencies to run.Simply run the command for the first time and everything will get setup for you:gitclonehttps://github.com/EncoreTechnologies/orquestaconvert.gitcdorquestaconvert
./bin/orquestaconvert.sh--helporquestaconvert.sh- convert a single workflow and print to stdoutYou must specify one or more workflow YAML files to convert as the last arguments to the script.There are also some options you can use:-e <type>- Type of expressions (YAQL or Jinja) to use when inserting new expressions (such as task transitions in thewhenclause)--force- Forces the script to convert and print the workflow even if it does not successfully validate against the Orquesta YAML schema.--validate- Runs just the validation portion of the script, very useful to validate workflows you partially converted with--forcethen finished conversion by hand.ExamplesConvert a single workflowConvert thenasa_apod_twitter_post.yamlworkflow from Mistral to Orquesta, using Jinja expressions (the default) in task transition conditions../bin/orquestaconvert.sh./tests/fixtures/mistral/nasa_apod_twitter_post.yamlConvert a workflow, output YAQL expressionsConvert the workflow, using YAQL expressions for new task transition conditions, and skips Orquesta workflow validation. Note that this may generate a workflow that isneithera valid Mistralnora valid Orquesta workflow../bin/orquestaconvert.sh-eyaql--force./tests/fixtures/mistral/nasa_apod_twitter_post.yamlValidate an Orquesta workflowRun Orquesta YAML schema validation on the file. Returns 0 on successful validation, nonzero on unsuccessful validation. Also use the--verboseoption to explitly print the validation results for the file../bin/orquestaconvert.sh--validate./tests/fixtures/orquesta/nasa_apod_twitter_post.yamlorquestaconvert-pack.sh- convert all Mistral workflows in a packThis script scans a pack for all action metadata files and attempts to convert all Mistral workflows to Orquesta and/or validates all Orquesta workflows in a pack using theorquestaconvert.shscript. This script passes all unrecognized arguments toorquestaconvert.sh, so all actions you can do on one workflow with that script, you can do to the entire pack by using this script.You must either run this command from the base directory of a pack or you must specify the directory that contains action metadata files with the--actions-diroption.Recognized options are:--list-workflows <type>- List all workflows of the specified type (must either beaction-chainfor ActionChain,mistral-v2for Mistral, ororquestaororchestrafor Orquesta workflows)--actions-dir <dir>- Specifies the directory to scan and convertExamplesConvert all workflows in a packAttempts to convert all workflows from Mistral to Orquesta, using Jinja expressions in new task transitions (Jinja is the default)../bin/orquestaconvert-pack.shList Mistral workflows in a packLists remaining Mistral workflows../bin/orquestaconvert-pack.sh--list-workflowsmistral-v2Convert all workflows in a pack, outputting YAQL expressionsConverts all Mistral workflows (using YAQL expressions when generating task transition conditions) inmypack/actionsto Orquesta and skips validation. Note that using this option may create workflows that areneithervalid as MistralnorOrquesta workflows../bin/orquestaconvert-pack.sh--expressionsyaql--force--action-dirmypack/actionsValidate all Orquesta workflows in a packExplicitly rints the validation results for all Orquesta workflows../bin/orquestaconvert-pack.sh--validate--verboseFeaturesConvertsdirectMistral Workflows into Orquesta Workflows (general structure)Handlesinput,output,tasksFor each task,action,input,publish,on-success,on-error, andon-completeare all convertedConvertssimpleJinja and YAQL expressionsConvertstask(),st2kv,_.xxx/$.xxx, etc in Jinja and YAQL expressionsConvertswith-itemsandconcurrencyattributesConverts mostretryattributes, includingcontinue-onandsimplebreak-onexpressionsLimitationsDoes not convert{% %}Jinja expressionsDoes not convert complex Jinja / YAQL expressionsDoes not convertreversetype workflowsDoes not convert workbooks (multiple workflows in the same fileDoes not converttask('xxx')references to non-local tasks, the current task is always assumed.Does not convert workflows with anoutput-on-errorstanzaDoes not convert workflows if the tasks contain one or more of the following attributeskeep-resultpause-beforesafe-reruntargettimeoutwait-afterwait-beforeworkflow