Comparing Two Variables in a Transition Condition

Hi,

Does anyone know of a way to compare the values of two variables within a condition of a transition.

What I'd like to do is hold up an automatic transition until two variable's values are equal to each other.

It doesn't seem to be a way to do this unfortunately... only to compare a single variable to a single value, then another single variable to another single value, etc.

Thanks.

SolidworksSolidworks Pdm enterprise Pdm
Answers 12
SF
SF 2014-04-09 Best Answer

what kind of variable are you talking about? Something limited to just a few potential options.

BD
BD 2014-04-09

I have variables in EPDM that are driven by check box selections made on our data card. The variables can therefore be set on (1) or off (0). I want to be able to set a transition condition such that one variable's value (0 or 1) matches another variable's value (0 or 1). Unfortunately, it looks like EPDM is only set up to set a condition such that a variable's value matches a specific value... not match another variable's value.

Hope that makes sense.

I am on track for a potential work-around using "or" conditions, but it's getting pretty complicated because I have to set up multiple conditions for each variable.

BD
BD 2014-04-09

So here's my work around, but it doesn't seem to be working...

I want conditions to be met if...

  • NoteEngCustoms = 1 AND RecEngCustoms = 1
  • OR: NoteEngCustoms = 0 AND RecEngCustoms = 0
  • OR: NoteFinance = 1 AND RecFinance = 1
  • OR: NoteFinance = 0 AND RecFinance = 0
  • etc...

Can anyone tell me if I set this up correctly? Like I said it doesn't seem to be working.

When I combine conditions like this, does EPDM read it like an "AND"?

Thanks.

comment imagecomment image
BD
BD 2014-04-10

Not sure if anyone cares, but it looks like I'm SOL... the problem with my work around is that EPDM has an "OR" condition, but not a specific "AND" condition. I can't group conditions like I want to in my last post without an "AND" condition...

  • NoteEngCustoms = 1 AND RecEngCustoms = 1 
  • OR: NoteEngCustoms = 0 AND RecEngCustoms = 0
  • OR: NoteFinance = 1 AND RecFinance = 1
  • OR: NoteFinance = 0 AND RecFinance = 0
  • etc...

Pretty frustrating they would think to put in an "OR" condition but not an "AND" condition

SF
SF 2014-04-10

I'm not sure I can help with your specific workflow as it stands, maybe it's worth taking a different direction??? Here's some examples of my workflow, since your image looks like the last steps in an ECR process. In my workflow, we have implementation tasks as the last step, the default value on the data card for those tasks is "+", as users sign off the plus is replaced with the date. So the transitions evaluate the variable as being equal to "+" or not. The "forward auto transition" uses the AND condition, and the "backward auto transition" using the OR condition. Again, this probably doesn't answer your problem but hopefully sparks an idea.

comment imagecomment imagecomment imagecomment imagecomment imagecomment image
BD
BD 2014-04-10

Thanks Corey... This was going to be my next step, trying to do someting with multiple transitions.

But it sure would be a whole lot cleaner to do it in one spot.

But thanks again... I'll let you know what I come up with.

AG
AG 2014-04-10

You can use Dispatch to compare two variables on a state change.

Arie

BD
BD 2014-04-10

Hmmm.... I was worried it might come to that. Unfortunately, although I'm familiar with SW VBA, I am fairly new to EPDM and have never used dispatch.

AG
AG 2014-04-10

This will get you started...

BD
BD 2014-04-10

Sweet... THANKS!

BD
BD 2014-04-10

Thanks for the help... although there wasn't the solution I was hoping for (an "AND" condition or ability to compare variables within a condition... possible enhancements?), I was able to get it working. Unfortunately, it did take half a day and doubling the size and complexity of my workflow.

This is for an ECO workflow. We have the ability to select who to send ECO notifications to, and we also want those people to acknowledge receipt of the ECO. On our data card we have checkboxes set up for each department to send notifications to (checkbox variable = 0 or 1), and also to acknowledge reciept of the notification (0 or 1). When all notifications have been acknowledged, the ECO is closed out.

I had to add a new section for the acknowledgements and I needed to set up three transitions for each state to compare the three different possibilites of variable combinations..

  • Notification variable and acknowledgement variable = 0 (no notification sent, no acknowledgement... move to next state)
  • Notification variable = 1 and acknowledgement variable = 0 (notification sent but not acknowledged... still waiting, try again)
  • Notification variable = 1 and acknowledgement variable = 1 (notification sent and acknowldeged... move to the next state)

Thanks again for the help!

comment imagecomment image
ST
ST 2017-06-09

  I'd be interested in seeing a bit more detail on what you have for conditions, actions and notifications. I have a similar workflow I'm doing, checkbox's to indicate which departments are affected, then trying to set it up so only those affected get the notification and system only expects approval or acceptance from those groups.