Can anyone help me with below workflow error
Caused by: org.xml.sax.SAXParseException: cvc-datatype-valid.1.2.1: ‘#{nameSelected == true ? ‘flowAge’ : ‘’}’ is not a valid value for ‘QName’.
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn"
xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC"
xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI"
typeLanguage="http://www.w3.org/2001/XMLSchema"
expressionLanguage="http://www.w3.org/1999/XPath"
targetNamespace="http://www.activiti.org/test">
<process id="myProcess" name="My process" isExecutable="true">
<subProcess id="mySubProcess">
<startEvent id="startevent1" name="Start">
<documentation>Testing Today</documentation>
</startEvent>
<scriptTask id="checkName" name="Check Name">
<script><![CDATA[
if (name == "yes") {
execution.setVariable("nameSelected", true);
} else {
execution.setVariable("nameSelected", false);
}
]]></script>
</scriptTask>
<userTask id="enterAge" name="Enter Age">
<extensionElements>
<activiti:formProperty id="age" name="Age" type="long" required="true">
</activiti:formProperty>
<activiti:executionListener event="start" class="org.activiti.engine.delegate.JavaDelegate">
<activiti:field name="delegateExpression"><![CDATA[#{myJavaDelegate}]]></activiti:field>
</activiti:executionListener>
</extensionElements>
<incoming>#{nameSelected == true ? 'flowAge' : ''}</incoming>
</userTask>
<sequenceFlow id="flowName" sourceRef="startevent1" targetRef="checkName"></sequenceFlow>
<sequenceFlow id="flowAge" sourceRef="checkName" targetRef="enterAge"></sequenceFlow>
<endEvent id="endevent1" name="End"></endEvent>
</subProcess>
</process>
<bpmndi:BPMNDiagram id="BPMNDiagram_myProcess">
<bpmndi:BPMNPlane bpmnElement="myProcess" id="BPMNPlane_myProcess">
<bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
<omgdc:Bounds height="80.0" width="120.0" x="140.0" y="220.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
<omgdc:Bounds height="35.0" width="35.0" x="780.0" y="230.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>mohammedsohailea73ba
Posted 3 years ago · Edited 2 years ago·Last reply 3 years ago
6 comments
arthurburkhardt
·3 years ago · EditedThat’s a different workflow form than the first you were showing.
Dynamic display is not available without workflow designer and it doesn’t seem you are using workflow designer.
I’m confused.
mohammedsohailea73ba
OP3 years ago · Edited@arthur.burkhardt
Both worlflow are aimimg for the same use case, I just shared the latest workflow for ur inputs.
I am using activiti plugin for workflow.
is it not possible ?
arthurburkhardt
·3 years ago · EditedThe first example you provide points at a syntactical error in your XML => I’ve never seen the hash notation, so that might be your problem.
The second problem you are requesting is “Can I change one field based on the value of another?” => Not with workflows developed in Eclipse, you need to use the workflow designer.
arthurburkhardt
·3 years ago · EditedI’ve never seen the hash notation before “#{nameSelected == true ? ‘flowAge’ : ‘’}”
What is it supposed to do?
arthurburkhardt
·3 years ago · EditedI’ve never seen the hash notation before “#{nameSelected == true ? ‘flowAge’ : ‘’}”
What is it supposed to do?
mohammedsohailea73ba
OP3 years ago · Edited@arthur.burkhardt
here u can see a form with 2 fields name and age .
Name has 2 option “yes” “no”
if I select “no”
it should either disable age field or display a message within field saying slect yes in name field