Fix bug [ 1854603 ] Prepare method is being called twice

Make workflows run in one single thread different from the main thread
This commit is contained in:
Carlos Ruiz 2008-01-25 22:46:19 +00:00
parent f3dad924e0
commit a2551a4fde
1 changed files with 5 additions and 5 deletions

View File

@ -333,8 +333,6 @@ public class MWFProcess extends X_AD_WF_Process
// Start new Activity... // Start new Activity...
MWFActivity activity = new MWFActivity (this, transitions[i].getAD_WF_Next_ID(), lastPO); MWFActivity activity = new MWFActivity (this, transitions[i].getAD_WF_Next_ID(), lastPO);
//new Thread(activity).start();
//..but not in another thread
activity.run(); activity.run();
// only the first valid if XOR // only the first valid if XOR
@ -461,9 +459,11 @@ public class MWFProcess extends X_AD_WF_Process
{ {
// Start first Activity with first Node // Start first Activity with first Node
MWFActivity activity = new MWFActivity (this, AD_WF_Node_ID); MWFActivity activity = new MWFActivity (this, AD_WF_Node_ID);
//async execution cause problem with transaction Thread workerWF = new Thread(activity);
//new Thread(activity).start(); workerWF.setName(activity.getAD_Workflow().getName() + " "
activity.run(); + activity.getAD_Table().getName() + " "
+ activity.getRecord_ID());
workerWF.start();
} }
catch (Exception e) catch (Exception e)
{ {