As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
public static void setSequenceFlowCondition(DelegateExecution execution, String sequenceFlowId, String condition) { RepositoryService repositoryService = execution.getEngineServices().getRepositoryService(); String processDefinitionId = execution.getProcessDefinitionId(); BpmnModel model = repositoryService.getBpmnModel(processDefinitionId); Process process = model.getMainProcess(); SequenceFlow sequenceFlow = (SequenceFlow) process.getFlowElement(sequenceFlowId); // Set the condition expression for the flow String b = sequenceFlow.getConditionExpression(); // b = "${false}", correctly read from diagram sequenceFlow.setConditionExpression(condition); String c = sequenceFlow.getConditionExpression(); // c = "${true} }