10-16-2019 02:23 AM
Hi everyone,
I want to when I click on the "Reject" button to get a message asking the user to confirm that I want Reject?
Please guide me.
Thank !
10-16-2019 11:59 AM
Is this something you are doing with Activiti?
10-16-2019 07:14 PM
Hi jljwoznica,
Thank you for your interest in the problem I'm having.
>>Is this something you are doing with Activity?
Yes, When I review documents, I want a message to be displayed to confirm "Reject". After I click button "Reject"
11-12-2019 08:27 PM
Hi,
I define own outcome-contraint for in workflow-model same as (File: test-model.xml):
<constraints> <constraint name="my:myOutcomeOptions" type="LIST"> <parameter name="allowedValues"> <list> <value>Approve</value> <value>Reject</value> </list> </parameter> </constraint> </constraints>
And custom sequence-flows to workflow definition (File: test.bpmn20.xml):
<exclusiveGateway id="exclusiveGateway1"</exclusiveGateway> <sequenceFlow id="flow3" name="Rejected" sourceRef="exclusiveGateway1" targetRef="Rejected"> <conditionExpression xsi:type="tFormalExpression"> <![CDATA[${test_a1approvecount < test_a2approvecount}]]> </conditionExpression> </sequenceFlow>
I want to when I click button "Reject" showing popup confirm and after click button in popup confirm (OK and Cancel) display change to dashboard. Please help me!
Thank you advance!
11-12-2019 11:26 PM
Ok, let's start from the beginning. What you describe in workflow model in
<constraint name="my:myOutcomeOptions" type="LIST">
are so called "transitions". Usually they are rendered by template and JavaScript
"/org/alfresco/components/form/controls/workflow/activiti-transitions.ftl"
"/components/form/workflow/activiti-transitions.js"
The teplate which is used for transition elements rendering is controlled by share-config-custom.xml in a following way:
<form>
<appearance>
<field id="my:myOutcomeOptions" label-id="workflow.field.outcome" set="response">
<control template="/org/alfresco/components/form/controls/workflow/activiti-transitions.ftl" />
</field>
</appearance>
</form>
I suppose the place to create your custom pop-up is in here "/components/form/workflow/activiti-transitions.js"
There is a function called "onClick". If I would need to implement similar pop-up I'd do it in this function using
Alfresco.util.PopupManager
Hope this helps!
Explore our Alfresco products with the links below. Use labels to filter content by product module.