03-09-2020 09:21 AM
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
03-20-2020 07:33 AM
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.
03-09-2020 09:37 AM
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
03-09-2020 12:19 PM
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?
03-10-2020 02:10 PM
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?
03-20-2020 07:33 AM
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.
Explore our Alfresco products with the links below. Use labels to filter content by product module.