cancel
Showing results for 
Search instead for 
Did you mean: 

How can I deploy a custom workflow (with its model) in Alfresco Community 5.1?

mafaldap
Star Contributor
Star Contributor

I'm following Jeff Potts' tutorial, but I can't figure out how to use the workflow-tutorial-repo and the workflow-tutorial-share inside the Alfresco community installed.

I imported the amp files using the command:

java -jar alfresco-mmt.jar install <AMPFileLocation> <WARFileLocation> [options]

Once that I start Alfresco nothing changes. Any advice?

Thank you

1 ACCEPTED ANSWER

gravitonian
Star Collaborator
Star Collaborator

I did give your workflow a go in a 5.1 install I got.

Everything worked with the ZIP files provided above.

What I did:

Unzipped to get to the AMPs

martin@gravitonian:/opt/alfresco51EA$ cd amps

martin@gravitonian:/opt/alfresco51EA/amps$ cp ~/Downloads/workflow-tutorial-repo.amp .

martin@gravitonian:/opt/alfresco51EA/amps$ cd ../amps_share/

martin@gravitonian:/opt/alfresco51EA/amps_share$ cp ~/Downloads/workflow-tutorial-share.amp .

martin@gravitonian:/opt/alfresco51EA/amps_share$ cd ../bin/

martin@gravitonian:/opt/alfresco51EA/bin$ ./apply_amps.sh

martin@gravitonian:/opt/alfresco51EA$ ./alfresco.sh restart tomcat

Loggged in to Share, uploaded a file, then selected Start Workflow for it. All the custom workflows are available to choose.

What I suspect might have happend here is the case when you don't use apply_amps.sh, but instead use the MMT tool (i.e. java -jar alfresco-mmt.jar ...) by itself. And forget to remove the exploded WAR directories before restarting Tomcat. The apply_amps.sh script removes the exploded WAR dirs for you automatically.

View answer in original post

18 REPLIES 18

jpotts
World-Class Innovator
World-Class Innovator

Go to /Applications/alfresco-community/tomcat/webapps and do find . -name

helloWorld* and make sure that the process definition actually made it into

your WAR.

mafaldap
Star Contributor
Star Contributor

No results at all:

MacBook-Air-di-Mafalda:webapps mafaldapapini$ find . -name helloWorld*

MacBook-Air-di-Mafalda:webapps mafaldapapini$

Maybe it's better if I try to uninstall the amps and start everything from the beginning.

mafaldap ha scritto:

No results at all:

MacBook-Air-di-Mafalda:webapps mafaldapapini$ find . -name helloWorld*

MacBook-Air-di-Mafalda:webapps mafaldapapini$

Maybe it's better if I try to uninstall the amps and start everything from the beginning.

I uninstalled workflow-tutorial-repo.amp and workflow-tutorial-share.amp, I installed them again and it still gives me the same result. During the installation I checked and there weren't errors. The workflows were added to the .war file:

   - File '/WEB-INF/classes/alfresco/module/workflow-tutorial-repo/workflows/helloWorld.bpmn' added to war from amp

   - File '/WEB-INF/classes/alfresco/module/workflow-tutorial-repo/workflows/helloWorldFork.bpmn' added to war from amp

   - File '/WEB-INF/classes/alfresco/module/workflow-tutorial-repo/workflows/helloWorldUI.bpmn' added to war from amp

   - File '/WEB-INF/classes/alfresco/module/workflow-tutorial-repo/workflows/publishWhitepaper.bpmn' added to war from amp

Do I have to copy other files/directories inside the Alfresco-community application?

jpotts
World-Class Innovator
World-Class Innovator

No, that should be it. Now you ought to be able to go into the workflow console and see your deployed workflow definitions by doing show definitions all. If they are not there, do the deploy command.

mafaldap
Star Contributor
Star Contributor

I already tried but it still give me

Caused by: java.io.FileNotFoundException: class path resource [alfresco/module/workflow-tutorial-repo/workflows/helloWorld.bpmn] cannot be opened because it does not exist

Will you please share me both the amps to check? I will try to reproduce this on my machine as well with alfresco community 5.1.

Thanks,

Kalpeshhttp://www.contcentric.com/

ContCentric

Thank you very much

gravitonian
Star Collaborator
Star Collaborator

I did give your workflow a go in a 5.1 install I got.

Everything worked with the ZIP files provided above.

What I did:

Unzipped to get to the AMPs

martin@gravitonian:/opt/alfresco51EA$ cd amps

martin@gravitonian:/opt/alfresco51EA/amps$ cp ~/Downloads/workflow-tutorial-repo.amp .

martin@gravitonian:/opt/alfresco51EA/amps$ cd ../amps_share/

martin@gravitonian:/opt/alfresco51EA/amps_share$ cp ~/Downloads/workflow-tutorial-share.amp .

martin@gravitonian:/opt/alfresco51EA/amps_share$ cd ../bin/

martin@gravitonian:/opt/alfresco51EA/bin$ ./apply_amps.sh

martin@gravitonian:/opt/alfresco51EA$ ./alfresco.sh restart tomcat

Loggged in to Share, uploaded a file, then selected Start Workflow for it. All the custom workflows are available to choose.

What I suspect might have happend here is the case when you don't use apply_amps.sh, but instead use the MMT tool (i.e. java -jar alfresco-mmt.jar ...) by itself. And forget to remove the exploded WAR directories before restarting Tomcat. The apply_amps.sh script removes the exploded WAR dirs for you automatically.

Ok, I did a stupid mistake... thank you so much!