add new condition in Condition tab for transition (DocPrepare) -> (DocComplete)
Grand Total < 5000
Save it
Login to Test Client
Create Sales Order of grand total 5100
On complete, workflow will hang because condition applied in GardenWorld client got applied to TestClient as well.
Solution: Add client id in where condition when getting conditions of transition node as below final String whereClause = MWFNextCondition.COLUMNNAME_AD_WF_NodeNext_ID+"=? AND AD_Client_ID(0,?)"; List<MWFNextCondition> list = new Query(getCtx(), MWFNextCondition.Table_Name, whereClause, get_TrxName()) .setParameters(new Object[]{getAD_WF_NodeNext_ID(), Env.getAD_Client_ID(Env.getCtx())}) .setOnlyActiveRecords(true) .setOrderBy(MWFNextCondition.COLUMNNAME_SeqNo) .list();
Create new client say TestClient
Login to GardenWorld client
Open Workflow window
search for Process_Order
Navigate to Node tab and open (DocPrepare)
Navigate to Transition tab
add new condition in Condition tab for transition (DocPrepare) -> (DocComplete)
Grand Total < 5000
Save it
Login to Test Client
Create Sales Order of grand total 5100
On complete, workflow will hang because condition applied in GardenWorld client got applied to TestClient as well.
Solution:
Add client id in where condition when getting conditions of transition node as below
final String whereClause = MWFNextCondition.COLUMNNAME_AD_WF_NodeNext_ID+"=? AND AD_Client_ID(0,?)";
List<MWFNextCondition> list = new Query(getCtx(), MWFNextCondition.Table_Name, whereClause, get_TrxName())
.setParameters(new Object[]{getAD_WF_NodeNext_ID(), Env.getAD_Client_ID(Env.getCtx())})
.setOnlyActiveRecords(true)
.setOrderBy(MWFNextCondition.COLUMNNAME_SeqNo)
.list();