Solved
How to get the view of the WTPart in workflow ?
Hi,
I want to get the view of the WTPart in workflow to compare if it is "Design" or "manufacturing".
I used below code in workflow execute expression robot.
====
if (primaryBusinessObject instanceof wt.part.WTPart) {
wt.part.WTPart part = (wt.part.WTPart) primaryBusinessObject;
wt.vc.views.View view = (wt.vc.views.View) part.getView().getObject();
if(view != null && view.equals("Design")){
result = "Go";
}else{
result = "NoGo";
}
====
On syntax check it work,
However, if i add workflow variable i got below error on syntax check.
===
Checking Syntax...
warning: Supported source version 'RELEASE_7' from annotation processor 'com.microsoft.azure.management.apigeneration.LangDefinitionProcessor' less than -source '1.8'
WfExpression_1315495121.java:129: error: variable view is already defined in method executemethod_1(Object[],Object[])
wt.vc.views.View view = (wt.vc.views.View) part.getView().getObject();
^
Note: WfExpression_1315495121.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
1 warning
Syntax check complete.
====
Can someone please guide me ?




