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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Will the below code cause the workflow to get aborted or terminated?

jfrancis
4-Participant

Will the below code cause the workflow to get aborted or terminated?

I was trying to have a look at the Routing Expression of a workflow and stumbled upon a Catch(throwable t).An overview study about this sort of catch block is not recommended. Can someone help me understand the instances when this code will not work properly.

wt.maturity.PromotionNotice pn = (wt.maturity.PromotionNotice)primaryBusinessObject;

try

{

wt.util.WTProperties props = wt.util.WTProperties.getLocalProperties();

VERBOSE = props.getProperty("wt.maturity.verbose",VERBOSE);

}

catch( Throwable t )

{

}

try

{

     wt.maturity.MaturityServerHelper.service.lockTargets( pn );

     result = "Accepted";

}

catch( Exception wte )

{

   if ( VERBOSE )

      wte.printStackTrace();

   result = "Rejected";  // send notification to owner

}

1 REPLY 1
James62
12-Amethyst
(To:jfrancis)

I guess it's there because this first try and catch block of code is not critical. It might retrieve the wt.maturity.verbose property value or it might not. In case of error the processing won't stop. The second try and catch is a different story.

Announcements


Top Tags