AnsweredAssumed Answered

Permission to run a background async action

Question asked by rockycres on Sep 4, 2009
Hi all,

In the following process definition xml,when the user submit the content I am passing the control to the asyn action on the node.SInce the process in running in the background , it is showing the following error due to some permission privileges.

<process-definition xmlns="urn:jbpm.org:jpdl-3.2" name="wcmwf:new_test">
    <swimlane name="initiator"/>
    <start-state name="start">
        <task name="wcmwf:submitReviewTask" swimlane="initiator"/>
        <transition name="to_action1" to="action_"/>
    </start-state>   
    <node name="action_" async="true">
         <action name="action_t" class="com.ValidateActionHandler13" />
         <transition name="proceed" to="initialise"/>
                  <transition name="reject" to="rejected"/>           
    </node>
…..
…….


19:05:24,250  ERROR [graph.def.GraphElement] action threw exception: A valid SecureContext was not provided in the RequestContext
net.sf.acegisecurity.AuthenticationCredentialsNotFoundException: A valid SecureContext was not provided in the RequestContext
        at net.sf.acegisecurity.intercept.AbstractSecurityInterceptor.credentialsNotFound(AbstractSecurityInterceptor.java:477)
        at net.sf.acegisecurity.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:355)
        at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:77)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:275)
        at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
        at com.alidateActionHandler.execute(ValidateActionHandler.java:61)

          How to provide the AuthenticationCredentials for the background async action .?
fyi ( I am accessing the WF store in the background async action )

Thanks.

Outcomes