I have a requirement, that whenever a content is created i should have a additional button like 'submit to worklfow'. When a user clicks on the button, the content should follow my workflow.
Help me how to implement this.
I intially had a 'execue script as a rule', this will send my doc to wf as soon as it is created in a space. But now i need to control it with a button in UI.
<!– Add action to more actions menu for each document–> <action-group id="document_browse"> <action idref="js_test" /> </action-group> </actions>
I dont know how to include this action in the jsp.I found on wiki the following and included it in container.jsp (as i want a button that will execute my script once a content is created)but it throws exception when i click on it in UI:
Am not sure what i shud give in the 'context' here. This gives a small icon in UI, but i want a button that will just execute my script, any way i can link my action-group to a button?
You should follow the path presented by Kevin. Context is NodeRef of your document on which you start the workflow. Try to read this document more carefully
I think that if you insist on using h:commandbutton and not r:actions that you have to use ActionService to execute the configured action inside the ActionListener method of you managed bean. Again, ActionService could be injected into the Managed Bean just as you did with ScriptService.
Example of usage is org.alfresco.web.bean.actions.RunActionWizard.java look at finishImpl method
Hi i tried including the action group in container.jsp. I get a icon but when i click on it i get the following error:
javax.faces.FacesException: Cannot get value for expression '#{DocumentDetailsBean.name}' caused by: org.apache.jasper.JasperException: Cannot get value for expression '#{DocumentDetailsBean.name}' caused by: javax.faces.el.EvaluationException: Cannot get value for expression '#{DocumentDetailsBean.name}' caused by: javax.faces.el.EvaluationException: org.alfresco.web.bean.DocumentDetailsBean caused by: javax.faces.el.EvaluationException: Bean: org.alfresco.web.bean.DocumentDetailsBean, property: name caused by: java.lang.reflect.InvocationTargetException caused by: java.lang.NullPointerException