08-12-2007 05:19 AM
08-13-2007 02:42 PM
<action id="start_333_workflow">
<label-id>start_333_workflow</label-id>
<image>/images/icons/new_workflow.gif</image>
<evaluator>org.alfresco.web.action.evaluator.StartWorkflowEvaluator</evaluator>
<action>wizard:start333Workflow</action>
<action-listener>#{WizardManager.setupParameters}</action-listener>
<params>
<param name="item-to-workflow">#{actionContext.id}</param>
<param name="the-workflow-id">jbpm$33343</param>
</params>
</action>
Add this new action to the desired action-group
<wizard name="start333Workflow" managed-bean="Start333WorkflowWizard"
description-id="start_workflow_desc" icon="/images/icons/new_workflow_large.gif">
<step name="options" title-id="step_workflow_options"
description-id="start_workflow_options_desc">
<page path="/jsp/workflow/start-workflow-wizard/workflow-options.jsp"
title-id="start_workflow_options_title"
description-id="start_workflow_options_desc"
instruction-id="default_instruction" />
</step>
<step name="summary" title-id="summary" description-id="summary_step_description">
<page path="/jsp/wizard/summary.jsp"
title-id="summary"
description-id="summary_desc"
instruction-id="start_workflow_finish_instruction" />
</step>
</wizard>
Create a bean Start333WorkflowWizard extends original StartWorkflowWizard, add it to the managed beans with the Start333WorkflowWizard name, override init and next methods to do something like
public void init(Map<String, String> parameters)
{
super.init(parameters);
//take the-workflow-id parameter to start
this.selectedWorkflow = this.parameters.get("the-workflow-id");
//populate the workflows list in memory…
getHasStartableWorkflows();
//next code was taken from original next() method
WorkflowDefinition flowDef = this.workflows.get(this.selectedWorkflow);
if (logger.isDebugEnabled())
logger.debug("Selected workflow: "+ flowDef);
WorkflowTaskDefinition taskDef = flowDef.startTaskDefinition;
if (taskDef != null)
{
if (logger.isDebugEnabled())
logger.debug("Start task definition: " + taskDef);
// create an instance of a task from the data dictionary
this.startTaskNode = TransientNode.createNew(dictionaryService, taskDef.metadata,
"task_" + System.currentTimeMillis(), null);
}
// we also need to reset the resources list so that the actions get re-evaluated
resetRichList();
}
public String next()
{
return null;
}
08-14-2007 07:32 AM
10-22-2007 01:09 PM
public class PublishSpaceWizard extends StartWorkflowWizard {
@Override
public void init(Map<String, String> arg0) {
// TODO Auto-generated method stub
super.init(arg0);
getHasStartableWorkflows();
String workflow = this.parameters.get("workflow-name");
WorkflowDefinition flowDef = null;
Collection<WorkflowDefinition> flowDefs = this.workflows.values();
for (WorkflowDefinition current : flowDefs) {
if (current.name.equals(workflow)) {
flowDef = current;
this.selectedWorkflow = current.id;
break;
}
}
if (logger.isDebugEnabled())
logger.debug("Selected workflow: " + flowDef);
WorkflowTaskDefinition taskDef = flowDef.startTaskDefinition;
if (taskDef != null) {
if (logger.isDebugEnabled())
logger.debug("Start task definition: " + taskDef);
this.startTaskNode = TransientNode.createNew(dictionaryService,
taskDef.metadata, "task_" + System.currentTimeMillis(), null);
}
resetRichList();
}
…
}
<config>
<actions>
<action id="publish_space">
<permissions>
<permission allow="true">Write</permission>
</permissions>
<evaluator>com.integration.cms.extension.wizard.PublishSpaceEvaluator</evaluator>
<label-id>publish_space</label-id>
<image>/images/icons/PublishFile_Icon.gif</image>
<show-link>true</show-link>
<action>wizard:publishSpace</action>
<action-listener>#{WizardManager.setupParameters}</action-listener>
<params>
<param name="item-to-workflow">#{actionContext.id}</param>
<param name="workflow-name">jbpm$wfl:publish-space</param>
</params>
</action>
<action-group id="browse_actions_menu">
<action idref="publish_space" />
</action-group>
<action-group id="space_browse_menu">
<action idref="publish_space" />
</action-group>
</actions>
<wizards>
<wizard name="publishSpace"
managed-bean="PublishSpaceWizard" title-id="publish_space_title"
description-id="publish_space_desc"
icon="/images/icons/PublishFile_Icon.gif">
<step name="options" title-id="step_workflow_options"
description-id="start_workflow_options_desc">
<page path="/jsp/workflow/start-workflow-wizard/workflow-options.jsp"
title-id="start_workflow_options_title"
description-id="start_workflow_options_desc"
instruction-id="default_instruction" />
</step>
<step name="summary" title-id="summary" description-id="summary_step_description">
<page path="/jsp/wizard/summary.jsp"
title-id="summary"
description-id="summary_desc"
instruction-id="start_workflow_finish_instruction" />
</step>
</wizard>
</wizards>
</config>
16:39:04,062 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
net.sf.acegisecurity.BadCredentialsException: Bad credentials presented
at net.sf.acegisecurity.providers.dao.DaoAuthenticationProvider.authenticate(DaoAuthenticationProvider.java:290)
at net.sf.acegisecurity.providers.ProviderManager.doAuthentication(ProviderManager.java:159)
at net.sf.acegisecurity.AbstractAuthenticationManager.authenticate(AbstractAuthenticationManager.java:49)
at net.sf.acegisecurity.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:372)
at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:77)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
at org.alfresco.repo.audit.AuditComponentImpl.auditImpl(AuditComponentImpl.java:256)
at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:191)
at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
at $Proxy47.getType(Unknown Source)
at org.alfresco.web.bean.workflow.StartWorkflowWizard.init(StartWorkflowWizard.java:123)
at com.integration.cms.extension.wizard.PublishSpaceWizard.init(PublishSpaceWizard.java:22)
at org.alfresco.web.bean.wizard.WizardManager.setCurrentWizard(WizardManager.java:123)
at org.alfresco.web.app.AlfrescoNavigationHandler.handleWizardOpen(AlfrescoNavigationHandler.java:636)
at org.alfresco.web.app.AlfrescoNavigationHandler.handleNavigation(AlfrescoNavigationHandler.java:118)
at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:82)
at javax.faces.component.UICommand.broadcast(UICommand.java:109)
at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:171)
at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:81)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:619)
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.