How to set variable only on first time through workflow

I'm trying to set a variable on a transition in my workflow, but I'd like it to only be 'triggered' on the first time through the workflow. In other words, once this variable gets added to the file on the first time through, the next time through this variable will not be over-written. Please let me know if there is any tricks or simple ways to do this that I may have over looked.

SolidworksSolidworks Pdm enterprise Pdm
Answers 5
EN
EN 2015-04-29 Best Answer

use DISPATCH to check the value of the variable..

Look at JUMP and SET VARIABLE command under DISPATCH

AP
AP 2015-04-29

Also you can use a transition only for testing variable value.

MD
MD 2015-04-29

In your workflow have an initial state with an automatic transition that has the action to set the variable value. Create the rest of the workflow so there is no transition back to the initial state.

SF
SF 2015-04-29

These are great suggestions. I wasn't aware of the dispatch feature, so this looks to be an interesting solution. Modifying the workflow to have a separate initial state may work well too. Thanks!!

AV
AV 2015-04-29

You can also create a Duplicate Transition between States (same name), then you can filter which files go thru them using Transition conditions, based on that Variable (blank vs not blank)