Huge alfresco-share-config file size

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

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

1 Solution

Accepted Solutions
Established Member II

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.

View solution in original post

4 Replies
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

Software Engineer in Alfresco Search Team.
Established Member II

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?

Established Member II

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?

Established Member II

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.

View solution in original post