protected SecuredPriorityBean getPriority(SecuredTaskTriggerBean task) throws GranException {
        String impactUDFName = KernelManager.getFind().findUdf(INCIDENT_IMPACT_UDFID).getCaption();
        String urgencyUDFName = KernelManager.getFind().findUdf(INCIDENT_URGENCY_UDFID).getCaption();
        String urgency = task.getUdfValue(urgencyUDFName);
        String impact = task.getUdfValue(impactUDFName);
        int priority = 1;

        try {
            int ur = parseInt(urgency);
            int im = parseInt(impact);
            priority = ur * im;
            if (priority == 4) priority = 3;
        } catch (NumberFormatException e) {

        }
        catch (NullPointerException ne){
            
        }

        List<SecuredPriorityBean> priorities = AdapterManager.getInstance().getSecuredWorkflowAdapterManager().getPriorityList(task.getSecure(), INCIDENT_WORKFLOW);
        for (SecuredPriorityBean p : priorities) {
            if (p.getOrder() == priority) {
                return p;
                
            }
        }
        return null;
    }