PLM 360 | Automating Reports by Workflow Transition ID

Ok, so you might remember how I noted that I wasn’t coding anymore. You might also remember how we said you could use PLM 360 with no programming experience. Both of these statements are true….

However, when you want your workflow to sing, some coding might just be required.

Workflow Transition

So I have this workflow that looks something like this:

It might look a bit intimidating, but it’s shouldn’t. It was quite easy to setup, and the benefits in doing so are that the exact steps that you and I use in our day to day tasks can be implemented here, and can be used to automate things that we know need to occur along the way.

The key in this example is to get the Transition ID from the workflow. Here I picked this transition and hovered. the ID will show in a pop-up.

Automation

The automation I used here is accomplished in a single script that is called from various steps in the workflow. Each transition has a specific ID, and these can be accessed and queried. Below is a script that manages the reporting item that I use. The script creates a new report document each time I pass through specific steps in my workflow. Various information is passed along about the step, including title, date, and what analysis path I am will need to report on when the results are back.

Note: The reason I have created the report now is so that the setup parameters can be logged before the solving takes place. If there is a crash, I know exactly what setup parameters were implemented just prior.

The script goes so far as to add dated notes for each significant transition, along with the path specifics. If I need to jot down some details along the way, a related note is already started and waiting for more info.

Notice the process:

First we extract the latest workflow action, and store it in a variable.

var Workflow = item.workflowActions[0];

Then we can test which path is the one for this transition ID.

if ( Workflow.transition.transitionID == 360){ then make me a new report } ….

At the bottom of the example you can see the createNewItem() function used to spawn the new report, along with all the information to fill in portions of that report.

Need More Help?

This type of automation can make PLM 360 more intuitive and natural. Keep checking our Management section for more information and tips.