How to create custom workflow method in DCTM 23.4? Can it be implemented and utilize in D2 environment?
I am still looking answer for this. If anyone has code snippets then it would be greatly appreciated.
You can extend com.documentum.bpm.rtutil.WorkflowMethod and implement method doTask as follows :
import java.io.PrintWriter;
import com.documentum.bpm.IDfWorkitemEx;
import com.documentum.bpm.rtutil.WorkflowMethod;
import com.documentum.fc.client.IDfWorkitem;
import com.documentum.fc.common.IDfProperties;
public class MyWorkflowMethod extends WorkflowMethod {
public int doTask(IDfWorkitem workItem, IDfProperties properties, PrintWriter writer) throws Exception {
IDfWorkitemEx workitemEx = (IDfWorkitemEx) workitem; // Do what you have to do return 0;
}
You will need the BPM jars which are installed with process engine (bpm webapp), e.g. bpmrt.jar and bpmutil.jar. Sorry for the formatting but I don't know how to paste code in this forum.
Thanks for providing this code snippets. Can you please also let me know how to deploy workflow method?
You can deploy it as a BOF module, but that requires that you build it with Documentum Composer and deploy it as a DAR file. Alternatively, you can deploy your jar file to the Java Method Server (personnally I recommend putting it into $DOCUMENTUM/dba/java_methods folder). You can create the method via iapi : you can use the method dm_noop_auto_method_java as a template. Make sure that a_special_app is set to 'Workflow' if you want to use it within a workflow.