Tuesday, January 13, 2009

Documentum Workflow for dummies -II ( Automatic activities)

Lets look at how we can add an automatic activity to the workflow we created in the previous blog post.

Creating a workflow method for automatic activity
1. Here is a template workflow method. Create one like this using your IDE and compile it


2. drop the compiled class in C:\Documentum\dba\java_methods, including the package structure if any.
3. open up Documentum Administrator and go to Job management->Methods
4. Select menu File->new and create a new method object. The properties page of the newly created method should look like this

5. log out of DA and open up a IAPI command window and login to the docbase through iapi
6. type

retrieve,c,dm_method where object_name='SampleAutomaticActivity'

7. this will retrieve the object id of the method object we just created.
8. type

dump,c,l

9. This will dump the method object. if you look at the object dump the attribute a_special_app will not have a value assigned.
10. Assign the a_special_app attribhute the value 'Workflow' without the quotes. Type the follwoing line to do that.

set,c,l,a_special_app
SET>Workflow

11. save the property change. Now the workflow method is ready to be attached to an automatic activity

save,c,l

Creating automatic activity in the process
1. open up the workflow/process created in the previous blog in process builder.
2. uninstall the process/workflow.
3. click on 'create automatic activity' icon on the top toolbar(its the one with the image of a gear wheel)
4. Click anywhere in the workspace. An automatic activity instance will be palce where you clicked.
5. go back to the 'selct objects' mode by clicking the mouse pointer icon on the toolbar.
6. Drag and place the automatic activity between manual activities activity-2 and activity-3(or anywhere you choose between initiate and end)
7. re-connect the connectors so that the process now flows through the automatic activity.
8. Open up the automatic activity's activity inspector and go to performer tag
9. Drop down the combo box named 'Executed this method automatically'.
10. Select the method created above. it should show up in this list otherwise dump the method object(dm_method) you created and check the value of a_special_app property. It should be 'Workflow' without the quotes. Only methods with a_special_app value set to Workflow will show up in this list.
11. save, validate and install the workflow. The workflow will look similar to this

12. Executing the workflow now will execute the automatic activity, try running it from webtop. To see this working in the process builder we can use the debug feature of the 6.5 process builder. Will explain how to use the debug feature in antoher blog.

No comments:

Post a Comment