0
votes

I am using Alfreso 4.2c and Activiti to create my workflows. I have a requirement when in each task I need to provide different Actions to users. For example, in of the Task I need to give Actions like "Re-Schedule Meeting", "Cancel Meeting", "Send to Practice Head", and "Cancel" instead of only "Task Done" and "Cancel". I have overridded the "bpm:outcomePropertyName", but it only changes the Outcome Label in Workflow History.

Can anyone guide me on how can I achieve this? Thank you in advance.

2

2 Answers

1
votes

You've to define your own outcome-contraint for in your workflow-model,e.g:

     <type name="my:myTask">
        <parent>wf:activitiReviewTask</parent>
        <overrides>
             <property name="wf:reviewOutcome">
                    <default>Restart Review</default>
                    <constraints>
                        <constraint name="my:myOutcomeOptions" type="LIST">
                            <parameter name="allowedValues">
                                <list>
                                    <value>Approve</value>
                                    <value>Restart Review</value>
                                    <value>Reject</value>
                                </list>
                            </parameter>
                        </constraint>
                    </constraints>
                </property>
        </overrides>
      </type>

Of course, you'll have to add your custom sequence-flows to your workflow definition.

    <exclusiveGateway id="reviewDecision" name="Review Decision"></exclusiveGateway>
    <sequenceFlow id="flow3" name="" sourceRef="reviewDecision" targetRef="ReviewRejected">
        <conditionExpression xsi:type="tFormalExpression">${wf_reviewOutcome == 'Reject'}</conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow3" name="" sourceRef="reviewDecision" targetRef="RestartReview">
        <conditionExpression xsi:type="tFormalExpression">${wf_reviewOutcome == 'Restart Review'}</conditionExpression>
    </sequenceFlow>

...

0
votes

Custom actions are implemented using buttons - in activiti grails vacation request sample application. For eg. to save the entered task data, and not to complete the task. However, custom code in grails is written to achieve this functionality. I wish, there is some standard way in activiti that buttons are added as standard form components.