log.setSlaCompliance(((NodeInstance)event.getNodeInstance()).getSlaCompliance()); em.merge(log);
private int getSLAComplianceForNodeInstance(long processInstanceId, org.jbpm.workflow.instance.NodeInstance nodeInstance, int logType) { int slaCompliance = -1; if (sessionPersistence) { List<NodeInstanceLog> logs = logService.findNodeInstances(processInstanceId); if (logs != null) { for (NodeInstanceLog log : logs) { if (log.getType() == logType && log.getNodeInstanceId().equals(String.valueOf(nodeInstance.getId()))) { slaCompliance = log.getSlaCompliance(); break; } } } } else { slaCompliance = nodeInstance.getSlaCompliance(); } return slaCompliance; } }
public JBPMMessages.ProcessInstance.NodeInstance writeNodeInstance(MarshallerWriteContext context, NodeInstance nodeInstance) throws IOException { JBPMMessages.ProcessInstance.NodeInstance.Builder _node = JBPMMessages.ProcessInstance.NodeInstance.newBuilder() .setId( nodeInstance.getId() ) .setNodeId( nodeInstance.getNodeId()) .setLevel(((org.jbpm.workflow.instance.NodeInstance)nodeInstance).getLevel()) .setSlaCompliance(((org.jbpm.workflow.instance.NodeInstance)nodeInstance).getSlaCompliance()); if (((org.jbpm.workflow.instance.NodeInstance)nodeInstance).getSlaDueDate() != null) { _node.setSlaDueDate(((org.jbpm.workflow.instance.NodeInstance)nodeInstance).getSlaDueDate().getTime()); } if (((org.jbpm.workflow.instance.NodeInstance)nodeInstance).getSlaTimerId() != null) { _node.setSlaTimerId(((org.jbpm.workflow.instance.NodeInstance)nodeInstance).getSlaTimerId()); } _node.setContent( writeNodeInstanceContent( _node, nodeInstance, context ) ); return _node.build(); }
private int getSLAComplianceForNodeInstance(long processInstanceId, org.jbpm.workflow.instance.NodeInstance nodeInstance, int logType) { int slaCompliance = -1; if (sessionPersistence) { List<NodeInstanceLog> logs = logService.findNodeInstances(processInstanceId); if (logs != null) { for (NodeInstanceLog log : logs) { if (log.getType() == logType && log.getNodeInstanceId().equals(String.valueOf(nodeInstance.getId()))) { slaCompliance = log.getSlaCompliance(); break; } } } } else { slaCompliance = nodeInstance.getSlaCompliance(); } return slaCompliance; } }
public JBPMMessages.ProcessInstance.NodeInstance writeNodeInstance(MarshallerWriteContext context, NodeInstance nodeInstance) throws IOException { JBPMMessages.ProcessInstance.NodeInstance.Builder _node = JBPMMessages.ProcessInstance.NodeInstance.newBuilder() .setId( nodeInstance.getId() ) .setNodeId( nodeInstance.getNodeId()) .setLevel(((org.jbpm.workflow.instance.NodeInstance)nodeInstance).getLevel()) .setSlaCompliance(((org.jbpm.workflow.instance.NodeInstance)nodeInstance).getSlaCompliance()); if (((org.jbpm.workflow.instance.NodeInstance)nodeInstance).getSlaDueDate() != null) { _node.setSlaDueDate(((org.jbpm.workflow.instance.NodeInstance)nodeInstance).getSlaDueDate().getTime()); } if (((org.jbpm.workflow.instance.NodeInstance)nodeInstance).getSlaTimerId() != null) { _node.setSlaTimerId(((org.jbpm.workflow.instance.NodeInstance)nodeInstance).getSlaTimerId()); } _node.setContent( writeNodeInstanceContent( _node, nodeInstance, context ) ); return _node.build(); }