cancel
Showing results for 
Search instead for 
Did you mean: 

Creating forms in share for a new workflow

vferia15
Champ in-the-making
Champ in-the-making
Hello everybody,
I’m developing a new workflow, called PropContratacionNominativav2.bpmn20.xml located at .. \tomcat\shared\classes\alfresco\extension\workflow
Here is the code:
<?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://activiti.org/bpmn20">
  <process id="PropContratacionNominativav2" name="Propuesta de Contratacion Nominativav2">
    <documentation>Propuesta de Contratacion Nominativa version 2</documentation>
    <startEvent id="start" name="Start" activiti:formKey="alo:submitGroupReviewTask"></startEvent>
    <userTask id="validacionResponsable" name="Validacion Responsable" activiti:candidateGroups="${bpm_groupAssignee.properties.authorityName}">
      <extensionElements>
        <activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
          <activiti:field name="script">
            <activiti:string>if (typeof bpm_workflowDueDate != 'undefined') task.setVariable('bpm_dueDate', bpm_workflowDueDate);
if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;

if ((bpm_workflowDescription == "")||(bpm_workflowDescription =="'null"))
{
task.description="Propuesta de contatacion nominativa recibida de "+initiator.properties['cm:firstName']+' ' +initiator.properties['cm:lastName'];
}

</activiti:string>
          </activiti:field>
        </activiti:taskListener>
        <activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
          <activiti:field name="script">
            <activiti:string>execution.setVariable('wf_reviewOutcome', task.getVariable('wf_reviewOutcome'));

//Almacenamos en una variable el comentario de este paso para mostrarlo en el siguiente
execution.setVariable('wf_comment', task.getVariable('bpm_comment'));

//Almacenamos la persona que tiene asignada la tarea para mostrarlo en el siguiente
task.setVariable("alo_userNameValAnt",task.assignee);
task.setVariable("alo_groupNameValAnt",bpm_groupAssignee.properties['cm:authorityName']);

</activiti:string>
          </activiti:field>
        </activiti:taskListener>
      </extensionElements>
    </userTask>
    <exclusiveGateway id="reviewDecision" name="Review Decision"></exclusiveGateway>
    <userTask id="validacionDireccion" name="Validacion Direccion" activiti:candidateGroups="GROUP_TABS_Direccion" activiti:formKey="alo:activitiReviewTask">
      <extensionElements>
        <activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
          <activiti:field name="script">
            <activiti:string>if (typeof bpm_workflowDueDate != 'undefined') task.setVariable('bpm_dueDate', bpm_workflowDueDate);
if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;
execution.setVariable('alo_userNameValAnt',alo_userNameValAnt);
execution.setVariable('alo_groupNameValAnt',alo_groupNameValAnt);

//Nos interesa que los comentarios se muestren todos
if (wf_comment != "")
{
task.setVariable('bpm_comment',wf_comment);
}

nombreGrupo =  alo_groupNameValAnt.substring(alo_groupNameValAnt.lastIndexOf('_')+1);


task.description="Propuesta de contratacion nominativa revisada y aprobada por " + people.getPerson(alo_userNameValAnt).properties.firstName + " " + people.getPerson(alo_userNameValAnt).properties.lastName + " responsable de " + nombreGrupo;</activiti:string>
          </activiti:field>
        </activiti:taskListener>
        <activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
          <activiti:field name="script">
            <activiti:string>execution.setVariable('wf_reviewOutcome', task.getVariable('wf_reviewOutcome'));
task.setVariable("alo_userNameValAnt",task.assignee);
task.setVariable("alo_groupNameValAnt","GROUP_TABS_Direccion");
</activiti:string>
          </activiti:field>
        </activiti:taskListener>
      </extensionElements>
    </userTask>
    <exclusiveGateway id="exclusivegateway1" name="Exclusive Gateway"></exclusiveGateway>
    <userTask id="validacionPersonal" name="Validacion Personal" activiti:candidateGroups="GROUP_TABS_Personal" activiti:formKey="wf:activitiReviewTask">
      <extensionElements>
        <activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
          <activiti:field name="script">
            <activiti:string>if (typeof bpm_workflowDueDate != 'undefined') task.setVariable('bpm_dueDate', bpm_workflowDueDate);
if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;

//Nos interesa que los comentarios se muestren todos
if (wf_comment != "")
{
task.setVariable('bpm_comment',wf_comment);
}

execution.setVariable('alo_groupNameValAnt',alo_groupNameValAnt);

nombreGrupo =  alo_groupNameValAnt.substring(alo_groupNameValAnt.lastIndexOf('_')+1);

task.description="Propuesta de contratacion nominativa revisada y aprobada por " + people.getPerson(alo_userNameValAnt).properties.firstName + " " + people.getPerson(alo_userNameValAnt).properties.lastName + " responsable de " + nombreGrupo;
</activiti:string>
          </activiti:field>
        </activiti:taskListener>
        <activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
          <activiti:field name="script">
            <activiti:string>execution.setVariable('wf_reviewOutcome', task.getVariable('wf_reviewOutcome'));

//Almacenamos en una variable el comentario de este paso para mostrarlo en el siguiente
task.setVariable("alo_userNameValAnt",task.assignee);
task.setVariable("alo_groupNameValAnt","GROUP_TABS_Personal");</activiti:string>
          </activiti:field>
        </activiti:taskListener>
      </extensionElements>
    </userTask>
    <exclusiveGateway id="exclusivegateway2" name="Exclusive Gateway"></exclusiveGateway>
    <userTask id="aprobadoPersonal" name="Aprobado Personal" activiti:assignee="${initiator.properties.userName}" activiti:formKey="wf:approvedTask">
      <extensionElements>
        <activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
          <activiti:field name="script">
            <activiti:string>if (typeof bpm_workflowDueDate != 'undefined') task.setVariableLocal('bpm_dueDate', bpm_workflowDueDate);
if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;

//Nos interesa que los comentarios se muestren todos
if (wf_comment != "")
{
task.setVariable('bpm_comment',wf_comment);
}

nombreGrupo =  alo_groupNameValAnt.substring(alo_groupNameValAnt.lastIndexOf('_')+1);
task.description="Propuesta de contratacion nominativa revisada y aprobada por " + people.getPerson(alo_userNameValAnt).properties.firstName + " " + people.getPerson(alo_userNameValAnt).properties.lastName + " responsable del servicio " + nombreGrupo;</activiti:string>
          </activiti:field>
        </activiti:taskListener>
        <activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
          <activiti:field name="script">
            <activiti:string>execution.setVariable('bpm_assignee', initiator);</activiti:string>
          </activiti:field>
        </activiti:taskListener>
      </extensionElements>
    </userTask>
    <endEvent id="endevent3" name="End"></endEvent>
    <userTask id="rechazadoPersonal" name="Rechazado Personal" activiti:assignee="${initiator.properties.userName}" activiti:formKey="wf:rejectedTask">
      <extensionElements>
        <activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
          <activiti:field name="script">
            <activiti:string>if (typeof bpm_workflowDueDate != 'undefined') task.setVariableLocal('bpm_dueDate', bpm_workflowDueDate);
if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;

//Nos interesa que los comentarios se muestren todos
if (wf_comment != "")
{
task.setVariable('bpm_comment',wf_comment);
}

nombreGrupo =  alo_groupNameValAnt.substring(alo_groupNameValAnt.lastIndexOf('_')+1);

task.description="Propuesta de contratacion nominativa revisada y rechazada por " + people.getPerson(alo_userNameValAnt).properties.firstName + " " + people.getPerson(alo_userNameValAnt).properties.lastName + " responsable del servicio " + nombreGrupo ;</activiti:string>
          </activiti:field>
        </activiti:taskListener>
        <activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
          <activiti:field name="script">
            <activiti:string>execution.setVariable('bpm_assignee', initiator);</activiti:string>
          </activiti:field>
        </activiti:taskListener>
      </extensionElements>
    </userTask>
    <endEvent id="endevent4" name="End"></endEvent>
    <userTask id="rechazadoDireccion" name="Rechazado Direccion" activiti:assignee="${initiator.properties.userName}" activiti:formKey="wf:rejectedTask">
      <extensionElements>
        <activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
          <activiti:field name="script">
            <activiti:string>if (typeof bpm_workflowDueDate != 'undefined') task.setVariableLocal('bpm_dueDate', bpm_workflowDueDate);
if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;

//Nos interesa que los comentarios se muestren todos
if (wf_comment != "")
{
   task.setVariable('bpm_comment',wf_comment);
}
nombreGrupo =  alo_groupNameValAnt.substring(alo_groupNameValAnt.lastIndexOf('_')+1);

task.description="Propuesta de contratacion nominativa revisada y rechazada por " + people.getPerson(alo_userNameValAnt).properties.firstName + " " + people.getPerson(alo_userNameValAnt).properties.lastName + " responsable del servicio " + nombreGrupo;</activiti:string>
          </activiti:field>
        </activiti:taskListener>
        <activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
          <activiti:field name="script">
            <activiti:string>execution.setVariable('bpm_assignee', initiator);</activiti:string>
          </activiti:field>
        </activiti:taskListener>
      </extensionElements>
    </userTask>
    <endEvent id="endevent2" name="End"></endEvent>
    <userTask id="rechazadoResponsable" name="Rechazado Responsable" activiti:assignee="${initiator.properties.userName}" activiti:formKey="alo:rejectedTask">
      <extensionElements>
        <activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
          <activiti:field name="script">
            <activiti:string>if (typeof bpm_workflowDueDate != 'undefined') task.setVariableLocal('bpm_dueDate', bpm_workflowDueDate);
if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;

//Nos interesa que los comentarios se muestren todos
if (wf_comment != "")
{
task.setVariable('bpm_comment',wf_comment);
}
nombreGrupo =  alo_groupNameValAnt.substring(alo_groupNameValAnt.lastIndexOf('_')+1);
task.description="Propuesta de contratacion nominativa revisada y rechazada por " + people.getPerson(alo_userNameValAnt).properties.firstName + " " + people.getPerson(alo_userNameValAnt).properties.lastName + " responsable del servicio " + nombreGrupo;</activiti:string>
          </activiti:field>
        </activiti:taskListener>
        <activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
          <activiti:field name="script">
            <activiti:string>execution.setVariable('bpm_assignee', initiator);
</activiti:string>
          </activiti:field>
        </activiti:taskListener>
      </extensionElements>
    </userTask>
    <endEvent id="endevent1" name="End"></endEvent>
    <sequenceFlow id="flow1" name="" sourceRef="start" targetRef="validacionResponsable"></sequenceFlow>
    <sequenceFlow id="flow2" name="" sourceRef="validacionResponsable" targetRef="reviewDecision"></sequenceFlow>
    <sequenceFlow id="flow3" name="" sourceRef="reviewDecision" targetRef="validacionDireccion">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${wf_reviewOutcome == 'Approve'}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow4" name="" sourceRef="reviewDecision" targetRef="rechazadoResponsable"></sequenceFlow>
    <sequenceFlow id="flow5" name="" sourceRef="rechazadoResponsable" targetRef="endevent1"></sequenceFlow>
    <sequenceFlow id="flow6" name="" sourceRef="validacionDireccion" targetRef="exclusivegateway1"></sequenceFlow>
    <sequenceFlow id="flow7" name="" sourceRef="exclusivegateway1" targetRef="validacionPersonal">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${wf_reviewOutcome == 'Approve'}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow9" name="" sourceRef="rechazadoDireccion" targetRef="endevent2"></sequenceFlow>
    <sequenceFlow id="flow10" name="" sourceRef="validacionPersonal" targetRef="exclusivegateway2"></sequenceFlow>
    <sequenceFlow id="flow11" name="" sourceRef="exclusivegateway1" targetRef="rechazadoDireccion"></sequenceFlow>
    <sequenceFlow id="flow12" name="" sourceRef="aprobadoPersonal" targetRef="endevent3"></sequenceFlow>
    <sequenceFlow id="flow13" name="" sourceRef="exclusivegateway2" targetRef="aprobadoPersonal">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${wf_reviewOutcome == 'Approve'}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow14" name="" sourceRef="exclusivegateway2" targetRef="rechazadoPersonal"></sequenceFlow>
    <sequenceFlow id="flow15" name="" sourceRef="rechazadoPersonal" targetRef="endevent4"></sequenceFlow>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_PropContratacionNominativav2">
    <bpmndi:BPMNPlane bpmnElement="PropContratacionNominativav2" id="BPMNPlane_PropContratacionNominativav2">
      <bpmndi:BPMNShape bpmnElement="start" id="BPMNShape_start">
        <omgdc:Bounds height="35" width="35" x="30" y="200"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="validacionResponsable" id="BPMNShape_validacionResponsable">
        <omgdc:Bounds height="55" width="105" x="105" y="190"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="reviewDecision" id="BPMNShape_reviewDecision">
        <omgdc:Bounds height="40" width="40" x="250" y="197"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="validacionDireccion" id="BPMNShape_validacionDireccion">
        <omgdc:Bounds height="55" width="105" x="330" y="137"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="exclusivegateway1" id="BPMNShape_exclusivegateway1">
        <omgdc:Bounds height="40" width="40" x="475" y="144"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="validacionPersonal" id="BPMNShape_validacionPersonal">
        <omgdc:Bounds height="55" width="105" x="555" y="84"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="exclusivegateway2" id="BPMNShape_exclusivegateway2">
        <omgdc:Bounds height="40" width="40" x="700" y="91"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="aprobadoPersonal" id="BPMNShape_aprobadoPersonal">
        <omgdc:Bounds height="55" width="105" x="780" y="31"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="endevent3" id="BPMNShape_endevent3">
        <omgdc:Bounds height="35" width="35" x="925" y="41"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="rechazadoPersonal" id="BPMNShape_rechazadoPersonal">
        <omgdc:Bounds height="55" width="105" x="780" y="151"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="endevent4" id="BPMNShape_endevent4">
        <omgdc:Bounds height="35" width="35" x="925" y="161"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="rechazadoDireccion" id="BPMNShape_rechazadoDireccion">
        <omgdc:Bounds height="55" width="105" x="555" y="204"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="endevent2" id="BPMNShape_endevent2">
        <omgdc:Bounds height="35" width="35" x="700" y="214"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="rechazadoResponsable" id="BPMNShape_rechazadoResponsable">
        <omgdc:Bounds height="55" width="105" x="330" y="257"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
        <omgdc:Bounds height="35" width="35" x="475" y="267"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
        <omgdi:waypoint x="65" y="217"></omgdi:waypoint>
        <omgdi:waypoint x="105" y="217"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
        <omgdi:waypoint x="210" y="217"></omgdi:waypoint>
        <omgdi:waypoint x="250" y="217"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
        <omgdi:waypoint x="270" y="197"></omgdi:waypoint>
        <omgdi:waypoint x="270" y="164"></omgdi:waypoint>
        <omgdi:waypoint x="330" y="164"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
        <omgdi:waypoint x="270" y="237"></omgdi:waypoint>
        <omgdi:waypoint x="270" y="284"></omgdi:waypoint>
        <omgdi:waypoint x="330" y="284"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
        <omgdi:waypoint x="435" y="284"></omgdi:waypoint>
        <omgdi:waypoint x="475" y="284"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">
        <omgdi:waypoint x="435" y="164"></omgdi:waypoint>
        <omgdi:waypoint x="475" y="164"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">
        <omgdi:waypoint x="495" y="144"></omgdi:waypoint>
        <omgdi:waypoint x="495" y="111"></omgdi:waypoint>
        <omgdi:waypoint x="555" y="111"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow9" id="BPMNEdge_flow9">
        <omgdi:waypoint x="660" y="231"></omgdi:waypoint>
        <omgdi:waypoint x="700" y="231"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow10" id="BPMNEdge_flow10">
        <omgdi:waypoint x="660" y="111"></omgdi:waypoint>
        <omgdi:waypoint x="700" y="111"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow11" id="BPMNEdge_flow11">
        <omgdi:waypoint x="495" y="184"></omgdi:waypoint>
        <omgdi:waypoint x="495" y="231"></omgdi:waypoint>
        <omgdi:waypoint x="555" y="231"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow12" id="BPMNEdge_flow12">
        <omgdi:waypoint x="885" y="58"></omgdi:waypoint>
        <omgdi:waypoint x="925" y="58"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow13" id="BPMNEdge_flow13">
        <omgdi:waypoint x="720" y="91"></omgdi:waypoint>
        <omgdi:waypoint x="720" y="58"></omgdi:waypoint>
        <omgdi:waypoint x="780" y="58"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow14" id="BPMNEdge_flow14">
        <omgdi:waypoint x="720" y="131"></omgdi:waypoint>
        <omgdi:waypoint x="720" y="178"></omgdi:waypoint>
        <omgdi:waypoint x="780" y="178"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow15" id="BPMNEdge_flow15">
        <omgdi:waypoint x="885" y="178"></omgdi:waypoint>
        <omgdi:waypoint x="925" y="178"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>

To use it, I have definided a new contextModel called aloeModel.xml located at ..\tomcat\shared\classes\alfresco\extension\model    based on workflowModel.xml
Here is the code:

 <?xml version="1.0" encoding="UTF-8"?>

<model name="alo:aloeModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">

    <description>Modelo de datos para Proyecto Aloe</description>
    <author>Victor Feria</author>
    <version>1.0</version>

    <imports>
        <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"></import>
        <import uri="http://www.alfresco.org/model/bpm/1.0" prefix="bpm"></import>
        <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm" />
        <import uri="http://www.alfresco.org/model/workflow/1.0" prefix="wf"></import>
    </imports>

    <namespaces>
        <namespace uri="http://tabaiba.es/model/aloe/0.1" prefix="alo"/>
    </namespaces>

    <types>

      <!–  Submit review to multiple people (as included in a group) –>
      <type name="alo:submitGroupReviewTask">
         <parent>wf:submitGroupReviewTask</parent>
         <mandatory-aspects>
            <aspect>alo:empleado</aspect>
         </mandatory-aspects>

      </type> 

     
   <type name="alo:activitiReviewTask">   
   <parent>wf:activitiReviewTask</parent>
         <mandatory-aspects>
            <aspect>alo:empleado</aspect>
         </mandatory-aspects>       
   </type>
   <type name="alo:approvedTask">
         <parent>wf:approvedTask</parent>
      </type>

      <type name="alo:rejectedTask">
         <parent>wf:rejectedTask</parent>
      </type>
   </types>

<aspects>
    <aspect name="alo:empleado">
        <properties>
            <property name="alo:nombre">
                <type>d:text</type>
            </property>
            <property name="alo:apellidos">
                <type>d:text</type>
            </property>
            <property name="alo:dni">
                <type>d:text</type>
            </property>
        </properties>
    </aspect>
    <aspect name="alo:pasosAnteriores">
        <properties>
            <property name="alo:userNameValAnt">
                <type>d:text</type>
            </property>
            <property name="alo:groupNameValAnt">
                <type>d:text</type>
            </property>           
            <property name="alo:userNameValInicial">
                <type>d:text</type>
            </property>
            <property name="alo:groupNameValInicial">
                <type>d:text</type>
            </property>            
        </properties>
    </aspect>   

</aspects>
   

</model>
Until here everything seems to be correct. I have checked the repository console http://localhost:8080/alfresco/faces/jsp/admin/repoadmin-console.jsp and with the command show models all I obtain:
Last command: show models all
Duration: 15ms
—–
IsLoaded: Y , RepoVersion: null , RepoName: aloeModel.xml , ModelQName: {http://tabaiba.es/model/aloe/0.1}aloeModel , Description: Modelo de datos para Proyecto Aloe , Author: Victor Feria , Published: null , Version: 1.0

Now I want to create a new workflow form, to do this I have created the file share-config-custom.xml  located at ..\tomcat\webapps\share\WEB-INF\classes\alfresco\web-extension
My issue is that my changes in share-config-custom.xml  doesn’t affect the form showed, it ‘s always the same. If I do a hide instead of show the form doesn’t change.

<alfresco-config>


<!– Document Library config section –>
<config evaluator="string-compare" condition="DocumentLibrary">

<aspects>
    <!– Aspects that a user can see –>
    <visible>
        <aspect name="alo:empleados" />
        <aspect name="alo:pasosAnteriores" />
    </visible>
    <!– Aspects that a user can add. Same as "visible" if left empty –>
    <addable>
    </addable>
    <!– Aspects that a user can remove. Same as "visible" if left empty
    –>
    <removeable>
    </removeable>
</aspects>

<types>
    <type name="alo:submitGroupReviewTask">
    </type> 
   
    <type name="alo:activitiReviewTask">   
    </type>
   
    <type name="alo:approvedTask">
    </type>

    <type name="alo:rejectedTask">
    </type>
</types>
</config>





<config evaluator="aspect" condition="alo:empleados">
    <forms>
        <form>
            <field-visibility>
                <show id="alo:nombre" />
                <show id="alo:apellidos" />
                <show id="alo:dni" />
            </field-visibility>
            <appearance>
                <field id="alo:nombre" label-id="workflow.field.nombre" />
                <field id="alo:apellidos" label-id="workflow.field.apellidos" />
                <field id="alo:dni" label-id="workflow.field.dni" />
            </appearance>
        </form>
    </forms>
</config>


<config evaluator="task-type" condition="alo:submitGroupReviewTask">
    <forms>
        <form id="workflow-details">
            <field-visibility>
               <show id="bpm:groupAssignee" />
               <show id="wf:requiredApprovePercent" />
               <show id="packageItems" />

            </field-visibility>
            <appearance>
               <set id="" appearance="title" label-id="workflow.set.workflow.more_info" />
               <set id="items" appearance="title" label-id="workflow.set.items" />
              
               <field id="bpm:groupAssignee" label-id="workflow.field.review_group" />
               <field id="wf:requiredApprovePercent" />
               <field id="packageItems" set="items" />
            </appearance>
         </form>
        
         <form>
            <field-visibility>
               <show id="message" />
               <show id="taskOwner" />
               <show id="bpm:workflowPriority" />
               <show id="bpm:workflowDueDate" />
               <show id="bpm:taskId" />
               <show id="wf:requiredApprovePercent" />
               <show id="bpm:status" />
               <show id="packageItems" />
               <show id="alo:nombre" />
               <show id="alo:apellidos" />
               <show id="alo:dni" />
      
            </field-visibility>
            <appearance>
               <set id="" appearance="title" label-id="workflow.set.task.info" />
               <set id="info" appearance="" template="/org/alfresco/components/form/3-column-set.ftl" />
               <set id="progress" appearance="title" label-id="workflow.set.task.progress" />
               <set id="items" appearance="title" label-id="workflow.set.items" />
              
               <field id="message">
                  <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>
               <field id="taskOwner" set="info" />
               <field id="bpm:taskId" set="info">
                  <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>
               <field id="bpm:workflowPriority" label-id="workflow.field.priority" set="info" read-only="true">
                  <control template="/org/alfresco/components/form/controls/workflow/priority.ftl" />
               </field>
               <field id="bpm:workflowDueDate" set="info" label-id="workflow.field.due">
                  <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>
               <field id="wf:requiredApprovePercent" set="info" />
               <field id="bpm:status" set="progress" />
               <field id="packageItems" set="items" />
               <field id="alo:nombre" label-id="workflow.field.nombre">
                <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>
               <field id="alo:apellidos" label-id="workflow.field.apellidos">
                <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>
               <field id="alo:dni" label-id="workflow.field.dni">
                <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>
            </appearance>
         </form>
      </forms>
   </config>

</alfresco-config>

Of course I have restarted tomcat after a change in share-config-custom.xml and of course the PropContratacionNominativav2.bpmn20.xml has been deployed from workflow console with

deploy activiti alfresco/extension/workflow/PropContratacionNominativav2.bpmn20.xml

I don’t know what I’m doing wrong and why the form doesn't follow my changes in share-config-custom.xml 

Please could somebody help me?
Regards
Víctor
13 REPLIES 13

jpotts
World-Class Innovator
World-Class Innovator
We traded emails this morning and I suggested adding "activiti$" to the form config evaluator, like this:
<config evaluator="aspect" condition="activiti$alo:empleados">
Have you had a chance to try it?

Jeff

scitrx
Champ in-the-making
Champ in-the-making
Hi,
I've experienced a similar issue caused by the lack of this predecessing "activiti$" string. Could you explain what the difference is in processing with and without activiti?

Many thanks,
Daniel

vferia15
Champ in-the-making
Champ in-the-making
Yes, now it's working.
Thank you Jeff.

Now I'm modifying the form.

vferia15
Champ in-the-making
Champ in-the-making
Ok, now it works, but please, one more question,

Is it possible as in models (modify from Alfresco Explorer Company Home/Data Dictionary/Models) or in webscripts (modify from Alfresco Explorer Company Home/Data Dictionary/Web Script Extension) modify a form dinamically from Alfresco Explorer Company Home/Data Dictionary/Web Client Extension?

I would like to modify my workflow form (for example "alo:submitGroupReviewTask"), that is included in shared-config-custom.xml without restart tomcat, is it possible?
Is there other way to do it?


<alfresco-config>


<!– Document Library config section –>
<config evaluator="string-compare" condition="DocumentLibrary">

<aspects>
    <!– Aspects that a user can see –>
    <visible>
        <aspect name="alo:empleados" />
        <aspect name="alo:pasosAnteriores" />
    </visible>
    <!– Aspects that a user can add. Same as "visible" if left empty –>
    <addable>
    </addable>
    <!– Aspects that a user can remove. Same as "visible" if left empty
    –>
    <removeable>
    </removeable>
</aspects>

<types>
    <type name="alo:submitGroupReviewTask">
    </type> 
   
    <type name="alo:activitiReviewTask">   
    </type>
   
    <type name="alo:approvedTask">
    </type>

    <type name="alo:rejectedTask">
    </type>
</types>
</config>

<config evaluator="aspect" condition="activiti$alo:empleados">
    <forms>
        <form>
            <field-visibility>
                <show id="alo:nombre" />
                <show id="alo:apellidos" />
                <show id="alo:dni" />
            </field-visibility>
            <appearance>
                <field id="alo:nombre" label-id="workflow.field.nombre" />
                <field id="alo:apellidos" label-id="workflow.field.apellidos" />
                <field id="alo:dni" label-id="workflow.field.dni" />
            </appearance>
        </form>
    </forms>
</config>

<!–MODIFICACIONES VICTOR –>
   <!– Activiti Pooled Review and Approve Workflow Definition –>
   <config evaluator="string-compare" condition="activiti$PropContratacionNominativav2">
      <forms>
         <form>
            <field-visibility>
               <show id="bpm:workflowDescription" />
               <show id="bpm:workflowDueDate" />
               <show id="bpm:workflowPriority" />
               <show id="bpm:groupAssignee" />
               <show id="wf:requiredApprovePercent" />
               <show id="packageItems" />
               <show id="alo:nombre" />
               <show id="alo:apellidos" />
               <show id="alo:dni" />              
            </field-visibility>
            <appearance>
               <set id="" appearance="title" label-id="workflow.set.general" />
               <set id="info" appearance="" template="/org/alfresco/components/form/2-column-set.ftl" />
               <set id="assignee" appearance="title" label-id="workflow.set.assignee" />
               <set id="items" appearance="title" label-id="workflow.set.items" />
              
               <field id="bpm:workflowDescription" label-id="workflow.field.message">
                  <control template="/org/alfresco/components/form/controls/textarea.ftl">
                     <control-param name="style">width: 95%</control-param>
                  </control>
               </field>
               <field id="bpm:workflowDueDate" label-id="workflow.field.due" set="info" />
               <field id="bpm:workflowPriority" label-id="workflow.field.priority" set="info">
                  <control template="/org/alfresco/components/form/controls/workflow/priority.ftl" />
               </field>
               <field id="bpm:groupAssignee" label-id="workflow.field.review_group" set="assignee" />
               <field id="wf:requiredApprovePercent" set="assignee" />
               <field id="packageItems" set="items" />
               <field id="alo:nombre" label-id="workflow.field.nombre" set="info"/>
               <field id="alo:apellidos" label-id="workflow.field.apellidos" set="info" />
               <field id="alo:dni" label-id="workflow.field.dni" set="info" />
            </appearance>
         </form>
      </forms>
   </config>


   <config evaluator="task-type" condition="alo:submitGroupReviewTask">
      <forms>
         <form id="workflow-details">
            <field-visibility>
               <show id="bpm:groupAssignee" />
               <show id="wf:requiredApprovePercent" />
               <show id="packageItems" />
            </field-visibility>
            <appearance>
               <set id="" appearance="title" label-id="workflow.set.workflow.more_info" />
               <set id="items" appearance="title" label-id="workflow.set.items" />
              
               <field id="bpm:groupAssignee" label-id="workflow.field.review_group" />
               <field id="wf:requiredApprovePercent" />
               <field id="packageItems" set="items" />
            </appearance>
         </form>
        
         <form>
            <field-visibility>
               <show id="message" />
               <show id="taskOwner" />
               <show id="bpm:workflowPriority" />
               <show id="bpm:workflowDueDate" />
               <show id="bpm:taskId" />
               <show id="wf:requiredApprovePercent" />
               <show id="bpm:status" />
               <show id="packageItems" />
               <show id="alo:nombre" />
               <show id="alo:apellidos" />
               <show id="alo:dni" />                  
            </field-visibility>
            <appearance>
               <set id="" appearance="title" label-id="workflow.set.task.info" />
               <set id="info" appearance="" template="/org/alfresco/components/form/3-column-set.ftl" />
               <set id="progress" appearance="title" label-id="workflow.set.task.progress" />
               <set id="items" appearance="title" label-id="workflow.set.items" />
              
               <field id="message">
                  <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>
               <field id="taskOwner" set="info" />
               <field id="bpm:taskId" set="info">
                  <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>
               <field id="bpm:workflowPriority" label-id="workflow.field.priority" set="info" read-only="true">
                  <control template="/org/alfresco/components/form/controls/workflow/priority.ftl" />
               </field>
               <field id="bpm:workflowDueDate" set="info" label-id="workflow.field.due">
                  <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>
               <field id="wf:requiredApprovePercent" set="info" />
               <field id="bpm:status" set="progress" />
               <field id="packageItems" set="items" />
               <field id="alo:nombre" label-id="workflow.field.nombre" set="info"/>
               <field id="alo:apellidos" label-id="workflow.field.apellidos" set="info" />
               <field id="alo:dni" label-id="workflow.field.dni" set="info" />              
            </appearance>
         </form>
      </forms>
   </config>


   <config evaluator="task-type" condition="alo:activitiReviewTask">
      <forms>
         <form>
            <field-visibility>
               <show id="message" />
               <show id="taskOwner" />
               <show id="bpm:priority" />
               <show id="bpm:dueDate" />
               <show id="bpm:taskId" />
               <show id="bpm:status" />
               <show id="packageItems" />
               <show id="bpm:comment" />
               <show id="wf:reviewOutcome" />
               <show id="alo:nombre" />
               <show id="alo:apellidos" />
               <show id="alo:dni" />                 
            </field-visibility>
            <appearance>
               <set id="" appearance="title" label-id="workflow.set.task.info" />
               <set id="info" appearance="" template="/org/alfresco/components/form/3-column-set.ftl" />
               <set id="progress" appearance="title" label-id="workflow.set.task.progress" />
               <set id="items" appearance="title" label-id="workflow.set.items" />
               <set id="response" appearance="title" label-id="workflow.set.response" />

               <field id="message">
                  <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>
               <field id="taskOwner" set="info" />
               <field id="bpm:taskId" set="info">
                  <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>
               <field id="bpm:priority" set="info" read-only="true">
                  <control template="/org/alfresco/components/form/controls/workflow/priority.ftl" />
               </field>
               <field id="bpm:dueDate" set="info" label-id="workflow.field.due">
                  <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>
               <field id="bpm:status" set="progress" />
               <field id="packageItems" set="items" />
               <field id="bpm:comment" label-id="workflow.field.comment" set="response">
                  <control template="/org/alfresco/components/form/controls/textarea.ftl" />
               </field>
               <field id="wf:reviewOutcome" label-id="workflow.field.outcome" set="response">
                  <control template="/org/alfresco/components/form/controls/workflow/activiti-transitions.ftl" />
               </field>
               <field id="alo:nombre" label-id="workflow.field.nombre" set="info"/>
               <field id="alo:apellidos" label-id="workflow.field.apellidos" set="info" />
               <field id="alo:dni" label-id="workflow.field.dni" set="info" />               
            </appearance>
         </form>
      </forms>
   </config>


  
   <config evaluator="task-type" condition="alo:approvedTask">
      <forms>
         <form>
            <field-visibility>
               <show id="message" />
               <show id="taskOwner" />
               <show id="bpm:priority" />
               <show id="bpm:dueDate" />
               <show id="bpm:taskId" />
               <show id="bpm:status" />
               <show id="packageItems" />
               <show id="bpm:comment" />
               <show id="transitions" />
               <show id="alo:nombre" />
               <show id="alo:apellidos" />
               <show id="alo:dni" />                
            </field-visibility>
            <appearance>
               <set id="" appearance="title" label-id="workflow.set.task.info" />
               <set id="info" appearance="" template="/org/alfresco/components/form/3-column-set.ftl" />
               <set id="progress" appearance="title" label-id="workflow.set.task.progress" />
               <set id="items" appearance="title" label-id="workflow.set.items" />
               <set id="response" appearance="title" label-id="workflow.set.response" />
              
               <field id="message">
                  <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>
               <field id="taskOwner" set="info" />
               <field id="bpm:taskId" set="info">
                  <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>
               <field id="bpm:priority" set="info" read-only="true">
                  <control template="/org/alfresco/components/form/controls/workflow/priority.ftl" />
               </field>
               <field id="bpm:dueDate" set="info" label-id="workflow.field.due">
                  <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>
               <field id="bpm:status" set="progress" />
               <field id="packageItems" set="items" />
               <field id="bpm:comment" label-id="workflow.field.comment" set="response">
                  <control template="/org/alfresco/components/form/controls/textarea.ftl" />
               </field>
               <field id="transitions" set="response" />
               <field id="alo:nombre" label-id="workflow.field.nombre" set="info"/>
               <field id="alo:apellidos" label-id="workflow.field.apellidos" set="info" />
               <field id="alo:dni" label-id="workflow.field.dni" set="info" />              
            </appearance>
         </form>
      </forms>
   </config>
  
   <config evaluator="task-type" condition="alo:rejectedTask">
      <forms>
         <form>
            <field-visibility>
               <show id="message" />
               <show id="taskOwner" />
               <show id="bpm:priority" />
               <show id="bpm:dueDate" />
               <show id="bpm:taskId" />
               <show id="bpm:status" />
               <show id="packageItems" />
               <show id="bpm:comment" />
               <show id="transitions" />
               <show id="alo:nombre" />
               <show id="alo:apellidos" />
               <show id="alo:dni" />                 
            </field-visibility>
            <appearance>
               <set id="" appearance="title" label-id="workflow.set.task.info" />
               <set id="info" appearance="" template="/org/alfresco/components/form/3-column-set.ftl" />
               <set id="progress" appearance="title" label-id="workflow.set.task.progress" />
               <set id="items" appearance="title" label-id="workflow.set.items" />
               <set id="response" appearance="title" label-id="workflow.set.response" />
              
               <field id="message">
                  <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>
               <field id="taskOwner" set="info" />
               <field id="bpm:taskId" set="info">
                  <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>
               <field id="bpm:priority" set="info" read-only="true">
                  <control template="/org/alfresco/components/form/controls/workflow/priority.ftl" />
               </field>
               <field id="bpm:dueDate" set="info" label-id="workflow.field.due">
                  <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>
               <field id="bpm:status" set="progress" />
               <field id="packageItems" set="items" />
               <field id="bpm:comment" label-id="workflow.field.comment" set="response">
                  <control template="/org/alfresco/components/form/controls/textarea.ftl" />
               </field>
               <field id="transitions" set="response" />
               <field id="alo:nombre" label-id="workflow.field.nombre" set="info"/>
               <field id="alo:apellidos" label-id="workflow.field.apellidos" set="info" />
               <field id="alo:dni" label-id="workflow.field.dni" set="info" />              
            </appearance>
         </form>
      </forms>
   </config>









<!–



<config evaluator="string-compare" condition="activiti$alo:submitGroupReviewTask">
    <forms>
        <form id="workflow-details">
            <field-visibility>
               <show id="bpm:groupAssignee" />
               <show id="wf:requiredApprovePercent" />
               <show id="packageItems" />

            </field-visibility>
            <appearance>
               <set id="" appearance="title" label-id="workflow.set.workflow.more_info" />
               <set id="items" appearance="title" label-id="workflow.set.items" />
              
               <field id="bpm:groupAssignee" label-id="workflow.field.review_group" />
               <field id="wf:requiredApprovePercent" />
               <field id="packageItems" set="items" />
            </appearance>
         </form>
        
         <form>
            <field-visibility>
               <show id="message" />
               <show id="taskOwner" />
               <show id="bpm:workflowPriority" />
               <show id="bpm:workflowDueDate" />
               <show id="bpm:taskId" />
               <show id="wf:requiredApprovePercent" />
               <show id="bpm:status" />
               <show id="packageItems" />
               <show id="alo:nombre" />
               <show id="alo:apellidos" />
               <show id="alo:dni" />
      
            </field-visibility>
            <appearance>
               <set id="" appearance="title" label-id="workflow.set.task.info" />
               <set id="info" appearance="" template="/org/alfresco/components/form/3-column-set.ftl" />
               <set id="progress" appearance="title" label-id="workflow.set.task.progress" />
               <set id="items" appearance="title" label-id="workflow.set.items" />
              
               <field id="message">
                  <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>
               <field id="taskOwner" set="info" />
               <field id="bpm:taskId" set="info">
                  <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>
               <field id="bpm:workflowPriority" label-id="workflow.field.priority" set="info" read-only="true">
                  <control template="/org/alfresco/components/form/controls/workflow/priority.ftl" />
               </field>
               <field id="bpm:workflowDueDate" set="info" label-id="workflow.field.due">
                  <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>
               <field id="wf:requiredApprovePercent" set="info" />
               <field id="bpm:status" set="progress" />
               <field id="packageItems" set="items" />
               <field id="alo:nombre" label-id="workflow.field.nombre">
                <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>
               <field id="alo:apellidos" label-id="workflow.field.apellidos">
                <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>
               <field id="alo:dni" label-id="workflow.field.dni">
                <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>
            </appearance>
         </form>
      </forms>
   </config>




   <config evaluator="string-compare" condition="activiti$alo:activitiReviewTask">
      <forms>
         <form>
            <field-visibility>
               <show id="message" />
               <show id="taskOwner" />
               <show id="bpm:priority" />
               <show id="bpm:dueDate" />
               <show id="bpm:taskId" />
               <show id="bpm:status" />
               <show id="packageItems" />
               <show id="bpm:comment" />
               <show id="wf:reviewOutcome" />
               <show id="alo:nombre" />
               <show id="alo:apellidos" />
               <show id="alo:dni" />
            </field-visibility>
            <appearance>
               <set id="" appearance="title" label-id="workflow.set.task.info" />
               <set id="info" appearance="" template="/org/alfresco/components/form/3-column-set.ftl" />
               <set id="progress" appearance="title" label-id="workflow.set.task.progress" />
               <set id="items" appearance="title" label-id="workflow.set.items" />
               <set id="response" appearance="title" label-id="workflow.set.response" />

               <field id="message">
                  <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>
               <field id="taskOwner" set="info" />
               <field id="bpm:taskId" set="info">
                  <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>
               <field id="bpm:priority" set="info" read-only="true">
                  <control template="/org/alfresco/components/form/controls/workflow/priority.ftl" />
               </field>
               <field id="bpm:dueDate" set="info" label-id="workflow.field.due">
                  <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>
               <field id="bpm:status" set="progress" />
               <field id="packageItems" set="items" />
               <field id="bpm:comment" label-id="workflow.field.comment" set="response">
                  <control template="/org/alfresco/components/form/controls/textarea.ftl" />
               </field>
               <field id="wf:reviewOutcome" label-id="workflow.field.outcome" set="response">
                  <control template="/org/alfresco/components/form/controls/workflow/activiti-transitions.ftl" />
               </field>
               <field id="alo:nombre" label-id="workflow.field.nombre">
                <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>
               <field id="alo:apellidos" label-id="workflow.field.apellidos">
                <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>
               <field id="alo:dni" label-id="workflow.field.dni">
                <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>              
            </appearance>
         </form>
      </forms>
   </config>
  
   <config evaluator="string-compare" condition="activiti$alo:approvedTask">
      <forms>
         <form>
            <field-visibility>
               <show id="message" />
               <show id="taskOwner" />
               <show id="bpm:priority" />
               <show id="bpm:dueDate" />
               <show id="bpm:taskId" />
               <show id="bpm:status" />
               <show id="packageItems" />
               <show id="bpm:comment" />
               <show id="transitions" />
            </field-visibility>
            <appearance>
               <set id="" appearance="title" label-id="workflow.set.task.info" />
               <set id="info" appearance="" template="/org/alfresco/components/form/3-column-set.ftl" />
               <set id="progress" appearance="title" label-id="workflow.set.task.progress" />
               <set id="items" appearance="title" label-id="workflow.set.items" />
               <set id="response" appearance="title" label-id="workflow.set.response" />
              
               <field id="message">
                  <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>
               <field id="taskOwner" set="info" />
               <field id="bpm:taskId" set="info">
                  <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>
               <field id="bpm:priority" set="info" read-only="true">
                  <control template="/org/alfresco/components/form/controls/workflow/priority.ftl" />
               </field>
               <field id="bpm:dueDate" set="info" label-id="workflow.field.due">
                  <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>
               <field id="bpm:status" set="progress" />
               <field id="packageItems" set="items" />
               <field id="bpm:comment" label-id="workflow.field.comment" set="response">
                  <control template="/org/alfresco/components/form/controls/textarea.ftl" />
               </field>
               <field id="transitions" set="response" />
            </appearance>
         </form>
      </forms>
   </config>
  
   <config evaluator="string-compare" condition="activiti$alo:rejectedTask">
      <forms>
         <form>
            <field-visibility>
               <show id="message" />
               <show id="taskOwner" />
               <show id="bpm:priority" />
               <show id="bpm:dueDate" />
               <show id="bpm:taskId" />
               <show id="bpm:status" />
               <show id="packageItems" />
               <show id="bpm:comment" />
               <show id="transitions" />
            </field-visibility>
            <appearance>
               <set id="" appearance="title" label-id="workflow.set.task.info" />
               <set id="info" appearance="" template="/org/alfresco/components/form/3-column-set.ftl" />
               <set id="progress" appearance="title" label-id="workflow.set.task.progress" />
               <set id="items" appearance="title" label-id="workflow.set.items" />
               <set id="response" appearance="title" label-id="workflow.set.response" />
              
               <field id="message">
                  <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>
               <field id="taskOwner" set="info" />
               <field id="bpm:taskId" set="info">
                  <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>
               <field id="bpm:priority" set="info" read-only="true">
                  <control template="/org/alfresco/components/form/controls/workflow/priority.ftl" />
               </field>
               <field id="bpm:dueDate" set="info" label-id="workflow.field.due">
                  <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>
               <field id="bpm:status" set="progress" />
               <field id="packageItems" set="items" />
               <field id="bpm:comment" label-id="workflow.field.comment" set="response">
                  <control template="/org/alfresco/components/form/controls/textarea.ftl" />
               </field>
               <field id="transitions" set="response" />
            </appearance>
         </form>
      </forms>
   </config>

–>

</alfresco-config>


Regards
Victor

jpotts
World-Class Innovator
World-Class Innovator
Models placed in the repository can be modified and reloaded without a restart. I believe you have to go into the content model console to do that reload.

Web Scripts placed in the repository, or placed in the file system in the classpath assuming they've been loaded on startup once, can be modified and reloaded without a restart. Use the Web Scripts index to refresh web scripts. Share also has a Web Scripts index so you can refresh web scripts deployed to the Share tier as well.

Similar to the content model console, I believe the Explorer UI has a console which can be used to reload config placed in web-client-config-custom.xml.

For Share, however, I'm not sure. I'm not aware of a UI console for Share. You could try modifying it and then reload the Share tier web scripts.

One thing you may want to do if you haven't already is run your Share web app in a separate Tomcat container. A Tomcat running only Share restarts in a few seconds.

Jeff

vferia15
Champ in-the-making
Champ in-the-making
Hi,

I have not found a web console to share but for alfresco is http://127.0.0.1:8080/alfresco/faces/jsp/admin/webclientconfig-console.jsp as Jeff said.

By other way in alfresco add-ons http://addons.alfresco.com/ there are very interesting things. One of them is http://becpg.fr/en/contribs development by Philippe Quere and Matthieu.

This Alfresco module provides a designer allowing to create new types, aspects and forms in Alfresco directly in the Share user interface.

The interface is simple and intuitive. It finally allows to create, test and publish models and forms directly in Alfresco without editing XML files manually, takes in account hot deployments. Use of drag'n drop and creation wizards accelerate developments of data models.

This designer permits also to create models and forms for Workflow.

Great job and thank for the people that share their work.

Regards
Victor

michalwrobel
Champ on-the-rise
Champ on-the-rise
For Share, however, I'm not sure. I'm not aware of a UI console for Share. You could try modifying it and then reload the Share tier web scripts.

Yes, reloading Share webscripts reloads also forms definitions.

clperkins
Champ on-the-rise
Champ on-the-rise
This designer permits also to create models and forms for Workflow.

I've been playing around with this add-on a lot and it is really great to be able to accomplish so much within the browser, but as of yet I do not believe it supports modeling forms for workflows.

matthieulaborie
Champ in-the-making
Champ in-the-making
This designer permits also to create models and forms for Workflow.

I've been playing around with this add-on a lot and it is really great to be able to accomplish so much within the browser, but as of yet I do not believe it supports modeling forms for workflows.

The designer normaly allow to create workflow task model and forms.
To do it:

Create a new type and shoes worflow task model.
Add properties to your type.
Publish the type
Drag and drop the new type into the form tree and add corresponding controls.
Publish the form

Don't forget to add bpm namespace in your model imports before publishing. (better is to create a new xml model file into dictionnary/model for workflow models)

Next in the roadmap:

We will create a rule that parse an activiti workflow definition and automatically create corresponding type and forms before deploying the workflow.
Should be done by end of april.