Fixed bug when the resource is null into workflow, now the functionality ignore this node and continue with the process.

This commit is contained in:
vpj-cd 2008-10-07 14:00:19 +00:00
parent 3cff3fb457
commit c1ceb57e34
1 changed files with 11 additions and 5 deletions

View File

@ -124,7 +124,10 @@ public class CRP extends SvrProcess {
MResource resource = MResource.get(getCtx(), node.getS_Resource_ID()); MResource resource = MResource.get(getCtx(), node.getS_Resource_ID());
if(resource== null) if(resource== null)
break; {
nodeId = owf.getNext(nodeId, getAD_Client_ID());
continue;
}
MResourceType resourceType = resource.getResourceType(); MResourceType resourceType = resource.getResourceType();
@ -143,7 +146,7 @@ public class CRP extends SvrProcess {
date = node.getDateFinishSchedule(); date = node.getDateFinishSchedule();
nodeId = owf.getNext(nodeId, getAD_Client_ID()); nodeId = owf.getNext(nodeId, getAD_Client_ID());
} }
if (node != null) if (node != null && node.getDateFinishSchedule()!= null)
{ {
order.setDateFinishSchedule(node.getDateFinishSchedule()); order.setDateFinishSchedule(node.getDateFinishSchedule());
} }
@ -161,8 +164,11 @@ public class CRP extends SvrProcess {
log.fine("PP_Order Node:" + node.getName() != null ? node.getName() : "" + " Description:" + node.getDescription() != null ? node.getDescription() : ""); log.fine("PP_Order Node:" + node.getName() != null ? node.getName() : "" + " Description:" + node.getDescription() != null ? node.getDescription() : "");
MResource resource = MResource.get(getCtx(), node.getS_Resource_ID()); MResource resource = MResource.get(getCtx(), node.getS_Resource_ID());
if(resource == null) if(resource== null)
break; {
nodeId = owf.getPrevious(nodeId, getAD_Client_ID());
continue;
}
MResourceType resourceType = resource.getResourceType(); MResourceType resourceType = resource.getResourceType();
@ -181,7 +187,7 @@ public class CRP extends SvrProcess {
date = node.getDateStartSchedule(); date = node.getDateStartSchedule();
nodeId = owf.getPrevious(nodeId, getAD_Client_ID()); nodeId = owf.getPrevious(nodeId, getAD_Client_ID());
} }
if (node != null) if (node != null && node.getDateFinishSchedule()!= null)
{ {
order.setDateStartSchedule(node.getDateStartSchedule()) ; order.setDateStartSchedule(node.getDateStartSchedule()) ;
} }