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

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Conditional Statement Help

jlittle
7-Bedrock

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
rwelch
10-Marble
(To:jlittle)

It should be:

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



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

Ramesh Kumar
Tata Consultancy Services
jlittle
7-Bedrock
(To:jlittle)


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
jlittle
7-Bedrock
(To:jlittle)


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
ddemay
7-Bedrock
(To:jlittle)



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



Announcements


Top Tags