cancel
Showing results for 
Search instead for 
Did you mean: 

How to Run Java files

pp20218
Champ in-the-making
Champ in-the-making
Hi All,

I want to create some java files for workflow. How can I run those and see the output? I have the below scenario.

(1)Have Alfresco codebase from SVN,checkedout from HEAD.
(2) I have setup the code in eclipse and can build alfresco using the ANT build from Eclipse.

If I have the above env setup, then how can I create the java or javascript files and run? Also where can I see the output?
I saw a discussion at(http://www.devcomments.com/Start-Advanced-Workflow-from-JAVA-code-1-to299735.htm) Here java code changes is mentioned. If we take this as a scenario then how can I achive it, meaning run and see the output?

Please help.

Thanx
PP
7 REPLIES 7

pp20218
Champ in-the-making
Champ in-the-making
Thanx in advance

pp20218
Champ in-the-making
Champ in-the-making
Can Anyone help me pls.

mrogers
Star Contributor
Star Contributor
There's no "output" to see unless you use logging.   What do you mean by "output".

Start by looking at the alfresco source code.   You should be able to find already existing examples of workflow implemented in both Java and alfresco script or beanshell.  

The java actions implement JBPMSpringActionHandler so start by looking at those.

pp20218
Champ in-the-making
Champ in-the-making
Hi Mrogers,

Thanks for your reply.
Sorry for not explaining my question clear.
What I meant 2 ask was,
Suppose I am going to write a java file that will display the workflow history. Then how I will run my java file?
As per my understanding:
I will write the java file some where in org.alfresco.repo.workflow package or some other place. Then I will build my workspace.So alfresco.war will get generated.
Now I will deploy this and check the alfresco.log for the result.

Is my understanding correct?

Thanks

huima
Champ in-the-making
Champ in-the-making
Unfortunately it is very hard to understand what you are trying to do.

If you want to see workflow history of a node in Alfresco webclient, there is instructions for it in wiki. Use search: workflow history.

Otherwise read Alfresco Developer Guide chapter 7 about workflows.

Hope this helps.

pp20218
Champ in-the-making
Champ in-the-making
Hi,

Thanks for your reply.
I just gave an example as Workflow history in my previous reply.
What I meant to ask is when we write some java code for any alfresco related Use cases ,then how we will debug and run our code.Where we will see the output of our compiled code.That was my question.

Sorry for making you confuse.
Thanks in advance.

Regards
PP

chandu7ee
Champ in-the-making
Champ in-the-making
Hi,

Thanks for your reply.
I just gave an example as Workflow history in my previous reply.
What I meant to ask is when we write some java code for any alfresco related Use cases ,then how we will debug and run our code.Where we will see the output of our compiled code.That was my question.

Sorry for making you confuse.
Thanks in advance.

Regards
PP


Hi,

I need this kind of help, suppose if i wrote any java code like creating spaces or content using java classes, how can i debug and run that code. is there any good article for that. Also i need the help to debug my entire alfresco  using eclipse.

Thanks