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.
Can you give an example of that? It's a long time ago since we wrote those enum form properties 😉
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn" id="definitions" targetNamespace="http://activiti.org/bpmn20"><process id="vacationRequest" name="Vacation request"><startEvent id="request" activiti:initiator="employeeName"><extensionElements><activiti:formProperty id="numberOfDays" name="Number of days" type="long" value="1" required="true"/><activiti:formProperty id="startDate" name="First day of holiday (dd-MM-yyy)" datePattern="dd-MM-yyyy hh:mm" type="date" required="true"/><activiti:formProperty id="vacationMotivation" name="Motivation" type="string"/></extensionElements></startEvent><sequenceFlow id="flow1" sourceRef="request" targetRef="handleRequest"/><userTask id="handleRequest" name="Handle vacation request"><documentation>${employeeName} would like to take ${numberOfDays} day(s) of vacation (Motivation: ${vacationMotivation}).</documentation><extensionElements><activiti:formProperty id="vacationApproved" name="Do you approve this vacation" type="enum" required="true"><activiti:value id="true" name="Approve"/><activiti:value id="false" name="Reject"/></activiti:formProperty><activiti:formProperty id="managerMotivation" name="Motivation" type="string"/></extensionElements><potentialOwner><resourceAssignmentExpression><formalExpression>management</formalExpression></resourceAssignmentExpression></potentialOwner></userTask><sequenceFlow id="flow2" sourceRef="handleRequest" targetRef="requestApprovedDecision"/><exclusiveGateway id="requestApprovedDecision" name="Request approved?"/><sequenceFlow id="flow3" sourceRef="requestApprovedDecision" targetRef="sendApprovalMail"><conditionExpression xsi:type="tFormalExpression">${vacationApproved == 'true'}</conditionExpression></sequenceFlow><task id="sendApprovalMail" name="Send confirmation e-mail"/><sequenceFlow id="flow4" sourceRef="sendApprovalMail" targetRef="theEnd1"/><endEvent id="theEnd1"/><sequenceFlow id="flow5" sourceRef="requestApprovedDecision" targetRef="adjustVacationRequestTask"><conditionExpression xsi:type="tFormalExpression">${vacationApproved == 'false'}</conditionExpression></sequenceFlow><userTask id="adjustVacationRequestTask" name="Adjust vacation request"><documentation>Your manager has disapproved your vacation request for ${numberOfDays} days. Reason: ${managerMotivation}</documentation><extensionElements><activiti:formProperty id="numberOfDays" name="Number of days" value="${numberOfDays}" type="long" required="true"/><activiti:formProperty id="startDate" name="First day of holiday (dd-MM-yyy)" value="${startDate}" datePattern="dd-MM-yyyy hh:mm" type="date" required="true"/><activiti:formProperty id="vacationMotivation" name="Motivation" value="${vacationMotivation}" type="string"/><activiti:formProperty id="resendRequest" name="Resend vacation request to manager?" type="enum" required="true"><activiti:value id="true" name="Yes"/><activiti:value id="false" name="No"/></activiti:formProperty></extensionElements><humanPerformer><resourceAssignmentExpression><formalExpression>${employeeName}</formalExpression></resourceAssignmentExpression></humanPerformer></userTask><sequenceFlow id="flow6" sourceRef="adjustVacationRequestTask" targetRef="resendRequestDecision"/><exclusiveGateway id="resendRequestDecision" name="Resend request?"/><sequenceFlow id="flow7" sourceRef="resendRequestDecision" targetRef="handleRequest"><conditionExpression xsi:type="tFormalExpression">${resendRequest == 'true'}</conditionExpression></sequenceFlow><sequenceFlow id="flow8" sourceRef="resendRequestDecision" targetRef="theEnd2"><conditionExpression xsi:type="tFormalExpression">${resendRequest == 'false'}</conditionExpression></sequenceFlow><endEvent id="theEnd2"/></process></definitions>
Hello Activity Forum,I am just wondering if this is with purpose, but with form properties for the enum type default value are not automatically filled.If not purposeful, can this be corrected?Regards,A.
<br><?xml version="1.0" encoding="UTF-8"?><br><definitions xmlns="<a href="http://www.omg.org/spec/BPMN/20100524/MODEL" rel="nofollow noopener noreferrer">http://www.omg.org/spec/BPMN/20100524/MODEL</a>" xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance" rel="nofollow noopener noreferrer">http://www.w3.org/2001/XMLSchema-instance</a>" xmlns:activiti="<a href="http://activiti.org/bpmn" rel="nofollow noopener noreferrer">http://activiti.org/bpmn</a>" xmlns:bpmndi="<a href="http://www.omg.org/spec/BPMN/20100524/DI" rel="nofollow noopener noreferrer">http://www.omg.org/spec/BPMN/20100524/DI</a>" xmlns:smileysurprised:mgdc="<a href="http://www.omg.org/spec/DD/20100524/DC" rel="nofollow noopener noreferrer">http://www.omg.org/spec/DD/20100524/DC</a>" xmlns:smileysurprised:mgdi="<a href="http://www.omg.org/spec/DD/20100524/DI" rel="nofollow noopener noreferrer">http://www.omg.org/spec/DD/20100524/DI</a>" typeLanguage="<a href="http://www.w3.org/2001/XMLSchema" rel="nofollow noopener noreferrer">http://www.w3.org/2001/XMLSchema</a>" expressionLanguage="<a href="http://www.w3.org/1999/XPath" rel="nofollow noopener noreferrer">http://www.w3.org/1999/XPath</a>" targetNamespace="<a href="http://www.activiti.org/test" rel="nofollow noopener noreferrer">http://www.activiti.org/test</a>"><br> <process id="process1" name="process1"><br> <startEvent id="startevent1" name="Start"></startEvent><br> <userTask id="usertask1" name="Exam selection" activiti:assignee="kermit"><br> <extensionElements><br> <activiti:formProperty id="examtype" name="Exam type" type="enum" default="h"><br> <activiti:value id="m" name="Maths"></activiti:value><br> <activiti:value id="l" name="Literature"></activiti:value><br> <activiti:value id="h" name="History"></activiti:value><br> </activiti:formProperty><br> </extensionElements><br> </userTask><br> <endEvent id="endevent1" name="End"></endEvent><br> <sequenceFlow id="flow1" name="" sourceRef="startevent1" targetRef="usertask1"></sequenceFlow><br> <sequenceFlow id="flow2" name="" sourceRef="usertask1" targetRef="endevent1"></sequenceFlow><br> </process><br> <bpmndi:BPMNDiagram id="BPMNDiagram_process1"><br> <bpmndi:BPMNPlane bpmnElement="process1" id="BPMNPlane_process1"><br> <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1"><br> <omgdc:Bounds height="35" width="35" x="110" y="150"></omgdc:Bounds><br> </bpmndi:BPMNShape><br> <bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1"><br> <omgdc:Bounds height="55" width="105" x="220" y="140"></omgdc:Bounds><br> </bpmndi:BPMNShape><br> <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1"><br> <omgdc:Bounds height="35" width="35" x="420" y="150"></omgdc:Bounds><br> </bpmndi:BPMNShape><br> <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1"><br> <omgdi:waypoint x="145" y="167"></omgdi:waypoint><br> <omgdi:waypoint x="220" y="167"></omgdi:waypoint><br> </bpmndi:BPMNEdge><br> <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2"><br> <omgdi:waypoint x="325" y="167"></omgdi:waypoint><br> <omgdi:waypoint x="420" y="167"></omgdi:waypoint><br> </bpmndi:BPMNEdge><br> </bpmndi:BPMNPlane><br> </bpmndi:BPMNDiagram><br></definitions><br>
This is how it is done as the result of the Eclipse Designer; refer to line activiti:formProperty id="examtype":….     <extensionElements>       <activiti:formProperty id="examtype" name="Exam type" type="enum" default="h">         <activiti:value id="m" name="Maths"></activiti:value>         <activiti:value id="l" name="Literature"></activiti:value>         <activiti:value id="h" name="History"></activiti:value>       </activiti:formProperty>     </extensionElements>   </userTask>
public class EnumFormPropertyRenderer extends AbstractFormPropertyRenderer { public EnumFormPropertyRenderer() {   super(EnumFormType.class); } @SuppressWarnings("unchecked") @Override public Field getPropertyField(FormProperty formProperty) {   ComboBox comboBox = new ComboBox(getPropertyLabel(formProperty));   comboBox.setRequired(formProperty.isRequired());   comboBox.setRequiredError(getMessage(Messages.FORM_FIELD_REQUIRED, getPropertyLabel(formProperty)));   comboBox.setEnabled(formProperty.isWritable());   Map<String, String> values = (Map<String, String>) formProperty.getType().getInformation("values");   if (values != null) {     for (Entry<String, String> enumEntry : values.entrySet()) {       // Add value and label (if any)       comboBox.addItem(enumEntry.getKey());       if (enumEntry.getValue() != null) {         comboBox.setItemCaption(enumEntry.getKey(), enumEntry.getValue());       }     }   }   return comboBox; }}