Custom Workflow _ Alfresco Community - alfresco

I need to create a new Custom Workflow in Alfresco.
I followed this tutorial : Creating Custom Workflow in Alfresco
But I couldn't find the two files in my Alfresco:
share-workflow-form-config.xml that must be in
Alfresco\tomcat\webapps\share\WEB-INF\classes\alfresco
bootstrap-context.xml that must be in
Alfresco\tomcat\webapps\alfresco\WEB-INF\classes\alfresco
I'm using Alfresco Community Edition 5.1 under Windows 8
Can I add those two files to My Alfresco ? If so, where can I find them ?

You should not be modifying the two files that you have listed. It goes against best practices and they are no longer exposed in exploded webapps (you can find them inside of their respective jars).
For tutorial purposes you should use the shared classpath folder. If you're using the all-in-one installer, then that location is: $CATALINA_HOME/shared/classes/alfresco/
As an example: C:/alfresco-one/tomcat/shared/classes/alfresco
In a simplistic approach, you should add your Share form config for workflows to the share-config-custom.xml file located in the shared web-extension location ($CATALINA_HOME/shared/classes/alfresco/web-extension/share-config-custom.xml)
Add your bootstrap config to a custom context file in the shared extension location:
($CATALINA_HOME/shared/classes/alfresco/extension/foobar-bootstrap-context.xml)

Related

System Templates version 1.31.0 and higher implementation

I have upgraded my cloud Artifactory to "7.52.0".
Prior to the upgrade I was using System Templates to deploy my pipelines.
Although after the upgrade there is still backward compatibility, The new way to deploy and use System Templates for creating new pipelines is not working for me.
From the release notes I got to this link to configure System Templates in the new way.
https://www.jfrog.com/confluence/display/JFROG/System+Templates
So in my repository A I have 2 files 'pipelines.yml' and 'values.yml'
pipelines.yml is configured as follows:
valuesFilePath: ./values.yml
Include:
template: myTemplates/TestTemplate/1.0.0
My values file contains values for the TestTemplate.
Then I go to https://example.jfrog.io/ui/admin/pipelines/pipelineSources and I try to create a new pipeline from repository A.
Looking at https://example.jfrog.io/ui/pipelines/myPipelines/myPipelines I don't see any pipeline created from the template.
Is that the right way to implement the new System Template?
I have also made sure that the templates are in the Artifactory by checking:
https://example.jfrog.io/ui/pipelines/templates
and also in the Artifactory directory tree.
Currently I am using the REST API in order to CRUD my Template Sources(https://example.jfrog.io/ui/pipelines/sources) and also use the REST API to create a new pipelines sources from a system template (apparently this is the old way).
As after the upgrade creating a source pipeline doesn't sync the old/new templates nor does it create a new pipeline from a system template that is located in the Artifactory.
You need to use the syntax documented in the Global template link.
Using the "jfrog/PublishTemplate" global template documentation
https://www.jfrog.com/confluence/display/JFROG/Global+Templates . I have noticed that in order to create and upload a system template you need to use the following syntax:
valuesFilePath: ./values.yml
include:
template: jfrog/<global_template_name>/<template_version>
According to the system template documentation this is the syntax that got me confused:
valuesFilePath: ./values.yml
Include:
template: jfrog/PublishTemplate/1.0.0
So I have used capital "I" instead of small "i" and bad indentation in order to create a new pipeline from my system template, which failed.
You use the Global template "PublishTemplate" for uploading your system template into your artifactory.
And then use the uploaded templates in order to create your new pipelines.

how to create a new folder using alfresco api

I have uploaded sample.zip file in this directory CompanyHome/site/testsite/documentlibrary/test.
Now I want to create new folder called childfolder under above directory [CompanyHome/site/testsite/documentlibrary/test/childfolder] and move the sample.zip under it.using Alfresco API how do i create child folder and move the file under newly created childfolder?
This really depends upon what version of Alfresco you're using and what API you want to use to do it. For example, assuming that you want to do this via a REST API then you have the option of CMIS, the recent "Public API" or the internal WebScript based API.
Alternatively, you might want to do this by using the JavaScript API and WebScript develop your own WebScripts.
There are lots of ways to achieve this - perhaps you can provide some more information on the overall picture of what you're trying to do and where you're trying to do this (e.g. as an extension of Share maybe?).
It's possible to create a folder within Share and if you do so whilst you have browser developer tools open you'll be able to see the exact REST API calls that are used.

Is it possible to have both Magnolia Public and Author under 1 instance? If so, how?

Is it possible to have both Magnolia Public and Author under 1 instance in Jelastic? If so, how?
According to your request, I'm glad to inform you that you can easily deploy Magnolia Public and Magnolia Author under 1 instance.
As a first step, you should deploy the primary Magnolia application, you can find out that it's can be done in-one-click with help of the appropriate Magnolia CMS widget at our Marketplace
in the Portal/CMS section.
You can manage your applications and files there using Jelastic dashboard, FTP, WebDav or SSH access. In your case there is necessary to establish the SSH Access to the Tomcat instance
and perform the following:
cd /opt/tomcat/webapps/ && cp ROOT.war ROOT2.war
After the copying was finished restart the Tomcat instance.
Having reached this goal, you will obtain two separate Magnolia CMS applications.
Installed files are located at webapps directory which after the mentioned above actions will have two contexts
According to the official Magnolia documentation, it will be necessary to provide the changes in corresponding configuration files
also, it should be mentioned that the copied Magnolia application will have the same settings as an original context ROOT
so before the performing the required changes you should create another DB at your MySQL instance and then specify it for using of the second/copied application.
As a result, you will have two independent Magnolia application one of which could be set Public mode and another one to Author.

vaadin external javascript file location

I've got several javascript files.
I want to import it on my page, created using vaadin.
I added annotation #JavaScript to my UI.
#JavaScript({ "prettify.js", "vkbeautify.js", "additional.js" })
I put it into VAADIN\themes\theme-name.
However when I try to run it
WARNING: prettify.js published by com.folder.ui.AdminUi not found. Verify that the file com/folder/ui/prettify.js is available on the classpath.
Where I should put it?
It depends.
For maven based projects, the script files belong under the resource folder.
Example: src/main/resources/com/folder/ui
For Ivy/Eclipse based projects, the scripts go in the same path as your class src/main/java/com/folder/ui
The maven based projects generally mess people up because all Vaadin docs are written for Ivy.
Hope this helps,
Malcolm

"Models" folder missing in C#.net Web App project

I am trying to create my first Web project and following the demo on the Microsoft Website they show that when a default web form is selected it adds bunch of default folders and files to the project .
I followed it from the start , but "Models" folder is missing in my project solution .
My question is that does "Models" folder contain some classes and files before or if it is missing i can simply create one manually by following the "Add folder" option . Or am i missing a NuGet package ?
Finally, I figured out that if you don't choose the option for signing in to your freshly created web app through individual accounts, that is if you leave it blank , you won't have Models folder in your project, the reason is that when you check the mentioned option, VS will create a class for you called IdentityModels.cs. So, if you want to have folder Models, in the section Change authentification, choose individual accounts.
If you're not using MVC, you may not see the "Models" folder by default in newer VS versions. You should be ok ignoring the models folder and creating classes in root as long as the relevant references are added in your project, for example based on your tutorial, you maybe missing the data entity, data entity design, data entity linq. So for steps you can try creating these classes in root and if the doesn't succeed, try adding these com references. Go to references, Assemblies, Framework, System.Data.Entity, System.Data.Entity.Design and System.Data..LINQ.

Resources