Start Alfresco Workflow on outside Alfresco Content - workflow

I am newbie in Alfresco. I was just going through the Alfresco documents here. I have gone through it, but didn't get the answer of my question as described below.
Is it possible to start workflow(/task) on the content outside of the Alfresco Content (i.e. Our Local System File/Folder)? If yes, how can I achieve the same?

I agree with Younes that you can configure a rule to launch a workflow. In order to do that, you'll want to take a look at the JavaScript workflow API.
Using a rule on a folder will require something to trigger the rule, such as a document being added to the folder. But your question asks if a workflow can be triggered external to Alfresco. To do that, you might consider using a Web Script.
A Web Script is simply a way to extend Alfresco's RESTful API with your own logic. So you could create a web script called "startMyWorkflow" that includes a JavaScript controller leveraging the same API I referenced earlier to kick off the workflow. With that in place, you'd be able to launch the workflow externally using anything that can speak REST over HTTP.

You can setup a rule action to start a workflow if certain conditions are met (files added to some folder, file metadata changed, a new revision has been uploaded ...).
To learn how to create new rules in alfresco follow this tutorial
Update : I may have forgotten to mention that -as the op suggested- he could then setup a cifs/ftp/webdav folder locally to point to some location in the repo having that rule action I was talking about.... So for example adding files to that folder would automatically start a workflow....

Related

Creating a folder from a space template via REST API

Well, I formuled this cuestion before but seems like I didnt do correctly, so I will try again explaining myself better.
Im working on a event handler in openbravo that creates a structure of folders via rest api, I have been able to make a single folder so I could make the structure via java but i need to add alot of stuff to all the folders idividually so my work will be x100 harder, so Im searching on internet a way of creating from a space template but cant find nothing, would be nice if u could lend me a hand, its my first time using Rest apis too so Im not that good on this, thx for ur time.
Something cool about Alfresco is that if you look at the Alfresco public REST API and you don't see what you are looking for you can simply write your own RESTful end point.
To do that, you use the Web Script Framework (tutorial). With the web script framework you can implement controllers using either server-side JavaScript or Java.
That gives you access to the entire foundational API of Alfresco, which includes the ability to create folders from space templates.
For example, when using Java to create a folder from a space template, you can use the fileFolderService to copy the template folder to a parent folder, like this:
fileFolderService.copy(template, parentFolder, folderName).getNodeRef();
That template variable is a nodeRef. How you get that nodeRef is up to you. One way would be to do a search for it.
So, to re-cap, write a web script. The web script can use the foundational API to create a folder from a template. Your web script can accept arguments for things like where to put the new folder, what space template to use, etc. That's up to you.

Where to update new PAS token from MS DevOps in my Angular 2+ source code?

I have a Personal Access Token about to expire in DevOps/VSTS, but I can't see it in DevOps to do a ctrl-f and find it in my source code.
I have an Angular 2+ frontend with a .net core api backend.
Which file should I be looking at? Does it need to go in the backend? Or Frontend? Or both?
config.json? project.json? Which property is it (if it is a config file like that)?
Or is it somewhere else I need to update this? Not in source code, but something with the build agent? How would I update that?!
Which file should I be looking at? Does it need to go in the backend?
Since we could not clearly know how is your script look like, I assume you may not remember clearly about this because of huge script files. For this, Azure Devops has a feature Search can search what you want across all your code.
For any repos which with a api called, we suggest you search the code files first with Search feature. And also, you may pass the token value with task variable. So, you also need to check your pipeline variable.

Apply kaleo Workflow for document and library in liferay

I am use Liferay 6.2.
I would apply kaleo workflow for document portlet !
Can you help me?
thank you!
There is no difference in using kaleo workflow between Web Contents or Documents and Media. Just make sure you use context variables available for given type (this might be usefull for you https://www.liferay.com/web/igor.beslic/blog/-/blogs/workflow-in-action-kaleo-workflow-context-variables) The one thing which might be not so obvious, is the place where you configure Documents and Media workflow.
If you want to define workflow for Documents and Media:
Go to documents media section
Click edit on main folder (or different one which you want workflow to be applied)
Select workflow from select

EPiServer migrate content from home grown CMS

Hopefully someone can help me, I'm new to EPiServer and have been given a data migration task. We are using the latest version 8.5. I need to migrate content from a clients home grown CMS (that luckily is in a tree like structure) to EPiServer. There doesn't seem to be a whole lot of information about this on the web - perhaps I just don't know the right thing to search for.
It looks like using the EPiServer.ServiceApi might be the route to go but again locating useful documentation is proving difficult.
I was thinking of setting up the client CMS in SQL Server and writing a simple console application to call the EPiServer.ServiceApi inserting the content. If anyone has any information on this or better still and example i would be very grateful.
Thanks,
Dan
If you are just importing content from another CMS I would write a scheduled job in EPiServer:
http://world.episerver.com/code/dannymurphy/Stoppable-Scheduled-Job-with-feedback/
That job then uses the standard IContentRepository to create content:
http://world.episerver.com/documentation/Items/Developers-Guide/EPiServer-CMS/8/Content/Persisting-IContent-instances/
That way you can run it whenever you want and have access to EPiServers complete API. Also you can see progress of the import through the job status.
In the job you can read the content as a file in any format you like or directly from the source CMS database or some xml or RSS feed perhaps.
I have moved content from PHP, Java and .NET CMS this way. In .NET you could even access the source CMS via WCF or SOAP if available.
The ServiceApi is relatively new and more focused on Commerce products and media assets rather than CMS page and block content so I wouldn't use that.
There is complete documentation below for the ServiceApi by the way, did you not find it?
http://world.episerver.com/documentation/Items/EPiServer-Service-API/
Regarding language management you can read more in the below links:
http://cjsharp.com/blog/2013/04/11/working-with-localization-and-language-branches-in-episerver-7-mvc/
http://tedgustaf.com/blog/2010/5/create-a-new-page-language-branch-programmatically-in-episerver/
Basically you have two options for multiple languages. If the content is just straight translations you should create nine different language versions (branches) of the same page. You can also have multiple sites in an EPiServer installation but that requires 9 separate licenses (and the associated costs).
I've done a lot of EpiServer content migration projects. The easiest way if it's possible is to export your current sites tree in Json and then import that into EpiServer. I've had to do it on a recent project and mixed with Json.net it's pretty easy.
If you want to go that route you can find all the code to do it here: EpiServer Content Migration With Json.Net/

How to extend Alfresco Share existing activity list dashlet with my own activity type?

In Community 4.0.a, I'm posting my custom activities in the repo following this: http://wiki.alfresco.com/wiki/3.0_Activities_Developer_Guide
I have defined my own activity type, with custom bundles and pagelink to display custom needs in the activity dashlet.
But I face an issue, I need to specialize the output based on the activity-type in a similar way of what is done already in activity-list.get.js in the specialize() function.
I can't hack the js cause I'm packaging things in my own amp for Share.
What is the best way to do it? Is there some kind of extension point or do I need to override completely the dashlet?
The old way (3.x) to change the behaviour of a webscript controller is to copy the code and overwrite the Javascript by placing it under web-extension: alfresco/web-extension/site-webscripts/org/alfresco/components/dashlets/activity-list.get.js. There you can modify the specialize() function or whatever you need to do.
All files you place in the alfresco/web-extension/site-webscripts folder will replace original files in the share.war WEB-INF/classes/alfresco/site-webscripts classpath. Best practice is to place your customizations in the tomcat/shared/classes/alfresco/web-extension folder so you don't need to modify the WAR file.
Alfresco 4.0 provides a new way to change the javascript controllers of a webscript. You can add additional Javascript code that will run after the original code. This is preferable because you don't need to change original code and you can upgrade more easily later. To use it you need to get familiar with the new Share extension modules concept. See David Draper's Blog for more info on that.