Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Before Creating a Workflow, you first need to add a Workflow host script language type. For instructions on adding a new language type refer to Adding a Host Script Language TypePrinting to file

Export the context of an object

This example shows how to to export the context of an object as a JSON structured file. 

Adding the script

  1. Create a language type called ps workflow, set the file extension to ps1, set the command to PowerShell -ExecutionPolicy Bypass -File "$SCRIPT_NAME$" and assign it a Workflow category.
    Image Added
  2. Add a new Metadata Object Type called Print Context and set the type to Host Script.
    Image Added
  3. In the configuration window, set the type to ps workflow script, set the appropriate Owner and Connection Name for your data.
    Image Added
  4. The new script should appear on the Host Script node.
    Image Added
  5. Right click on Print Context and select Edit the Script. This will open the script on a new tab.
  6. On the edit script tab enter the following code:

Running the Script

To run the script, right click on an object, go to Workflows, and select Print Context.
Image Added

Verify the script ran successfully.
Image Added

To check the output files, go the temp folderExporting DDL