public void read(Element decisionElement, JpdlXmlReader jpdlReader) { String expression = decisionElement.attributeValue("expression"); Element decisionHandlerElement = decisionElement.element("handler"); if (expression != null) { decisionExpression = expression; } else if (decisionHandlerElement != null) { decisionDelegation = new Delegation(); decisionDelegation.read(decisionHandlerElement, jpdlReader); } }
public void read(Element decisionElement, JpdlXmlReader jpdlReader) { String expression = decisionElement.attributeValue("expression"); Element decisionHandlerElement = decisionElement.element("handler"); if (expression != null) { decisionExpression = expression; } else if (decisionHandlerElement != null) { decisionDelegation = new Delegation(); decisionDelegation.read(decisionHandlerElement, jpdlReader); } }
protected TaskController readTaskController(Element taskControllerElement) { TaskController taskController = new TaskController(); if (taskControllerElement.attributeValue("class") != null) { Delegation taskControllerDelegation = new Delegation(); taskControllerDelegation.read(taskControllerElement, this); taskController.setTaskControllerDelegation(taskControllerDelegation); } else { List variableAccesses = readVariableAccesses(taskControllerElement); taskController.setVariableAccesses(variableAccesses); } return taskController; }
protected TaskController readTaskController(Element taskControllerElement) { TaskController taskController = new TaskController(); if (taskControllerElement.attributeValue("class") != null) { Delegation taskControllerDelegation = new Delegation(); taskControllerDelegation.read(taskControllerElement, this); taskController.setTaskControllerDelegation(taskControllerDelegation); } else { List variableAccesses = readVariableAccesses(taskControllerElement); taskController.setVariableAccesses(variableAccesses); } return taskController; }
public void read(Element actionElement, JpdlXmlReader jpdlReader) { String expression = actionElement.attributeValue("expression"); if (expression != null) { actionExpression = expression; } else if (actionElement.attribute("ref-name") != null) { jpdlReader.addUnresolvedActionReference(actionElement, this); } else if (actionElement.attribute("class") != null) { actionDelegation = new Delegation(); actionDelegation.read(actionElement, jpdlReader); } else { jpdlReader.addWarning("action does not have class nor ref-name attribute: " + actionElement.getPath()); } }
public void read(Element actionElement, JpdlXmlReader jpdlReader) { String expression = actionElement.attributeValue("expression"); if (expression != null) { actionExpression = expression; } else if (actionElement.attribute("ref-name") != null) { jpdlReader.addUnresolvedActionReference(actionElement, this); } else if (actionElement.attribute("class") != null) { actionDelegation = new Delegation(); actionDelegation.read(actionElement, jpdlReader); } else { jpdlReader.addWarning("action does not have class nor ref-name attribute: " + actionElement.getPath()); } }
protected Delegation readAssignmentDelegation(Element assignmentElement) { Delegation assignmentDelegation = new Delegation(); assignmentDelegation.setProcessDefinition(processDefinition); String expression = assignmentElement.attributeValue("expression"); if (expression != null) { // read assigment expression Element config = DocumentHelper.createElement("expression"); config.setText(expression); assignmentDelegation.setClassName("org.jbpm.identity.assignment.ExpressionAssignmentHandler"); assignmentDelegation.setConfiguration(writeElement(config)); } else { String actorId = assignmentElement.attributeValue("actor-id"); String pooledActors = assignmentElement.attributeValue("pooled-actors"); if (actorId != null || pooledActors != null) { // read assignment actors Element config = DocumentHelper.createElement("configuration"); if (actorId != null) config.addElement("actorId").setText(actorId); if (pooledActors != null) config.addElement("pooledActors").setText(pooledActors); assignmentDelegation.setClassName("org.jbpm.taskmgmt.assignment.ActorAssignmentHandler"); assignmentDelegation.setConfiguration(writeElementContent(config)); } else { // parse custom assignment handler assignmentDelegation.read(assignmentElement, this); } } return assignmentDelegation; }
protected Delegation readAssignmentDelegation(Element assignmentElement) { Delegation assignmentDelegation = new Delegation(); assignmentDelegation.setProcessDefinition(processDefinition); String expression = assignmentElement.attributeValue("expression"); if (expression != null) { // read assigment expression Element config = DocumentHelper.createElement("expression"); config.setText(expression); assignmentDelegation.setClassName("org.jbpm.identity.assignment.ExpressionAssignmentHandler"); assignmentDelegation.setConfiguration(writeElement(config)); } else { String actorId = assignmentElement.attributeValue("actor-id"); String pooledActors = assignmentElement.attributeValue("pooled-actors"); if (actorId != null || pooledActors != null) { // read assignment actors Element config = DocumentHelper.createElement("configuration"); if (actorId != null) config.addElement("actorId").setText(actorId); if (pooledActors != null) config.addElement("pooledActors").setText(pooledActors); assignmentDelegation.setClassName("org.jbpm.taskmgmt.assignment.ActorAssignmentHandler"); assignmentDelegation.setConfiguration(writeElementContent(config)); } else { // parse custom assignment handler assignmentDelegation.read(assignmentElement, this); } } return assignmentDelegation; }