THE INFORMATION IN THIS ARTICLE APPLIES TO:
- version 6.5 and later
QUESTION
How do I use the COM API to copy (duplicate) Advanced Workflows or import existing Workflow files (.aml)?
ANSWER
To copy and import workflows using the COM API, you can to use the Site methods AddAdvancedWorkflow and GetAdvancedWorkflowParams.
MORE INFORMATION
Review the examples below, or download the attached examples (scroll to the bottom of page for the attachment). Don’t forget to change your admin login credentials in the script and point to the correct Site index (set to Site ‘0’ by default, meaning the first Site created in EFT).
(You can also copy and import AWE workflows in the EFT administration interface.)
Copy Workflow:
' INBOUND parameters {{{ ' Get CISite object {{{ set objSites = objEFTServer.Sites ' Get source AW task script content {{{ ' Get source AW task parameters by index ' Get source AW task script content ' Copy AW Task {{{ ' Set new AW task name ' Set script content for new AW task ' Add new AW task to EFT ' }}} Copy AW Task MsgBox "Done." |
Import Workflow:
' INBOUND parameters {{{ ' EFT AW task name for imported script strServer = "localhost" ' Read outside script contents {{{ strFileContents = objReadFile.ReadAll objReadFile.close Set objFSO = Nothing ' Get CISite object {{{ set objSites = objEFTServer.Sites ' Add AW Task to EFT server {{{ objSite.AddAdvancedWorkflow(objAWParams) MsgBox "Done." |