cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Sync Robot Syntax? (WC 9)

sdrzewiczewski
10-Marble

Sync Robot Syntax? (WC 9)

I'm trying to do a "Synchronize On: Object Event"

Windchill Object: wf variable promotionNotice that is grabbed from a number input from a user.

Event: STATE CHANGE

Initial Expression and Routing Expression are the same:


if (promotionNotice.getLifeCycleState().equals (wt.lifecycle.State.toState("APPROVED"))){
result="Approved";
} else if (promotionNotice.getLifeCycleState().equals (wt.lifecycle.State.toState("REJECTED"))){
result="Rejected";
} else {
result=null;
}


If the Promotion Notice is already at Approved or Rejected the code works, but if it's at a different state, say Under Review and eventually moves to Approved the Synch Robot does not fire.

I must be missing something.

Looking at the help example they have a line of code


wt.doc.WTDocument targetObject = (wt.doc.WTDocument) ((wt.events.KeyedEvent) event).getEventTarget();


But this is for a different type of Synch Robot according to

https://www.ptc.com/appserver/cs/view/solution.jsp?n=144818

Any ideas would be appreciated.

Thx,

Steve D.

1 REPLY 1

Probably a bit late for Stephen Drzewiczewski‌ but for anyone else that runs into the same issue...

Solved (WC 10.2) by starting the expression with result = null as below

SyncBot.jpg

Announcements


Top Tags