cancel
Showing results for 
Search instead for 
Did you mean: 

How to get and manage Approve and Reject buttons

roseta
Champ in-the-making
Champ in-the-making
Hello to everybody,

I'm doing customized workflows with xml files. I'm mixing some 'out of the box' workflows like Adhoc task, or Review task… everythings works fine but I cannot get the "appove" and "reject" buttons while runing my workflow… It just shows a little button with no titlte that get the flow of the task to the first transition.  I would really appreciate any help. THANKS IN ADVANCE 😃
4 REPLIES 4

vinaxwater
Champ in-the-making
Champ in-the-making
Hi friend,
for you some info hope useful for you! please post code if you have error

File contain define all parameter in workflow:
alfresco/projects/repository/config/alfresco/model/bpmModel.xml

File define file xml workflow:
alfresco/projects/repository/config/alfresco/bootstrap-content.xml

File define file control workflow task:
alfresco/projects/repository/config/alfresco/workflow/workflowModel.xml

Regards
vinaxwater

roseta
Champ in-the-making
Champ in-the-making
Thanks anyway! But I just reinstaled my Alfresco and now I have those buttons without changing the code… it is rare, isn't it? (I am wondering: Why all my doubts solves itselves when I reinstal… It always work this way? )

Anyway, now I have another problem in the same simple workflow appears this error message when I push the "approve" button:

•A system error happened during the operation: 07110001 Failed to signal transition {0} from workflow task {1}.

Does anyone have any idea what does it means? THANKS

pp20218
Champ in-the-making
Champ in-the-making
Are you talking about "Review & Approve (Review & approval of content)" advance workflow available in the out of Box? If yes
check the review_processdefinition.xml located at alfresco/WEB-INF/classes/alfresco/workflow
Below code I have and working fine for me

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

<process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="wf:review">

    <swimlane name="initiator" />

    <start-state name="start">
        <task name="wf:submitReviewTask" swimlane="initiator" />
        <transition name="" to="review" />
    </start-state>

    <swimlane name="reviewer">
        <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
            <actor>#{bpm_assignee}</actor>
        </assignment>   
    </swimlane>

    <task-node name="review">
        <task name="wf:reviewTask" swimlane="reviewer">
            <event type="task-create">
                <script>
                    if (bpm_workflowDueDate != void) taskInstance.dueDate = bpm_workflowDueDate;
                    if (bpm_workflowPriority != void) taskInstance.priority = bpm_workflowPriority;
                </script>
            </event>
        </task>
        <transition name="approve" to="approved" />
        <transition name="reject" to="rejected" />
    </task-node>

    <task-node name="rejected">
        <task name="wf:rejectedTask" swimlane="initiator" />
        <transition name="" to="end" />
    </task-node>

    <task-node name="approved">
        <task name="wf:approvedTask" swimlane="initiator" />
        <transition name="" to="end" />
    </task-node>

    <end-state name="end" />

</process-definition>

roseta
Champ in-the-making
Champ in-the-making
Yeah… for me that works ok too. The problem comes when I try to do a "more complicated" workflow using this 'out of the box' files, combining the code and so on. I copy everything to my owns files and "no problems" apparently, but at the end when I run it, it does not work like the 'out of the box', and I should work this way because everthing is exactly the same… =(