cancel
Showing results for 
Search instead for 
Did you mean: 

Running rules in WCM

gidion
Champ in-the-making
Champ in-the-making
Hi,

How do i attach a rule to a space within the WCM?
The option does not appear.

Also i hear you can attach JS to spaces and/or content within the WCM and have them perform your rules. How would this be achieved? How are they called? How are they added to a space?

Thanks,
Luke
6 REPLIES 6

kvc
Champ in-the-making
Champ in-the-making
Luke:


Rules are not yet enabled for folders within a sandbox, or more generally for a sandbox itself.  This is something we are looking into. 

To execute custom actions on items within a sandbox, you can build this into your workflow definition and have those actions enforced at time of check-in into staging (and therefor prior to letting anyone else have access to the resource).  Most typically things that people like to enforce as custom actions are things like transformations, particularly when content is auto-ingested from an outside source (typically via XML) into the CMS.  This model works nicely in lieu of rules, as you can bulk import an large number of assets and then on a scheduled basis (using our built in Quark scheduler) have the items aggregated in a special "import" sandbox automatically kick-off an appropriate workflow to render the ingested assets into whatever other format or style you need.

Now, if you do need a specific rule to execute each and every time a single asset is added or updated, another option is to use a regular Alfresco space and add the rule there.  In this case, you'd need to have a second rule also execute, which would move the asset from that space into the appropriate folder in your web project (this is one of the default actions available to you when creating a new rule for a space). 

Let me know which of those two approaches could work for you.


Kevin

gidion
Champ in-the-making
Champ in-the-making
Hi Kevin,

I think a combination of these two methods could prove usefull.

The scripts attached to workflows may help me force uploaded xml files to be pushed through the xform when being edited (currently only content created manually via the form is also editable by the form).

I have recieved information about this in another post and some one was kind enough to provide a sample script that may achieve this feature.

In terms of loading content into the normal (non wcm) spaces and playing with it from there. This could prove usefull with regards to my bulk migrations. I intend to have incomming files create their specific folder structure before then copying this structure over to the WCM.

Hope my imagination is still staying within the realms of Alfresco. If so then many thanks for the feedback.

Cheers,
Luke

kvc
Champ in-the-making
Champ in-the-making
Luke:


Do note that with 2.1.0E, any XML file in your sandbox that is not associated with a web form will prompt for a web form association when you go to edit it.  That way, if you are importing valid XML, use can select which of the web forms associated with your web projects you wish to associated it with for purposes of editing.  We hope to make this intelligent, so that only that web form that is suitable for that XML content type will be presented to the user (and then, there only selection is really to use a web form for editing or not).

For bulk migrations, I would actually recommend using a special "load" sandbox instead.  The reason for this is that you can collect a number of changes and then bulk process using a scheduled action.  In a normal space, a rule will execute on each item.  If you are bulk loading a lot of data, it may very well be much more efficient to just process them in bulk.  Similarly, because you only have to configure that workflow once, regardless of what directories and subdirectories you may be creating to ingest the content, it will be simpler to import into a sandbox via CIFS than to use a normal space, which will require you to set a rule on each subspace you create for foldering.

Now, if you are going to be using spaces and promoting to a web project, and if for some reason you do not want to use our pre-built action for copying an item to a space, make sure you use the interstore copy service in our JavaScript API.  This is responsible for moving assets from a space to a sandbox.  It also handles auto-creation of directories to replicate whatever space structure you have, and also copies over all associated metadata as well.


Kevin

gidion
Champ in-the-making
Champ in-the-making
Hi Kevin,

I take it 2.1.0E means the enterprise version?
We are currently using the community edition but i have been pushing management to upgrade so that we can get dedicated support / additional features etc.

We are already far enough down the project timeline that there really isn't any going back on the decision to use Alfresco, so hopefully in the not too distant future we will have a fully functioning commercial site with which other community users can get ideas and implementations from.

Thanks,
Luke

ps. I take it adding the functionality (to 2.1.0C) you speak of existing within 2.1.0E is a pretty complex task involving the actual alfresco source and not something that we can implement in any reasonable timeframe.

vijay_alfresco
Champ in-the-making
Champ in-the-making
How can i move to a particular folder inside the web project.

The Move to Web project option lists only the web project and do not list
the folders inside the web project.

Please let me know how can I move the files from the normal space to
a folder inside the web project.

kevinr
Star Contributor
Star Contributor
You can use the Clipboard to copy/paste/move items to/from the Web Project. You can also write a JavaScript rule to do it.

Kevin