Workflow initiation by admin

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2008 07:01 AM
I wish only admin should be able to initiate a workflow.
Kindly tell me how to achieve that ?
I tried following way in which after initiation during the first transition the intiator is checked if its a 'admin'.. which didnt worked for me

Is this the right approach to restrict the users to initiate a workflow??
All the above conditions shows a error: Caused by: org.jbpm.jpdl.JpdlException: [[ERROR] line 61: cvc-complex-type.2.4.a: Invalid content was found starting with element 'condition'. One of '{"urn:jbpm.org:jpdl-3.1":action, "urn:jbpm.org:jpdl-3.1":script, "urn:jbpm.org:jpdl-3.1":create-timer, "urn:jbpm.org:jpdl-3.1":cancel-timer, "urn:jbpm.org:jpdl-3.1":exception-handler}' is expected.,
</start-state>
Kindly tell me how to achieve that ?
I tried following way in which after initiation during the first transition the intiator is checked if its a 'admin'.. which didnt worked for me


<swimlane name="initiator"/> <start-state name="start"> <task name="mywf:submitReviewTask" swimlane="initiator" > <event type="node-leave"> <script> <variable name="mywf_StarterName" access="write"/> <expression> mywf_StarterName = Authentication.getAuthenticatedActorId(); </expression> </script> </event> </task> <transition name="" to="authorverification"> <condition>#{mywf_StarterName == "admin"}</condition><!– <condition>#{people.getPerson(initiator).properties["cm:userName"] == "admin"}</condition> –><!– <condition>#{person.properties.userName == "admin"}</condition> –><!– <condition>#{Authentication.getAuthenticatedActorId() == "admin"}</condition> –> </transition>
Is this the right approach to restrict the users to initiate a workflow??
All the above conditions shows a error: Caused by: org.jbpm.jpdl.JpdlException: [[ERROR] line 61: cvc-complex-type.2.4.a: Invalid content was found starting with element 'condition'. One of '{"urn:jbpm.org:jpdl-3.1":action, "urn:jbpm.org:jpdl-3.1":script, "urn:jbpm.org:jpdl-3.1":create-timer, "urn:jbpm.org:jpdl-3.1":cancel-timer, "urn:jbpm.org:jpdl-3.1":exception-handler}' is expected.,
</start-state>
Labels:
- Labels:
-
Archive
4 REPLIES 4

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2008 09:54 PM
I think! Permision is not catch in definition process. You cant catch this with case 'user admin cant see list workflow and other user is not'. That is my idea! :roll:

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2008 02:04 AM
Is there any way in which only admin be able to view admin workflows.? no other user can see that workflow?
In the above case all can view the workflow but only admin can initiate. This is not what we actually require.
In the above case all can view the workflow but only admin can initiate. This is not what we actually require.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2008 03:22 PM
We're trying to do that too.
I have added the following to my web-client-config-wcm.xml:
Unfortunately for me, it only shows up if i put it in the workflows sections, not in the admin-workflows secton. Anyone else see this?
FYI, i am on alfresco 2.1.1
- hitesh
I have added the following to my web-client-config-wcm.xml:
<workflows> spwf:standardreview, spwf:expeditedpublish</workflows><admin-workflows> wcmwf:changerequest, spwf:nopublish</admin-workflows>
Unfortunately for me, it only shows up if i put it in the workflows sections, not in the admin-workflows secton. Anyone else see this?
FYI, i am on alfresco 2.1.1
- hitesh

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2008 10:04 PM
This is problem can see in file StartWorkflowWizard:
with method:
below is param code for check User logining:
and this is solution:
method getStartableWorkflows() will return list workflows. Therefore, You can do work in this method.
Thanks and Regards.
package org.alfresco.web.bean.workflow;
with method:
getStartableWorkflows()
below is param code for check User logining:
// vinaxwater get user loging FacesContext context = FacesContext.getCurrentInstance(); User user = Application.getCurrentUser(context); String userName = user.getUserName();
and this is solution:
user.isAdmin() >>> result return true if user logining is admin
method getStartableWorkflows() will return list workflows. Therefore, You can do work in this method.
Thanks and Regards.
