Need Sample Code to Trigger workflow Using D2FS
Hi All,
I need a sample program to trigger a workflow in D2 using D2FS.
Thank you in advance.
Best Answer
Answers
-
Hi,
We had a good discussion on this feature in this post: https://community.emc.com/message/737530#737530
But what is your functional requirement because it's also possible to start a process from the D2LifecycleBatchJob job.
Best regards,
Antal
0 -
Hi Antal,
Thanks for the reply. I'm creating the content using Custom widget that I've designed using DFC. After creation of main content I need to push the document in to a workflow. I tried using DFC but its throwing an error dialog box with out any message. So I thought of using D2FS to send the document to workflow. I've seen the discussion link you sent. Can you provide me only the code that I need for this function ? and also what are all the jars I need to keep in the library ?
Thanks.
0 -
Hi Antal,
Thanks for your help. I've sent document to workflow. But before that I have to apply the D2 Lifecycle to the document so that the state changes based on the workflow activity.
Thanks,
0 -
Then i would call this method and start the workflow from a lifecycle-action in D2-Config.
private void attachLC(String strId){
Context context = new Context();
context.setLogin("dmadmin");
context.setPassword("admin");
Repository repos = new Repository();
repos.setId("D7");
repos.setRepositoryName("D7");
repos.setRepositoryType("DOCUMENTUM");
repos.setServerName("Win2k8SQL2k8D67");
repos.setDocbaseDescription("Documentum 6.7 Repository");
repos.setServerVersion("6.7.0000.0217 Win32.SQLServer");
context.setRepository(repos);
context.setClientHostName("server");
context.setClientIp("127.0.0.1");
context.setUid("qwesdrfghj");
ChangeStateRequest stateRequest = new ChangeStateRequest();
stateRequest.setId(strId);
stateRequest.setContext(context);
stateRequest.setTargetState("Imported");
stateRequest.setOperation("start");
final ChangeStateResponse stateresponse =
(ChangeStateResponse)new D2FSWebServiceSupport().getWebServiceTemplate().marshalSendAndReceive(stateRequest);
}
0 -
Hi Antal,
Even I'm facing the same problem. I've used the following jars.
- spring-1.2.8.jar
- spring-ws-core-2.0.4.RELEASE.jar
But still setWebServiceTemplate function is unresolved.
What to do ?
0 -
Thanks alot Antal for your quick replies. I was able to remove errors related to spring framework. Now I am facing below error while running the code.
org.springframework.ws.client.WebServiceIOException: I/O error: Connection refused: connect; nested exception is java.net.ConnectException: Connection refused: connect
at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:543)
at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:384)
at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:378)
at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:370)
at StartWorkflow.startWf(StartWorkflow.java:119)
at StartWorkflow.main(StartWorkflow.java:30)
I am not 2 proficient with web services so unable to get what may be wrong
Regards,
Nitesh
0 -
Hi Nitesh & Antal,
Even I'm facing the problem. We are on the same page Nitesh.
0 -
Check this setting in the applicationContext.xml
<property name="defaultUri" value="http://localhost:8090/D2FS/ws" />
You probably need to change the defaultUri to something like: http://<APP_SERVER_HOST>:<APP_SERVER_PORT>/D2/ws
Also see if you get result back on this url: http://<APP_SERVER_HOST>:<APP_SERVER_PORT>/D2/ws/d2fs.wsdl
e.g. http://localhost:8080/D2/ws/d2fs.wsdl
I included \Documentum\User\config on the classpath; inhere i have my dfc.properties, but also that applicationContext.xml
Hopefully this helps you both guys further.
0 -
Thanks Antal for your reply.
I tried using that inner class now, but what are these files and how could i get them
private static final String BEANS_XML_FILE = "applicationContext.xml";
private static final String WEBSERVICETEMPLATE_BEAN_ID = "webServiceTemplate";
Also, as you replied my other post too, i blv i could use ID2LifecycleService implementation and call changeState method directly as well, was able to change lifecycle state using this. Just a curious question yet, what are these files??
0 -
The applicationContext.xml should be available on the classpath for the application from where you run your customization; We have some custom modules running by the JMS, so we copied the XML to the classpath on the JMS.
A sample of the XML can be found in your D2 webapp on the application server: D2\WEB-INF\classes
In here you will find that 'webServiceTemplate' bean; This is Spring framework functionality (http://docs.spring.io/spring-ws/site/reference/html/client.html).
When calling D2FS from custom code this URL will also be handy: http://<HOST>:<PORT>/D2/ws/d2fs.wsdl
0 -
Dear HetBenkt,
we still facing issue finding the location to put application context in classpath on JMS, can you please explain more where exactly to put this file.
Thanks.
0 -
Dear HetBenkt,
We tried the same, workflow is started successfully but task is coming to workflow supervisor.
Because alias is not getting resolved. Kindly let us know how to assign the performers in alias.
If any one else had same issue, let us know how to resolve it.
Regards,
Ekta
0 -
Is there any D2fs code to call the Workflow Services in D2.
0 -
Is there any D2fs code to call the Workflow Services in D2 ?
Does someone has any sample ?
0
Categories
- All Categories
- 122 Developer Announcements
- 53 Articles
- 149 General Questions
- 148 Thrust Services
- 56 OpenText Hackathon
- 37 Developer Tools
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 917 Cloud Fax and Notifications
- 84 Digital Asset Management
- 9.4K Documentum
- 31 eDOCS
- 181 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 8 XM Fax
- Follow Categories