cancel
Showing results for 
Search instead for 
Did you mean: 

Folder/Space as Workflow Package

hyperation
Champ on-the-rise
Champ on-the-rise
Hi Everyone,

I am wondering if there is a way to attach folder/space (along with the contents within) into a workflow package.

I know that to attach a node to the package we do something like:


var workflowPackage = workflow.createPackage();
workflowPackage.addNode(node);  // 'node' is the ScriptNode of the object (a document in this case).

But, that doesn't seem to work for folders? or does it??

Thanks
Smiley Happy
19 REPLIES 19

padmalaya
Champ in-the-making
Champ in-the-making
Hi,

I am using Alfresco 3.3g sdk, however the Build fails everytime I run the ant build.
The error is as follows:


BUILD FAILED
C:\Desktop\Alfresco-3.3g\root\projects.xml:566: The following error occurred while executing this line:
C:\Desktop\Alfresco-3.3g\root\macros.xml:59: Compile failed; see the compiler error output for details.


Can you suggest what is going wrong(if in case i missed anything)??
I have followed Alfresco Wiki as well one of the posts in the forum for integrating alfresco code in eclipse, but hard luck following both Smiley Sad
As a result I was trying to find if there is any other way out to implement the same!

Thanks in advance,

Padmalaya

sebp
Champ in-the-making
Champ in-the-making
If you only want to change some of the Alfresco classes you don't have to build the whole application. If you use the alfresco sdk within eclipse then you just add all the sdk's libraries to the classpath, unpack all the files in the sdk source directory and add all the sources to your project. Make your changes and eclipse will compile the changed classes. Then you can take the compiled classes and put them into the right .jar file within the alfresco.war.
This is a little bit messy but you don't have to build everything.

padmalaya
Champ in-the-making
Champ in-the-making
Hi sebp,

I am getting the following error after adding the code in StartWorkFlowWizard:

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
        at java.util.ArrayList.RangeCheck(ArrayList.java:547)
        at java.util.ArrayList.get(ArrayList.java:322)
        at org.alfresco.web.bean.workflow.StartWorkflowWizard.finishImpl(StartWorkflowWizard.java:198)
        at org.alfresco.web.bean.dialog.BaseDialogBean$1.execute(BaseDialogBean.java:118)
        at org.alfresco.web.bean.dialog.BaseDialogBean$1.execute(BaseDialogBean.java:114)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:325)
        at org.alfresco.web.bean.dialog.BaseDialogBean.finish(BaseDialogBean.java:124)
        at org.alfresco.web.bean.wizard.WizardManager.finish(WizardManager.java:593)

I have another concern, will the same once implemented show up contents in UI…as in no changes required in web-client-config??

padmalaya
Champ in-the-making
Champ in-the-making
Thanks Sebp..it worked…
It was basically cos of different version of alfresco that gt us stuck!!

sebp
Champ in-the-making
Champ in-the-making
Nice to hear. I was a little bit busy during the last days. I'm thinking about putting all the files needed for workflows on folders into a module and upload that module and the sources in Alfresco Forge.

padmalaya
Champ in-the-making
Champ in-the-making
Yeah..Nice Idea..that would help lots  Smiley Happy !!

sebp
Champ in-the-making
Champ in-the-making
I have created a forge project that contains all the necessary changes for running workflows on folders in an amp:
http://forge.alfresco.com/projects/wffolders/

chicco0386
Champ on-the-rise
Champ on-the-rise
Hi,
I've implement your solution but when I click the finish button for activate the workflow I've this error:

[img]http://img809.imageshack.us/img809/5613/screenbd.png[/img]

And if I click in the folder inside the workflow package I've a page that say:

The node's content is missing: 
   node: workspace://SpacesStore/7c622eec-fa96-4c48-8547-9c0a6267fb77
   reader: null 
Please contact your system administrator.

PLEASE, CAN YOU HELP ME PLEASE?
THANK YOU

massanen
Champ in-the-making
Champ in-the-making
hello everybody (if you're not in holidays like me),

sebp's solution works fine but just with alfresco explorer. Would you know which java files I have to modify to use a folder/space as workflow package with Alfresco Share????


thanks a lot!

vbr
Champ in-the-making
Champ in-the-making
Hello,

When I start two workflows on the same space I got the followings messages :


Please correct the errors below then click Finish.
A system error happened during the operation: 10260023 This node is already being used as a workflow package! NodeRef: workspace://SpacesStore/7ea14a9c-f1d1-465d-82ef-7a98ff3f3feb


Someone can help me? Thank you!