D2 Scheduled Workflow
Hello ,
While i was going through D2 4.1 API i came across a couple of methods in com.emc.d2fs.interfaces Interface IWorkflowService for launching workflow
1)</code></span> <code><strong><a>launchScheduledWorkflow</a></strong>(<a title="class in com.emc.d2fs.models.context">Context</a> context, java.lang.String id)
Launch a scheduled workflow.
2)
</code></span></td><td><code><strong><a>launchWorkflow</a></strong>(<a title="class in com.emc.d2fs.models.context">Context</a> context, java.util.List<<a title="class in com.emc.d2fs.models.attribute">Attribute</a>> parameters) Launch document into workflow |
so what is difference between Scheduled workflow and Normal workflow , and in case if we use 2nd method ie.
<strong><a>launchWorkflow</a></strong>(<a title="class in com.emc.d2fs.models.context">Context</a> context, java.util.List<<a title="class in com.emc.d2fs.models.attribute">Attribute</a>> parameters)
Launch document into workflow
what are the parameters do we need to have in the java.util.List
Best Answer
-
I see you only do a request.getAttributes().add(attr); at the end?
You Attribute object is everytime overwritten in your code.
So the only item in your Attribute object should be buttonId = buttonOk.
Try it like this:
Attribute attr = new Attribute();
attr.setName("config");
attr.setType(2);
attr.setValue("myWorkflow");
request.getAttributes().add(attr);
attr = new Attribute();
attr.setName("workflow_label");
attr.setType(2);
attr.setValue("MyWorkflow");
request.getAttributes().add(attr);
attr = new Attribute();
attr.setName("reviewers");
attr.setType(2);
attr.setValue("mayur");
request.getAttributes().add(attr);
etc...
0
Answers
-
Hi,
And the javadoc is not helping on this..
0 -
Which Javadoc ?
0 -
-
We use the 'D2FS 4.1 Javadoc', but it's indeed very minimal and almost unusable.
One of our developers used a tool called TCPMON.jar and placed it between the JMS and Application server. Then we started a workflow from D2 and picked up the message that was sent. With that message information we could build that message in Java again with the correct attribute-list.
0 -
-
For starting a D2 workflow we came to this list:
attr.setName("list");
attr.setValue("config");attr.setName("config");
attr.setValue(strWf);attr.setName("workflow_label");
attr.setValue(strWf);attr.setName("name");
attr.setValue(strWf);attr.setName("labelNotification");
attr.setValue("");attr.setName("notification");
attr.setValue("");attr.setName("launch_date");
attr.setValue("");attr.setName("launch_notification");
attr.setValue("");attr.setName("end_of_workflow");
attr.setValue("");attr.setName("list");
attr.setValue("workflow_label¬name¬labelNotification¬notification¬add_document_id¬launch_date¬launch_notification¬end_of_workflow");0 -
but i am somewhat confused on first two and last two lines of the previous answer
1)
attr.setName("list");
attr.setValue("config");
what should i pass in as "list" and "config" i have tried "d2_workflow_config" for attr.setValue("config"); but that not working
and in the last two lines
attr.setName("list");
attr.setValue("workflow_label¬name¬labelNotification¬notification¬add_document_id¬launch_date¬launch_notification¬end
what is "list" and whats the separator "workflow_label¬name¬l" ie : "¬" this one
Regards
0 -
This is the message we picked up with tcpmon.jar:
==============================================================http://localhost:8081/D2/x3_portal/
|F246E4E08DEEA93E352D73B533D11873
|com.emc.x3.portal.client.components.dialog.RpcDialogService
|validDialog
|java.lang.String/2004016611|java.util.List
|Repo_DEV-1370844030776-dmadmin-498188302
|080299be80043750
|D2WorkflowLaunchDialog
|java.util.ArrayList/4159755760
|com.emc.d2fs.models.attribute.Attribute/3907115023
|list
|config|myflow
|workflow_label|My Flow
|name|My Flow 10 jun 2013 08:03:51
|labelNotification
|notification
|launch_date
|launch_notification|false
|end_of_workflow
|workflow_label¬name¬labelNotification¬notification¬add_document_id¬launch_date¬launch_notification¬end_of_workflow
|buttonId|buttonOk
==============================================================
We rebuild this message in Java like this (Those '¬' just come with the copy from tcpmon to eclipse):
//Create a new ValidDialogRequest
ValidDialogRequest request = new ValidDialogRequest();
request.setId(<<Object ID of document in Package>>);
request.setDialogName("D2WorkflowLaunchDialog");
request.setContext(context);//Set all the attributes like in the tcp-message
attr = new Attribute();
attr.setName("config");
attr.setType(2);
attr.setValue(<<See the tcp-message>>);
request.getAttributes().add(attr);...
//Send out the request
final ValidDialogResponse response = (ValidDialogResponse)new D2FSWebServiceSupport().getWebServiceTemplate().marshalSendAndReceive(request);0 -
-
this is my code
ValidDialogRequest request = new ValidDialogRequest();
request.setId("090072e58000b14f");
request.setDialogName("D2WorkflowLaunchDialog");
request.setContext(context);
Attribute attr = new Attribute();
attr.setType(2);
attr.setName("list");
attr.setValue("");
then i have set the value and name of attributes according to my configuration
and in the end i am launching it through import com.emc.d2fs.schemas.models.ModelPort;
like this
request.getAttributes().add(attr);
port.validDialog(request);
i am getting this error
2013-06-10 19:35:23 [INFO ] - c.e.d2fs.dctm.workflow.D2WorkflowLaunch : Launch w
orkflow for config :
2013-06-10 19:35:23 [INFO ] - c.e.d2fs.dctm.workflow.D2WorkflowLaunch : Launch w
orkflow for document :(090072e58000b14f)
2013-06-10 19:35:23 [INFO ] - c.e.d2fs.dctm.workflow.D2WorkflowLaunch : Workflow
tracker name :
2013-06-10 19:35:23 [ERROR] - c.e.d.dctm.aspects.InjectSessionAspect : {}
com.emc.common.dctm.exceptions.C6ObjectNotFoundByNameException: Workflow object
"" not found.
at com.emc.common.dctm.utils.DfSessionUtil.getObjectByName(DfSessionUtil
.java:233) [C6-Common-4.1.0.jar:na]
at com.emc.d2.api.config.modules.workflow.D2WorkflowConfig.getInstanceBy
Name(D2WorkflowConfig.java:138) [D2-API-4.1.0.jar:na]
at com.emc.d2fs.dctm.workflow.D2WorkflowLaunch.process(D2WorkflowLaunch.
java:126) [D2WorkflowLaunch.class:na]
at com.emc.d2fs.dctm.dialogs.d2workflows.D2WorkflowLaunchDialog.validDia
log(D2WorkflowLaunchDialog.java:232) [D2WorkflowLaunchDialog.class:na]
at com.emc.d2fs.dctm.web.services.dialog.D2DialogService.validDialog_aro
undBody2(D2DialogService.java:140) [D2DialogService.class:na]
at com.emc.d2fs.dctm.web.services.dialog.D2DialogService$AjcClosure3.run
(D2DialogService.java:1) [D2DialogService$AjcClosure3.class:na]
at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:
221) [aspectjrt-1.6.11.jar:na]
at com.emc.d2fs.dctm.aspects.InjectSessionAspect.process(InjectSessionAs
pect.java:134) [InjectSessionAspect.class:na]
at com.emc.d2fs.dctm.web.services.dialog.D2DialogService.validDialog(D2D
ialogService.java:120) [D2DialogService.class:na]
at com.emc.d2fs.endpoints.DialogServiceEndpoint.handleValidDialogRequest
(DialogServiceEndpoint.java:156) [D2FS-4.1.0.jar:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [na:1.6.0
_27]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [na:1.6.0
_27]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [na:1
.6.0_27]
at java.lang.reflect.Method.invoke(Unknown Source) [na:1.6.0_27]
at org.springframework.ws.server.endpoint.MethodEndpoint.invoke(MethodEn
dpoint.java:132) [spring-ws-core-2.0.4.RELEASE.jar:na]
at org.springframework.ws.server.endpoint.adapter.DefaultMethodEndpointA
dapter.invokeInternal(DefaultMethodEndpointAdapter.java:229) [spring-ws-core-2.0
.4.RELEASE.jar:na]
how to resolve this
Regards
0 -
It looks like it searches for a workflow without a name:
com.emc.common.dctm.exceptions.C6ObjectNotFoundByNameException: Workflow object
"" not found.
Did you set these attributes:
config = <name of the workflow in D2>
workflow_label = <label of the workflow in D2>
name = <name of the workflow in BPM/workflow manager>
?
0 -
Yes i have set these
attr.setName("config");
attr.setValue("myWorkflow");
attr.setName("workflow_label");
attr.setValue("MyWorkflow");
attr.setName("name");
attr.setValue("Workflow 1");// 10 Jun 2013 17:35:35");
but when i am remote monitored TCP messages i am getting like this
|list
|config
|myWorkflow
|workflow_label
|name
|myWorkflow 11 Jun 2013 11:08:13
|reviewers
|mayur
|approvers
|labelNotification
||notification
|launch_date
|launch_notification
|false
|end_of_workflow
|workflow_label¬name¬reviewers¬approvers¬rewriters¬labelNotification¬notification¬add_document_id¬launch_date¬launch_notification¬end_of_workflow
|buttonId
|buttonOk
i am getting time stamp with name , so that time stamp is going to change every time , so does this error is from this thing
and if the value of any field is empty i am doing like this
attr.setName("launch_date");
attr.setValue(" ");
is this the right way
Regards
0 -
This information is incorrect:
name = <name of the workflow in BPM/workflow manager>The name can be a selve described name, so you are free to use your own name as far as i can see.
.The launch_date can be used to start the workflow on a later time with the D2 job 'D2JobWFLaunchScheduledWorkflows'
0 -
I see you only do a request.getAttributes().add(attr); at the end?
You Attribute object is everytime overwritten in your code.
So the only item in your Attribute object should be buttonId = buttonOk.
Try it like this:
Attribute attr = new Attribute();
attr.setName("config");
attr.setType(2);
attr.setValue("myWorkflow");
request.getAttributes().add(attr);
attr = new Attribute();
attr.setName("workflow_label");
attr.setType(2);
attr.setValue("MyWorkflow");
request.getAttributes().add(attr);
attr = new Attribute();
attr.setName("reviewers");
attr.setType(2);
attr.setValue("mayur");
request.getAttributes().add(attr);
etc...
0 -
-
Did you got the answer if not here is the procedure
Use the wsimport command (included with your JDK) to generate a set of java source
files for the stub libraries you will need to connect. Add the -keep option in order to
EMC Documentum D2 4.1 Architecture 10
preserve the generated java files after the command has finished running. Depending on
where you have deployed D2, the command will look something like:
wsimport -keep http://localhost:8080/D2/ws/d2fs.wsdl
Build the JAR file for generated classes and add it in your project
Regards
0 -
Hi Mayur,
Could you please provide code for 'D2FSWebServiceSupport' mentioned in post? I'm struggling with this and not getting details. If you can provide pointers, it would be great.
Thanks,
Shilpa
0
Categories
- All Categories
- 108 Developer Announcements
- 53 Articles
- 107 General Questions
- 144 IM Services
- 43 OpenText Hackathon
- 32 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 899 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 119 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management