cancel
Showing results for 
Search instead for 
Did you mean: 

Integrating WCM, Webapp with a workflow

infinity2heaven
Champ in-the-making
Champ in-the-making
We're planning to test a demo website with the following functionality and I'd appreciate if anyone can give me pointers for a head start

(Alfresco WCM 2.0.1)

1) The sample website is a basic crud based site, say with 4 pages of tabbed data containing fields in each tab. For simplicity lets call it a bookstore website.
2) There is no database for the webapp
3) We plan to model the data completely in Alfresco webforms (xsds) and let the webapp load the xmls via a service call. (simple xpath parsing).

Implementing the above is fine, however here is the problem once we need to edit on the webapp front

We want to send content posted from a form within our public facing web application into the Alfresco WCM repository AND trigger a workflow that would require an Alfresco user to review that content before it is published.

We have been advised that functionality to support the notion of a “drop box”, exposed via CIFS, is not support in the WCM product. We are running 2.0.1E. Is there an alternative method to accomplish this?  Also, I've heard the Monitoring API and workflow is present in document manager but not yet in WCM. Is that true? If not, how do I achieve the above functionality? Is there an API, Documentation available?

Thanks!

PM
3 REPLIES 3

kvc
Champ in-the-making
Champ in-the-making
CIFS is supported in WCM.  The CIFS implementation in WCM does not support automatic triggering of rules in 2.0.1E (it will be an option in the upcoming 2.1.0 release) specifically because WCM is multi-asset aware, and rules triggering actions on single file events often do not have the intended outcome.

An example of this would be a form for collecting content from an end-user in a front-end web app.  If a user is posting say a profile, that profile consists of come personal information collected via the form along with some optional material (say, photos) they may choose to upload.

Now, the proper way to handle this transaction is to have the XML generated via the form along with any and all uploaded and associated material treated as a collection of items that together need to be routed for review and publishing.  The notion of a drop-box is centered around the drag-and-drop of a single document (like a Word document) and automating processing of that single file (transform to PDF, content review).  In the WCM case, you actually have more than one create event, and because of the stateless nature of a web client, you don't necessarily know in advance how many create events you will have before knowing when to trigger an appropriate rule.  Did the user upload any photo, and, if so, one, two, or three?  It's indeterminate.

To handle this, your web app should simply write back any and all content into a particular sandbox, and, once done with writing out all its data, execute a submit, which in turn will execute workflow.

This issue has also been raised via our internal support channel, and a more exhaustive explanation of various things related to this implementation (use of output path patterns, ways to specify to whom things were routed) was provided in that forum.

Kevin

infinity2heaven
Champ in-the-making
Champ in-the-making
Thanks for the reply! So, would you recommend to wait until 2.1 release or is there is a reasonable workaround for this in the interim?

kvc
Champ in-the-making
Champ in-the-making
I think the best solution is to trigger workflow when you are done writing out all the assets you need into a run-time sandbox.  When you call workflow, you should execute the WCM workflow, which will take care of things like review sandbox creation (which will allow you in the future to enable editorial review if desired), submission, and snapshoting.  You can find docs on workflow on our wiki:

http://wiki.alfresco.com/wiki/Workflow_Reqs_and_Design#Workflow_APIs

Aside from the fact that 2.1.0 is not out, I don't think file-based triggers ultimately are the right solution here.  Triggers via CIFS are primarily useful for what they were intended for:  drag-and-drop of a doc onto a shared drive, with some automated processing thereafter.  Web stuff by it's nature tends to involve more than one asset - and like I noted before, the appropriate time to trigger some automated action is often indeterminant.

Kevin