Alfresco share add more workflow outcomes

0

I'm trying to make a personalized workflow using activiti in alfresco enterprise.

In that workflow there's an exclusive gateway with 3 possible outcomes:

  • Accept
  • Ask Another
  • Reject

The objective is to have those three options available and to allow the workflow to follow the right path depending on the option the user chooses (there's no default outcome here).

The problem:
I made the XML markup like it is asked in the instructions I found in the manual and placed it where it should be but, in the server, only the default "Task Done" button appears and not the buttons I mention in the XML.
I will paste here the relevant code related to this. If you need more, just ask in the comments by also saying which part do you need. Also, I have confirmed that alfresco is reading all the XML contents and everything, except that, is processing as it should.

tomcat/shared/classes/alfresco/web-extension/share-config-custom.xml

<alfresco-config>   
    <!-- Imports are required to allow references to definitions in other models -->
    <imports>
        <!-- Import Alfresco Dictionary Definitions -->
        <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d" />
        <!-- Import Alfresco Content Domain Model Definitions -->
        <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm" />
    </imports>

...

<config evaluator="task-type" condition="wf:selectSituation">
    <forms>
        <form>
            <field-visibility>
                <show id="message" />
                <show id="bpm:dueDate" />
                <show id="bpm:priority" />
                <show id="wf:workDescription" />
                <show id="packageItems" />
                <show id="bpm:comment" />
                <show id="wf:reviewOutcome" />
            </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="items" appearance="title" label-id="workflow.set.items" />
                <set id="work" appearance="title" label-id="workflow.set.work" />
                <set id="other" appearance="title" label-id="workflow.set.other" />
                <set id="response" appearance="title" label-id="workflow.set.response" />


                <field id="message" label-id="workflow.field.message">
                    <control template="/org/alfresco/components/form/controls/info.ftl" />
                </field>

                <field id="bpm:priority" label-id="workflow.field.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="packageItems" set="items" />

                <field id="wf:workDescription" set="work">
                    <control template="/org/alfresco/components/form/controls/info.ftl" />
                </field>

                <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" set="response" >
                    <control template="/org/alfresco/components/form/controls/workflow/activiti-transitions.ftl" />
                </field>

            </appearance>
        </form>
    </forms>
</config>

tomcat/shared/classes/alfresco/extension/model/customModel-custom.xml

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

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

    <imports>
        <!-- Import Alfresco Dictionary Definitions -->
        <import uri="http://www.alfresco.org/model/dictionary/1.0"
            prefix="d" />
        <!-- Import Alfresco System Definitions -->
        <import uri="http://www.alfresco.org/model/system/1.0" prefix="sys" />
        <!-- Import Alfresco Content Domain Model Definitions -->
        <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm" />
        <!-- Import User Model Definitions -->
        <import uri="http://www.alfresco.org/model/user/1.0" prefix="usr" />
        <import uri="http://www.alfresco.org/model/bpm/1.0" prefix="bpm" />
    </imports>

    <namespaces>
        <namespace uri="http://www.alfresco.org/model/workflow/1.0" prefix="wf" />
    </namespaces>

...

        <type name="wf:reviewEstimate">
            <parent>bpm:activitiOutcomeTask</parent>
            <properties>
                <property name="wf:reviewOutcome">
                    <type>d:text</type>
                    <default>Reject</default>
                    <constraints>
                        <constraint name="wf:reviewOutcomeOptions" type="LIST">
                            <parameter name="allowedValues">
                                <list>
                                    <value>Approve</value>
                                    <value>Ask Another</value>
                                    <value>Reject</value>
                                </list>
                            </parameter>
                        </constraint>
                    </constraints>
                </property>
            </properties>
            <overrides>
                <property name="bpm:packageItemActionGroup">
                    <default>edit_package_item_actions</default>
                </property>
                <property name="bpm:outcomePropertyName">
                    <default>{http://www.alfresco.org/model/workflow/1.0}reviewOutcome
                    </default>
                </property>
            </overrides>
            <mandatory-aspects>
                <aspect>bpm:assignee</aspect>
                <aspect>wf:workInfo</aspect>
            </mandatory-aspects>
        </type>

...

I wanted to use the "alfresco-share" tag but it does not exist. Same for the "alfresco" tag.

brunoais

Posted 2013-11-26T08:56:22.887

Reputation: 165

Answers

0

The problem here is that the guide I was using was using the "wf" namespace as the namespace of everything it was doing. Seems like the "wf" namespace is reserved or became reserved after the guide was made (mid 2012) and so it was causing some things to work and other things not to work.

I changed the namespace and this part started working as expected.

brunoais

Posted 2013-11-26T08:56:22.887

Reputation: 165