cancel
Showing results for 
Search instead for 
Did you mean: 

Simple workflow rules

soeursourire
Champ in-the-making
Champ in-the-making
Hello,

I do not exactly understand how these simple workflow are working. Here is what I am testing:

- I create a space "Users"
- on this space I choose "Manage Content Rules"
- I create a rule Inbound "User Creation Approvement" with "Apply rule to sub spaces" checked (what is Run rule in Background exactly?)
- I select the conditions "All Items"
- I select the action "add simple workflow to item"
- in "approve flow" I decide to copy it in the space "final Users" with name of the approve step "Approve User"

But then if I go in the space "Users" I have Rules and my rule inside but I do not have workflow. And if I go on the user Space that I created before in Users I do not have the action "Approve User" on it. Is it normal?

I would like to see how these rules are treated. Are they stored in the database MySQL? How may I checked what we have in this database?

Thanks in advance for your help
10 REPLIES 10

rwetherall
Confirmed Champ
Confirmed Champ
Hi,

Firstly if you select a rule to run the background it means it is executed asynchronously rather than in the same thread as the action that has triggered the rule. 

This is handy when you are creating a rule that takes a long time (for example perhaps a transformation) as it prevents the triggering action from being slowed down.  An asynchronously executed rule is guaranteed to be done, but when will depend on how busy the repo is with other asynchronous actions as to when it will complete.

Rules are stored as nodes of type 'Rule' in a system folder below the related node (in this case the node that represents the Space).  If you want to 'see' the rule nodes then use the NodeInspector UI (the standard UI will filter out system folders.  They are visible in the database, but only in so much as all nodes are.  There is no special schema for Rules.

Once an incoming rule has been added to a Space any nodes created or moved into that Space will have the rule triggered against it.  In your example if you want to see the rule work then create some new content (after you have defined the rule) and then have a look at its properties.  You should see that is has the specified workflow applied to it.

By default rules will only be applied to nodes within the Space at its top level, but since you have selected to apply rule to sub spaces, any nodes added to sub-Spaces of the top Space will also trigger the rule and therefore have the specified workflow applied.

Hope this helps,
Roy

soeursourire
Champ in-the-making
Champ in-the-making
Many thanks for your answer.
That helps but I have still some troubles:
- First I have a space with a rule already defined with title "Doc approve" and as you told me after the rule has been created for my space "MySpace" I went inside this space and created a new content (I added a document) but then I do not have the rule "Doc approve" against it (only Update, Preview in Template, Copy, Cut)… I really do not understand why…
- Secondly please would you mind telling me what is this NodeInspector UI, where I can find it? Directly in the portal user interface of Alfresco?
- Finally I browsed the database with sql queries and found some tables: child_assoc, externalkeys, node, node_aspects, node_assoc etc… so if I want to find my rule "Doc approve" applied to a space where is it stored in this database, in which node? How can I find it? I cannot do a query that looks for any fields of a table where a field has for value "Doc approve" without knowing the name of the field right?

Thanks again..

davidc
Star Contributor
Star Contributor
- There should be one or two new menu items on the newly created content.  The labels of these items correspond to the approve/reject steps defined in the workflow. 

Can you try this? Create a new space - create a rule in the space - ensure "apply rule to sub-spaces" is off and "run rule in background" is off - select "All Items" condition - select "Add Aspect" action - select "Dublin Core".  Finish.  Now select "create content" - enter text - select next - select finish.  Now view details of newly created content - you should see properties called identifier, source, coverage etc.  That means the rule has been applied.  Now create a new rule in the space for the workflow.  Then create new content in the same space.  New menu items on the newly created content should now appear.  Has that worked?

- The NodeInspector is found in the Administration Console (you have to be logged in as an administrator - found in More… menu of a Space) - the Node Browser link.

soeursourire
Champ in-the-making
Champ in-the-making
Thanks for the answer…
I tried what you said and for the first rule that does not work for me… the properties identifier, source, coverage  do not appear in my newfile.txt properties. However for the second that is working. So I don't know what I am doing wrong with Dublin Core.
And is it possible to add a rule to complete Space? I means you can see your rules in Space properties and move a full space to another space?

And I went in my node browser and have only these Stores:
-system://system
user://alfrescoUserStore
workspace://lightWeightVersionStore
workspace://SpacesStore
So I cannot see my rules here?

davidc
Star Contributor
Star Contributor
- I take it the workflow rule worked.  I'm not sure why the Dublin Core rule failed - did you create the rule before creating the content?

- Rules for a Space are not yet supported - the current plan is to add those in v1.3.

- Rules will be held in workspace://SpacesStore - browse to your space and you'll see rule nodes within it.

soeursourire
Champ in-the-making
Champ in-the-making
-Yes I created the rule before the content… it's strange.
-I did not find yet my rule "Doc approve" in workspace://SpacesStore/ but well.. I will continue to study that.

Thanks a lot for your help

soeursourire
Champ in-the-making
Champ in-the-making
Hello!

I have again some questionsSmiley Happy

1. What are the following aspects and where and when do they appear with the document:
    - Complianceable
    - Classifiable
    - Dublin Core
    - Effectivity
    - Localizable
    - Summarizable
    - Templatable
    - Translatable
?

2. If I am using a rule "if approve move to folder X" is it possible to have a versionable aspect that increases the version while moving (without modifying the document)?

3. If I create a rule "if approve move to folder X" to the space Y from the admin window, and I invite personZ to space Y, when personZ will log on he will see the rule in the properties on the document but will not have access to execute them (access denied)? Is it possible to let him executing the rule (I tried to give him contributor, coordinator…roles but it does no seem to work).

4. Is there a specific standard technique used for the development of Alfresco? Would like to understand the structure, architecture of the code, where can I find help?

Thanks in advance for your help!

soeursourire
Champ in-the-making
Champ in-the-making
Horrible! I created a rule with Add Simple Workflow action but then I have the rule in my Space but the Workflow does not appear in the document I created after the rule. I do not have the actions in the properties of my document….. really do not understand why??

steve
Champ in-the-making
Champ in-the-making
Hello,

I have just tried creating a simple workflow rule on a space, and documents added to that space are all picking up the workflow.

Can you describe what steps you are doing to set up your workflow and view the workflow actions on content please?

Thanks,

Steve