Publish PDFs to Fusion Lifecycle

Few weeks ago, we published an article about using powerGate to connect Vault to Fusion Lifecycle. It looks like we hit an interesting topic, so today I’d like to show you how to publish your Vault CAD files to Fusion Lifecycle as PDF files. For this purpose, we will use powerJobs and powerGate.

This short animation shows you how this works. You’ll see the drawing gets released in Vault, the Job Processor with powerJobs picks up the task and finally, we see in Fusion Lifecycle, that a new item has been created with the part number and title of our drawing and the PDF of the drawing have been attached to the Fusion Lifecycle item.

In order to get this done, we need two things: a powerGate plugin for Fusion Lifecycle, and a job for powerJobs. At the end of this article, you will find the links to both.

We worked on the Fusion Lifecycle plugin for powerGate and implemented support for the V3 API. We also introduced the 3-legged Forge authentication, so that you don’t have to save your username and password in the powerJobs script anymore. Instead, we have a little login window, which has to be started one time on the machine where you have powerGate Server running. The dialog will ask you to login with your Autodesk ID and then to provide access to the “powerGate FLC” app. Doing so, powerGate can now talk on your behalf with Fusion Lifecycle. By connecting, we received a so-called refresh token, which helps for reconnect on restart. The token has a lifespan for 14 days and refreshed on each use. This way, you just have to authorizes powerGate server once, and he handles the reconnect.

The job is pretty simple. It’s the standard PDF job, except that it creates a Fusion Lifecycle item and then uploads the PDF to such item. You just have to provide a workspace ID (at the top of the script) in which the item shall be created. In order to execute the job, just add a custom job typeto your preferred lifecycle transition. Next time you change the state, the job will be queued, and you will find the PDF in Fusion Lifecycle – that simple!

If you like to try this out yourself, you need powerGate server and client, powerJobs, and the powerGate Server plugin for Fusion Lifecycle.

  1. Install the powerGate Server plugin: The plugin it’s a ZIP file, and the content shall be copied into the powerGate Server plugin folder under C:\ProgramData\coolOrange\powerGateServer\Plugins. So, you will have then a folder called C:\ProgramData\coolOrange\powerGateServer\Plugins\FusionLifecycle which contains several DLLs and other stuff.
  2. Login to Forge: Before you start the powerGate server, you need to grant permission to powerGate to connect on your behalf to Fusion Lifecycle. In the plugin folder, you’ll find a sub folder called Login Manager (C:\ProgramData\coolOrange\powerGateServer\Plugins\FusionLifecycle\LoginManager). Start the ForgeLoginManager.exe and follow the instructions. This is how it could look like:
  3. ReStart powerGate Server: Once this operation is completed, you can start/restart the powerGate Server. You should find an icon in your tray (right click, stop, start) or look for the powerGate System trayin your start menu.
  4. Install the powerJobs job: take the Job from the GitHub page and save it to the powerJobs Jobs folder C:\ProgramData\coolOrange\powerJobs\Jobs.
  5. Configure the job on your preferred lifecycle transition: go in to the Vault Settings and add the name of the job (PublishPdfAndUploadToFlc) to the transition. Next time a file runs through this transition, the job will be queued.

There are two little things that you have now to configure: the name of your Fusion Lifecycle tenant, and the workspace in which you like to create the items and upload the PDF.

  1. Configure the FL tenant: in the folder C:\ProgramData\coolOrange\powerGateServer\Plugins\fusionLifecycle you’ll find the file fusionLifecycle.dll.config. Open it with a text editor. At the very end, you’ll find the entry <add key=”FlcTenant” value=”coolorange”/>. Change the valueto the name of your tenant, save the file and restart the powerGate server.
  2. Configure the workspace you like to use: open the powerJobs job located under C:\ProgramData\coolOrange\powerJobs\Jobs with an editor (i.e. the PowerShell ISE). At the top, you’ll find the variable $powerGateServerwhich is the computer name of your powerGate Server. If all is installed locally, then localhostwill do.
    Then you’ll find a variable called $WorkspaceId. Set the workspace ID of your choice.

Now it’s time to try it out. Go in Vault, change the state of an Inventor drawing, let powerJobs run, and see whether you have the item and PDF in Fusion Lifecycle.

This is just the beginning. We will provide more stuff, like interacting with Vault events, or integrate with Data Standard, in the next weeks. So, have fun and stay tuned!










This entry was posted in Forge, Fusion Lifecycle, powerJobs, Vault-ERP connection. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s