Huge alfresco-share-config file size

cancel
Showing results for 
Search instead for 
Did you mean: 
upforsin
Senior Member

Huge alfresco-share-config file size

Jump to solution

Hello,

I've made a few workflows. Each one has on average 10 tasks, each one with ~10properties.

Based on my current knowledge, I can configure workflows with Share using only alfresco-share-config (sadly).

Aside from the fact that configuring and writing XML for every task is tremendous work, my current alfresco-share-config has almost 4 000 lines. I'm not an expert but files should not be that big.

Is there a way to divide this one huge file into much smaller ones?

I work on Alfresco Community Edition 6.1.2

howkymike
Alfresco Developer
1 Solution

Accepted Solutions
upforsin
Senior Member

Re: Huge alfresco-share-config file size

Jump to solution

Ok, I figured it out. It was a lot easier than I thought.

If you want to reduce your config file size, you should create a file in the src/main/resources/alfresco/web-extensions/sit-data/extensions and paste your config there.

<extension>
	<modules>
		<module>
			<id>config-custom-workflow1</id>
			<title>Share config for Workflow1</title>
			<version>1.0</version>
			<auto-deploy>true</auto-deploy>
                        <configurations>
           HERE PASTE YOUR WORKFLOW CONFIG
			</configurations>
		</module>
	</modules>
</extension>

 

Thank you @angelborroy for a hint.

howkymike
Alfresco Developer

View solution in original post

4 Replies
angelborroy
Alfresco Employee

Re: Huge alfresco-share-config file size

Jump to solution

You can create config XML files for every workflow, it's not required to add every definition to share-config-custom.xml file.

https://docs.alfresco.com/community/concepts/dev-extensions-share-surf-extension-modules.html

Hyland Developer Evangelist
upforsin
Senior Member

Re: Huge alfresco-share-config file size

Jump to solution

Thank you for the reply @angelborroy . I studied docs you sent, do you mind checking if I'm correct?

If I create a myTestFile.xml in the src/main/resources/alfresco/web-extension/site-data/extensions and fill it with:

<config evaluator="string-compare" condition="activiti$my_t0">
<forms>
<form>
<field-visibility>
<show id="packageItems" />
<show id="transitions" />
<show id="bpm:workflowDescription" /> ... </form> </forms> </config>

Would it work?

howkymike
Alfresco Developer
upforsin
Senior Member

Re: Huge alfresco-share-config file size

Jump to solution

Well.. it does not work.

I have a couple of other extensions, but every time I use Surf extensions I change files in the src/main/resources/alfresco/site-webscripts.

How can I add configuration to the share-config-custom which is in a completely different path? ( src/main/resources/META-INF)

 

 

Should I create a file like this:

<extension>
	<modules>
		<module>
			<id>config-custom-workflow1</id>
			<title>Share config for Workflow1</title>
			<version>1.0</version>
			<auto-deploy>true</auto-deploy>
			<customizations>
				<customization>
					<targetPackageRoot>what should be here?</targetPackageRoot>
					<sourcePackageRoot>what should be here?</sourcePackageRoot>
				</customization>
			</customizations>
		</module>
	</modules>
</extension>	

And then in the sourcePackageRoot put the file with configuration?

howkymike
Alfresco Developer
upforsin
Senior Member

Re: Huge alfresco-share-config file size

Jump to solution

Ok, I figured it out. It was a lot easier than I thought.

If you want to reduce your config file size, you should create a file in the src/main/resources/alfresco/web-extensions/sit-data/extensions and paste your config there.

<extension>
	<modules>
		<module>
			<id>config-custom-workflow1</id>
			<title>Share config for Workflow1</title>
			<version>1.0</version>
			<auto-deploy>true</auto-deploy>
                        <configurations>
           HERE PASTE YOUR WORKFLOW CONFIG
			</configurations>
		</module>
	</modules>
</extension>

 

Thank you @angelborroy for a hint.

howkymike
Alfresco Developer