Questions on creating a Method and a Job using Composer
Hi,
Using Composer I created a Java class with a method to run as a job on schedule. As per the Composer User guide, I see one can create both method (method object) and a job too. My Java method name is "sendEmail". I have a couple of questions while creating a method and Job using Composer.
I think we can use only Composer to create both and deploy them as a project and I need need not do anything in DA? Am I right? If not, please let me know how I need to use the instructions in DA?
While Creating a Method using Composer
What exactly goes in "Command"?
Where does exactly my Java method name sendEmail go in?
For "Run as the server": What is best option?
For "Use method server": What is best option?
While Creating a Job using Composer
For "Method Data": What is best option?
For "Standard Arguments": My method does not have any arguments or parameters to pass on. Shall I keep it blank? What exactly goes here?
For "Custom Arguments": Shall I keep it blank? What exactly goes here?
Please share your knowledge and experiences for figuring this out.
Thanks.
ta
Best Answer
-
Hi athati,
"I think we can use only Composer to create both and deploy them as a project and I need need not do anything in DA? Am I right? If not, please let me know how I need to use the instructions in DA?"
yes, you don´t have anything in DA
While Creating a Method using Composer
What exactly goes in "Command"?
is the name of your java class, for example: com.example.methods.Expirated
Where does exactly my Java method name sendEmail go in?
com.example.methods[your package].sendEmai [your class]
For "Run as the server": What is best option?
always leave true
For "Use method server": What is best option?
if you go to work with Workflows, for example with Process Builder check this.
While Creating a Job using Composer
For "Method Data": What is best option?
leave it empty.
For "Standard Arguments": My method does not have any arguments or parameters to pass on. Shall I keep it blank? What exactly goes here?
check true, if you want access to documentum, for example use sessions for access to repository.
For "Custom Arguments": Shall I keep it blank? What exactly goes here?
yes. Here goes your custom arguments use in your class, if you need.
I hope that the answers help you.
Regards
0
Answers
-
Hi athati,
"I think we can use only Composer to create both and deploy them as a project and I need need not do anything in DA? Am I right? If not, please let me know how I need to use the instructions in DA?"
yes, you don´t have anything in DA
While Creating a Method using Composer
What exactly goes in "Command"?
is the name of your java class, for example: com.example.methods.Expirated
Where does exactly my Java method name sendEmail go in?
com.example.methods[your package].sendEmai [your class]
For "Run as the server": What is best option?
always leave true
For "Use method server": What is best option?
if you go to work with Workflows, for example with Process Builder check this.
While Creating a Job using Composer
For "Method Data": What is best option?
leave it empty.
For "Standard Arguments": My method does not have any arguments or parameters to pass on. Shall I keep it blank? What exactly goes here?
check true, if you want access to documentum, for example use sessions for access to repository.
For "Custom Arguments": Shall I keep it blank? What exactly goes here?
yes. Here goes your custom arguments use in your class, if you need.
I hope that the answers help you.
Regards
0 -
Hi,
Follow the following steps-
1. you should extend your class by com.documentum.mthdservlet.IDmMethod.And override execute() method.
In this execute method you can write your code.
2.Copy this compiled class file in "Documentum/dba/javamethods" folder where content server is installed.
3.Restart the JMS server.
4.Create a method in DA
5.Optionally you can create a job by using DA.And select the method while creating a job.
0 -
Thanks Sandeep, Aston and Kyle.
I already created a Java class (without extending any other class...) with a method in it. So as per your post, that method will not work...RIght? For this to get it to work all my "sendEnail" method clode must go into overriden execute() method and my class must extend com.documentum.mthdservlet.IDmMethod...Right?
I used Composer for this so far. As Aston mentioned, can I continue using Composer to create method (object) and Job?
Please advise me.
Thanks.
ta
0 -
Yes you have to write your code in this overriden execute() method.Otherwise it will not work.
And you can create a job/method in composer as well as in DA.
0 -
Old, but good post: http://developer.emc.com/developer/devcenters/ContentManagement/devsupp/MethodServer_DevTools_Whitepaper.pdf <http://developer.emc.com/developer/devcenters/ContentManagement/devsupp/MethodServer_DevTools_Whitepaper.pdf>
I attached the sample.java that comes with content server. Not sure if it will get filtered out since I am replying via email.
Jobs (dm_job) refer to a method (dm_method). Methods can refer to java or docbasic or other programs. Most recently, you should not develop with docbasic. Many OOTB methods are still there and are done in docbasic. For those, you can get the code just by following the method_verb.
Example method_verb : .\dmbasic -f..\install\admin\mthd1.ebs -eContentWarning
The code is in $DOCUMENTUM_HOME\..\install\admin\mthd1.ebs, the entry subroutine is ContentWarning. This is useful to reverse engineer EMC’s jobs/methods.
When the code is in java, of course, you can’t get at it without decompiling, or if it was custom, then hopefully you have the originally source code.
0 -
Its on the content server. Search for: mthdservlet.jar, add it to your path in composer project. Mine was on: \Documentum\jboss4.2.0\server\DctmServer_MethodServer\deploy\ServerApps.ear\DmMethods.war\WEB-INF\lib\ mthdservlet.jar
Btw, put your resulting jar in documentum/dba/java_methods
0 -
Thanks Kyle.
I found the JAR (mthdservlet.jar) on Content Server. I need to FTP to my computer to pull into my Composer project. I did not find 'dba' folder under either "C:\Program Files\Documentum" or "C:\Documentum".
Please advise me where can I pull it.
Thanks.
ta
0 -
When you are done, all custom dm_method programs that are to be run from a job or a workflow auto activity, go into Documentum/dba/java_methods on the content server, NOT your local pc. During development, you use your local PC/composer. You simply put the jar in that directory on the content server, toggle the method server and if your program was written correctly, its accessible by the calling dm_method in the repository. To setup the dm_method and dm_job objects, just mimic other dm_method/dm_job objects (query for them).
0
Categories
- All Categories
- 123 Developer Announcements
- 54 Articles
- 152 General Questions
- 148 Thrust Services
- 57 Developer Hackathon
- 37 Thrust Studio
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 918 Core Messaging
- 84 Digital Asset Management
- 9.4K Documentum
- 32 eDOCS
- 190 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 10 XM Fax
- Follow Categories