cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Outcome in Workflow History (4.0d)

anthonylau
Champ in-the-making
Champ in-the-making
I have created a custom workflow with Activiti. The outcome history is always "Task Done". I want to change the "Task Done" message. I have tried to add "workflowtask.outcome.OK=OK" in message properties file but no success. Any suggestion is Welcome

Task Type definition:
<type name="mywf:documentCheckTask">   <parent>bpm:activitiOutcomeTask</parent>   <properties>      <property name="mywf:docCheckOutcome">         <type>d:text</type>         <default>FAIL</default>         <constraints>            <constraint name="mywf:docCheckOutcomeOptions" type="LIST">               <parameter name="allowedValues">                  <list>                     <value>OK</value>                     <value>FAIL</value>                  </list>               </parameter>            </constraint>         </constraints>      </property>   </properties>   <overrides>      <property name="bpm:packageItemActionGroup">         <default>read_package_item_actions</default>      </property>      <property name="bpm:outcomePropertyName">         <default>{http://www.alfresco.org/model/mywf/1.0}mywf:docCheckOutcome</default>      </property>   </overrides></type>‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

share-config-custom.xml
<config evaluator="task-type" condition="mywf:documentCheckTask">   <forms>      <form>         <field-visibility>            <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="mywf:docCheckOutcome" />         </field-visibility>         <appearance>            <set id="" appearance="title" label-id="workflow.set.task.info" />            <set id="info" appearance="title" label-id="workflow.set.task.info"               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="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="mywf:docCheckOutcome" label-id="workflow.field.outcome"               set="response">               <control                  template="/org/alfresco/components/form/controls/workflow/activiti-transitions.ftl" />            </field>         </appearance>      </form>   </forms></config>‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

Thanks,
Anthony
9 REPLIES 9

mitpatoliya
Star Collaborator
Star Collaborator
I think you are using this property for out come
mywf:docCheckOutcome
whose label-id iis "workflow.field.outcome"

So you have to do the entry for this property in your property file.

anthonylau
Champ in-the-making
Champ in-the-making
Thanks Mits

I have added properties with no success
workflow.field.outcome.mywf_docCheckOutcome.OK=OKmywf_workflowmodel.mywf_docCheckOutcomeOptions.OK=OKlistconstraint.mywf_docCheckOutcomeOptions.OK=OK‍‍‍‍‍

mitpatoliya
Star Collaborator
Star Collaborator
Try with just this
workflow.field.outcome=OK

morgan
Champ in-the-making
Champ in-the-making
Hi there Mitpatoliya,

Did you find the solution for custom outcome. I tried what was in the posts but could not get it to work. Is it possible to post the solution.

Morgan

Hi! Did you find the answer? I have the same question. Thanks.

I posted a solution here - http://blog.itdhq.com/post/57642708306/2013-08-08-alfresco-activiti-custom-task-outcome-message However, I'm not sure if it will work on 4.0.x, we tested on 4.1.x and 4.2.x only.

ashwinis
Champ in-the-making
Champ in-the-making
Hi,

I want to set custom outcome in the workflow details page for the workflow.

here is my sample code, i am not success in changing the outcome value. button label is getting changed.

Model :

<type name="demoWF:userReviewTask">
            <title>User Review Task</title>
            <parent>bpm:activitiOutcomeTask</parent>
            <properties>
               <property name="demoWF:userReviewOutcome">
                  <type>d:text</type>
                  <default>Reject</default>
                  <constraints>
                     <constraint ref="demoWF:userReviewOutcomeOptionConstraint" />
                  </constraints>
               </property>
            </properties>
            <overrides>
               <property name="bpmSmiley TongueackageItemActionGroup">
                  <default>edit_package_item_actions</default>
               </property>
               <property name="bpmSmiley SurprisedutcomePropertyName">
                  <default>{demoWF.workflowModel}userReviewOutcome</default>
               </property>
            </overrides>
         </type>
         
    <constraint name="demoWF:userReviewOutcomeOptionConstraint" type="LIST">
         <parameter name="allowedValues">
            <list>
                <value>Review</value>
                <value>Reject</value>
            </list>
         </parameter>
      </constraint>

Custom-properties:

listconstraint.demoWF:userReviewOutcomeOptionConstraint.Review=Review
workflowtask.outcome.Review=Document reviewed

ashwinis
Champ in-the-making
Champ in-the-making
Hi,

I want to set custom outcome in the workflow details page for the workflow.

here is my sample code, i am not success in changing the outcome value. button label is getting changed.

Model : attached
properties : attached

Please guide me.

svijay
Champ on-the-rise
Champ on-the-rise

Hi AshwiniS _

If you stilll seek for solution 

<property name="bpmSmiley SurprisedutcomePropertyName">
<default>{demoWF.workflowModel}userReviewOutcome</default>
</property>

instead of {demoWF.workflowModel} you will have to pass workflow model URI inside {}.

hi  anthonylau

There is mistake in below lines

<property name="bpm:outcomePropertyName">
         <default>{http://www.alfresco.org/model/mywf/1.0}mywf:docCheckOutcome</default>
      </property>
   </overrides>

it suppose to be

<property name="bpm:outcomePropertyName">
         <default>{http://www.alfresco.org/model/mywf/1.0}docCheckOutcome</default>
      </property>
   </overrides>
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.