Service-context.xml file causing login issue

cancel
Showing results for 
Search instead for 
Did you mean: 
erichkey
Active Member II

Service-context.xml file causing login issue

Jump to solution

I'm able to deploy a new custom workflow but upon testing a receive an error regarding the destination folder for the document in the workflow, the service-context.xml is not added into alfresco yet.

When Adding the file to {PATH}/alfresco/extension (this is were I copied the workflow bpmn file) and restart alfresco and go to the login page to test again, I'm unable to use admin login details. Once I remove the service-context.xml file, I can login again but the same error occurs on the workflow.

The following is the entire service-context.xml file:

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<!--
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
    this work for additional information regarding copyright ownership.
    The ASF licenses this file to You under the Apache License, Version 2.0
    (the "License"); you may not use this file except in compliance with
    the License.  You may obtain a copy of the License at
        
    http://www.apache.org/licenses/LICENSE-2.0
        
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->
<beans>   

    <!-- A simple module component that will be executed once.
        Note. this module component will only be executed once, and then there will be an entry for it in the Repo.
        So doing for example $ mvn clean install -Pamp-to-war twice will only execute this component the first time.
        You need to remove /alf_data_dev for it to be executed again. -->
    <bean id="extension.workflowBootstrap" parent="workflowDeployer">
        <property name="workflowDefinitions">         
     <list>                
                <props>
                    <prop key="engineId">activiti</prop>
                    <prop key="location">alfresco/extension/MyProcess2.bpmn</prop>
                    <prop key="mimetype">text/xml</prop>
                    <prop key="redeploy">true</prop>
                </props>
                
                <props>
                    <prop key="engineId">activiti</prop>
                    <prop key="location">alfresco/extension/workflows/KeystoneDocumentReview.bpmn</prop>
                    <prop key="mimetype">text/xml</prop>
                    <prop key="redeploy">true</prop>
                </props>
     </list>
         </property>
    </bean>

</beans>

1 Solution

Accepted Solutions
erichkey
Active Member II

Re: Service-context.xml file causing login issue

Jump to solution

Email notification resolved !

The problem was on the smtp server not allowing mail to be relayed due to an unauthorized host. Referred to: Fix SMTP AUTH required for message submission on port 587

View solution in original post

41 Replies
roberto_gamiz
Established Member II

Re: Service-context.xml file causing login issue

Jump to solution

Hello Erich,

Can you see any error mesagge in alfresco.log file during the startup after placing service-context.xml file in {PATH}/alfresco/extension?

If this is happening even if you can see the login screen of the application, you will not be able to log in because the repository is not working.

Regards

erichkey
Active Member II

Re: Service-context.xml file causing login issue

Jump to solution

Hi Roberto,

I found an error in the log file indicating to a directory path that was incorrect which after I could login again.

So when testing the new created workflow, I get am prompt with:

"org.activiti.engine.ActivitiException: Exception while invoking TaskListener: Exception while invoking TaskListener: 01041176 Failed to execute supplied script: 01041175 A value for the mandatory parameter destination-folder has not been set on the rule item transform" which directs me to the following lines in the bpmn file:

/* transform to pdf */
                     var drafts = bpm_package.children[0].parent;
                     var docroot = drafts.parent;
                     var dest = docroot.childByNamePath("Released");
                     var trans = actions.create("transform");
                     trans.parameters["destination-folder"] = dest;
                     trans.parameters["assoc-type"] = "{http://www.alfresco.org/model/content/1.0}contains";
                     trans.parameters["assoc-name"] = String("{http://www.alfresco.org/model/content/1.0}" + bpm_package.children[0].properties["cm:name"]);
                     trans.parameters["mime-type"] = "application/pdf";
                     trans.execute(bpm_package.children[0]);]]>

I'm not quite sure what the problem is or how to correct it, I'm still considered a newbie when it comes to alfresco but thanks for the assistance so far.

roberto_gamiz
Established Member II

Re: Service-context.xml file causing login issue

Jump to solution

Hi Erich,

You can start for confirm that space "Released" exists in the same space that the content in bpm_package.children[0] and that the user that execute this task has access to it.

Regards.

erichkey
Active Member II

Re: Service-context.xml file causing login issue

Jump to solution

Hi Roberto,

Where would I have to look to see if "Release" is in fact in the same space as the content of bpm_package.children[0]?

For the execute rights, do I just use chmod?

roberto_gamiz
Established Member II

Re: Service-context.xml file causing login issue

Jump to solution

Hi Erich,

We are always talking about Alfresco Repository.

According to your code "Released" must be an Alfresco Space located in the same space that the document that started the workflow (bpm_package.children[0]).

On the other hand we are not taking about execution rights but about permissions in Alfresco. Its posible that you don't obtain any result in:

docroot.childByNamePath("Released") 

because the user haven't enought privileges in the parent space.

Regards

erichkey
Active Member II

Re: Service-context.xml file causing login issue

Jump to solution

On the back end I'm unable to find anything related to the mentioned spaces. Is there a specific way of finding "Released" and the bpm_package.children[0]?

roberto_gamiz
Established Member II

Re: Service-context.xml file causing login issue

Jump to solution

Hello Erich,

What steps are you taking to start the workflow instance?.

bpm_package.children[0] is the node that you are triyng to transform so you have had to selected it in some point before
starting the workflow.

"Released" simply must be located in the same Alfresco Space than the other.

To reach then you can browse the repository or use the search forms.

Regards

erichkey
Active Member II

Re: Service-context.xml file causing login issue

Jump to solution

Hi Roberto,

The workflow is started on the UI under Task > My Tasks > Workflow > Custom Workflow.

By the other do refer to the default workflows that are included?

roberto_gamiz
Established Member II

Re: Service-context.xml file causing login issue

Jump to solution

With the other I mean the document in bpm_package.children [0] that you should have selected in the workflow start form.