AnsweredAssumed Answered

[Solved] using Activiti formProperty in alfresco.

Question asked by framt on Oct 3, 2013
Latest reply on Oct 14, 2013 by framt
Hello,
I am new to using alfresco.
I have been developing workflows in activiti and deploying them in alfresco.

While the routing between users works great, the form properties do not transfer over to Alfresco such as

<activiti:formProperty id="Requirement" name="Requirement" type="string" required="true"></activiti:formProperty>

The page in Alfresco will revert to the default workflow page

I am currently running alfresco enterprise 4.1.5 on the trial license.




My full process is below:

<?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: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="WorkflowA" name="WorkflowA" isExecutable="true">
    <documentation>Attempt 1</documentation>
    <startEvent id="start"></startEvent>
    <sequenceFlow id="sequenceFlow1" sourceRef="start" targetRef="userTask1"></sequenceFlow>
    <userTask id="userTask1" name="Add Info 1" activiti:assignee="framt">
      <documentation>Here you must add a ID#, SNN and Job Title</documentation>
      <extensionElements>
        <activiti:formProperty id="ID#" name="ID#" type="long" required="true"></activiti:formProperty>
        <activiti:formProperty id="SNN" name="SNN" type="long" required="true"></activiti:formProperty>
        <activiti:formProperty id="Job Title" name="Job Title" type="string"></activiti:formProperty>
      </extensionElements>
    </userTask>
    <sequenceFlow id="sequenceFlow2" sourceRef="userTask1" targetRef="userTask2"></sequenceFlow>
    <userTask id="userTask2" name="Add Info 2" activiti:assignee="framt">
      <documentation>Here you add 1 piece of required info as well as some optional info</documentation>
      <extensionElements>
        <activiti:formProperty id="Requirement" name="Requirement" type="string" required="true"></activiti:formProperty>
        <activiti:formProperty id="Optional Function" name="Optional Function" type="string"></activiti:formProperty>
      </extensionElements>
    </userTask>
    <sequenceFlow id="sequenceFlow3" sourceRef="userTask2" targetRef="userTask3"></sequenceFlow>
    <userTask id="userTask3" name="Add Info 3" activiti:assignee="framt">
      <extensionElements>
        <activiti:formProperty id="Required approval" name="Required approval" type="string" required="true"></activiti:formProperty>
        <activiti:formProperty id="Optional Comments" name="Optional Comments" type="string"></activiti:formProperty>
        <activiti:formProperty id="Authorized by:" name="Authorized by:" type="string" required="true"></activiti:formProperty>
      </extensionElements>
    </userTask>
    <endEvent id="end"></endEvent>
    <sequenceFlow id="sequenceFlow4" sourceRef="userTask3" targetRef="end"></sequenceFlow>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_PefectA">
    <bpmndi:BPMNPlane bpmnElement="PefectA" id="BPMNPlane_PefectA">
      <bpmndi:BPMNShape bpmnElement="start" id="BPMNShape_start">
        <omgdc:Bounds height="30.0" width="30.0" x="0.0" y="15.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="userTask2" id="BPMNShape_userTask2">
        <omgdc:Bounds height="60.0" width="100.0" x="230.0" y="0.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="userTask3" id="BPMNShape_userTask3">
        <omgdc:Bounds height="60.0" width="100.0" x="380.0" y="0.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="end" id="BPMNShape_end">
        <omgdc:Bounds height="30.0" width="30.0" x="530.0" y="15.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="userTask1" id="BPMNShape_userTask1">
        <omgdc:Bounds height="60.0" width="100.0" x="80.0" y="0.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="sequenceFlow3" id="BPMNEdge_sequenceFlow3">
        <omgdi:waypoint x="330.0" y="30.0"></omgdi:waypoint>
        <omgdi:waypoint x="342.0" y="30.0"></omgdi:waypoint>
        <omgdi:waypoint x="342.0" y="30.000000000000007"></omgdi:waypoint>
        <omgdi:waypoint x="380.0" y="30.000000000000007"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sequenceFlow4" id="BPMNEdge_sequenceFlow4">
        <omgdi:waypoint x="480.0" y="30.0"></omgdi:waypoint>
        <omgdi:waypoint x="492.0" y="30.0"></omgdi:waypoint>
        <omgdi:waypoint x="492.0" y="30.000000000000004"></omgdi:waypoint>
        <omgdi:waypoint x="530.0" y="30.000000000000004"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sequenceFlow1" id="BPMNEdge_sequenceFlow1">
        <omgdi:waypoint x="30.0" y="30.0"></omgdi:waypoint>
        <omgdi:waypoint x="42.0" y="30.0"></omgdi:waypoint>
        <omgdi:waypoint x="42.0" y="30.000000000000007"></omgdi:waypoint>
        <omgdi:waypoint x="80.0" y="30.000000000000007"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sequenceFlow2" id="BPMNEdge_sequenceFlow2">
        <omgdi:waypoint x="180.0" y="30.0"></omgdi:waypoint>
        <omgdi:waypoint x="192.0" y="30.0"></omgdi:waypoint>
        <omgdi:waypoint x="192.0" y="30.000000000000007"></omgdi:waypoint>
        <omgdi:waypoint x="230.0" y="30.000000000000007"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>

Outcomes