cancel
Showing results for 
Search instead for 
Did you mean: 

Add Actions or Workflow to the Word Plugin List of Actions

snave
Champ in-the-making
Champ in-the-making
We need to be able to see the actions created through rules in the Word Plugin panel. How can we do this? We're new to Alfresco and are on 2.1, version 2.1.0 (482) the release candidate. Or is there a way to customize the basic approve and reject buttons when you choose to Manage the Task in the plugin? We would prefer to work only through MS Word and the plugin if possible. Any info would be helpful.
10 REPLIES 10

mikeh
Star Contributor
Star Contributor
Hi

Can you clarify what you mean by "see actions created through rules" please? Do you have an example and/or use case you're trying to achieve?

Currently, the buttons appearing on the manage task tab are sourced from the transitions for the workflow assigned to the active user. So a Review task, for example, first has "Approve" and "Reject", then "Task Done" depending on its current state.

Thanks,
Mike

snave
Champ in-the-making
Champ in-the-making
I have a simple workflow rule that moves a document to the Reviewing space on approval and back to Authoring space if rejected. When using the Word Plugin, I select a doc and the info shows in the View Details tab. I would like to see my workflow in the Document Actions pane, but I only see:  Check Out, Start Workflow, Transform to PDF, and Open Full Details. I know I can select Open Full Details and get to it that way, but we want these users to only work in MS Word and the plugin.
If I try to accomplish this through My Tasks on the plugin, I select the My Tasks tab and then the task to review and approve. I select the Manage Task button and the Task Properties window appears. Under the Actions column in the Resources section, I see View Content Properties, Edit Content Properties, Edit, Update, and Check Out. I do not see the action I created in my simple workflow to Approve and move doc to Reviewing or Reject and move doc back to Authoring. How can I accomplish this or could this be added as an enhancement to the product?  Thanks for your ideas and help.

snave
Champ in-the-making
Champ in-the-making
I need to clarify that our users will be working from the My Tasks or My Alfresco tab in the MS Word Plugin, so I would like the solution to work from there.  Thanks!

mikeh
Star Contributor
Star Contributor
I think there are two parts to your question:

1 - Transitioning your custom workflow. If I understand your explanation correctly, the Reject and Approve buttons will perform the actions you need (do they not work as expected?).
These two (blue) buttons within the add-in are the same as the (grey) buttons in the very top-right of the Manage Task window that pops-up. The actions in the Actions column are independent of any workflow that document is part of. Incidentally, the Manage Task pop-up is using a part of the full Web Client, so will mirror what you see there.

2 - Out-of-the-box, the add-in only supports creating new tasks for the two default workflows, "Review and Approve" and "Adhoc Task". These are started using the "Create Workflow…" icon within the add-in. But presumably your workflow rule is created automatically on incoming document?


Thanks,
Mike

snave
Champ in-the-making
Champ in-the-making
I need the reject and approve buttons to move the document to the designated space defined in my simple workflow. For example on Reject, it should move the document to the Authoring space. It does not do this.

mikeh
Star Contributor
Star Contributor
The simple workflow that's part of the space rules isn't supported by the Office Add-in, because it's not a JBPM workflow; it's a custom internal action that happened before we implemented JBPM support.

Discussing the problem with another engineer, we've concluded that it's by no means a trivial piece of work to add support for this in the add-in. Part of the problem stems from these actions being available to anybody, rather than being associated with just one person - the "My Tasks" principles of the JBPM workflows. Therefore, we'd have to scan each document the user has access to in turn, in order to build up a task list for the My Alfresco and My Tasks tabs.

It might be possible to add the actions for the current open document only - we would have to add this to an improvement list in JIRA and consider it along with other priorities.

Your other option is to create a script which is run from the rule instead of the simple approve/reject, which assigns the JBPM "Approve and Reject" workflow to the incoming document - also assigning it to a specific user (hardcoded, or based on logic within the script). You should be able to base this off part of the code in the docActions.get.js, currently part of the Office Add-in web scripts, found in WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/office

Hope this helps - although probably not the answer you were hoping for.

Thanks,
Mike

bitmap62
Champ in-the-making
Champ in-the-making
Hi! First time I post something, although it's ten months I'm studying Alfresco. I have a related question: we've got two custom workflows; they are recognized (and were actually deployed as !!!) as JBPM and we see and use them quite ok in the main window of Alfresco Start Advanced Workflow Wizard: they work fine. You wrote
Out-of-the-box, the add-in only supports creating new tasks for the two default workflows, "Review and Approve" and "Adhoc Task". These are started using the "Create Workflow…" icon within the add-in
but you also wrote
isn't supported by the Office Add-in, because it's not a JBPM workflow
. Is there any way to show them in the Office 2003 plugin (I had a look at docActions.get.js, but I think I must dig deeper)? Thank you very much!

mikeh
Star Contributor
Star Contributor
Hi

In myTasks.get.html.ftl have a look for
            <div class="taskValue">
               <select id="wrkType" style="width: 178px;">
                  <option value="review" selected>Review &amp; Approve</option>
                  <option value="adhoc">Adhoc Task</option>
               </select>
            </div>

You should be able to add your custom workflow to the select list. Note that the "value" will be appended with "jbpm$wf:" in docActions.get.js.

Thanks,
Mike

bitmap62
Champ in-the-making
Champ in-the-making
Hi Mike, thank you very much! I modified the list box and all work fine. Now I would like to add the workflows whose prefix is not only "wf:" but all the listed ones which appear e.g. in the workflow console (after launching the "show definitions all" command). In other words I should modify the following row in the docActions.get.js:
var workflowType = "jbpm$wf:" + args.wt;
with something which is independent from the prefix, like
var workflowType = "jbpm$"+ PREFIX_VARIABLE+ args.wt;
If this is possible we could work with all JBPM workflows directly from the Office plugin.
Thanks again very much
bitmap62