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

Conditional Statement Help

jlittle
Participant

Conditional Statement Help

Would someone please take a look at the following code and validate it for me. It seems simple enough, but I keep getting errors when my WF hits this conditional:

//retrieve document type of the PBO
wt.doc.DocumentType docType = (((wt.doc.WTDocument)primaryBusinessObject).getDocType());

if (docType==wt.doc.DocumentType.toDocumentType("$$Technical Publication") )
result="SRP";
else
result="SRP";

I am trying to make a decision based on the WTDocument SubType and route accordingly.

Thanks,

James Little

Corning Cable Systems

CAD Administrator

5 REPLIES 5

Conditional Statement Help

It should be:

if (docType.equals(wt.doc.DocumentType.toDocumentType("$$Technical Publication")) )



Conditional Statement Help

For both conditions , the result routes to "SRP" .Please correct that also

Ramesh Kumar
Tata Consultancy Services

Conditional Statement Help


I realize both conditions point to the same route. At this point, I am just trying to resolve determining the document type associated with the PBO. Making the changes suggested by Mr. Welch did not correct the problem.

Is my first statement correct for determining the document type?

wt.doc.DocumentType docType = (((wt.doc.WTDocument)primaryBusinessObject).getDocType());

Thanks,

James

Rameshkumar Raja <rameshkumar.raja@tcs.com>


Rameshkumar Raja <rameshkumar.raja@tcs.com>
08/12/2009 01:17 AM
To
"Welch, Ronald P (US SSA)" <->
cc
James Little <james.little@corning.com>, "-" <->
Subject

Conditional Statement Help


I realize both conditions point to the same route. At this point, I am just trying to resolve determining the document type associated with the PBO. Making the changes suggested by Mr. Welch did not correct the problem.

Is my first statement correct for determining the document type?

wt.doc.DocumentType docType = (((wt.doc.WTDocument)primaryBusinessObject).getDocType());

Thanks,

James

Rameshkumar Raja <rameshkumar.raja@tcs.com>


Rameshkumar Raja <rameshkumar.raja@tcs.com>
08/12/2009 01:17 AM
To
"Welch, Ronald P (US SSA)" <->
cc
James Little <james.little@corning.com>, "-" <->
Subject

Conditional Statement Help



You can use this on any Typed object:



String docSoftType = wt.type.TypedUtilityServiceHelper.service.getExternalTypeIdentifier(primaryBusinessObject);





if ("mysofttypename".equals(docSoftType))

{

result = "dothis";

}

else

{

result="dothat";

}





HTH,

David DeMay



Polls

Windchill Customers

What browser do you most commonly use? (Chrome, Firefox, Edge Chromium, Internet Explorer 11, Safari, Other)

Announcements
Learn more about how we are using our browser poll here