I integrate the applet into the workflow in Alfresco. I created a new button org/alfresco/components/form/controls/workflow/activiti-transitions.ftlhere
...
<button onclick="changePDF(); this.disabled=true; return false;"> Change </button>
<div id="pdfTexto" style="width:1000px;height:1000px"></div>
<div class="applet">
<script type="text/javascript">
deploy();
</script>
</div>
</#if>
And this change button (via javascript applet) invokes the functionality of the applet, which makes changes to the file of the corresponding workflow. After that I want to put "Approved"how the button does it accept. But I want to do this only after the changes take effect. My applet returns "ok"when the changes are completed (the POST request is completed), after that I want to put "Approved"and redirect to the same page as the "accept" buttons for redirection. In the summary, after "ok", do what the accept button does.
:
http://localhost:8080/share/proxy/alfresco/api/upload...
? , ?
:
:
var form = new FormData();
form.append("prop_wf_reviewOutcome","Approve");
form.append("prop_bpm_comment","good");
form.append("prop_transitions","Next");
var requestTask = new XMLHttpRequest();
requestTask[Alfresco.util.CSRFPolicy.getHeader()] = Alfresco.util.CSRFPolicy.getToken();
requestTask.open("POST", "http://localhost:8080/share/proxy/alfresco/api/task/"+ taskidVar+ "/formprocessor" + "?" + Alfresco.util.CSRFPolicy.getParameter() + "=" + encodeURIComponent(Alfresco.util.CSRFPolicy.getToken()));
requestTask.send(form);
"".